Commit Graph

43 Commits

Author SHA1 Message Date
Jaime Velasco Juan
5c6dda0459 gtkwin32theme: delete #if 0 code
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
7e3f9d6f71 win32 theme: No need to create a DC for GetThemePartSize
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
77ff3ada62 win32 theme: use TS_TRUE in GetThemePartSize
Several styles return a size of 0x0px when using TS_DRAW, as
we don't pass a RECT to draw into.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Benjamin Otte
c73db50aed win32: Implement GetSystemMetric() fallbacks
Default values taken from Wine.
2016-02-21 20:44:36 +01:00
Benjamin Otte
c2dd3c0d89 win32: Move variable definition to not cause gcc warning
It's only used on win32, so only define it there.
2016-02-21 20:44:36 +01:00
Benjamin Otte
eda348d2b5 win32: Handle size queries for all values
Fall back to GetSystemMetrics() whenever GetThemeSysSize() didn't work.
2016-02-21 03:02:36 +01:00
Benjamin Otte
67b893c5f8 win32 theme: Add a way to query border of theme parts 2016-02-17 04:49:26 +01:00
Benjamin Otte
c98007f9fd win32: Add fallback code to draw theme parts 2016-02-17 04:36:18 +01:00
Benjamin Otte
37e3ccb2f6 win32: Split out fallback code into separate file
(1) Actual Windows users don't care about it
(2) It's easier to get rid of
2016-02-17 04:36:18 +01:00
Benjamin Otte
3c0cd8aea4 win32 theme: Include the default win32 colors 2016-02-16 02:53:33 +01:00
Benjamin Otte
f425b5549c win32: Add support for -gtk-win32-part-width/height to CSS
It's unused by now, but I want it for min-width of checks/radios.
2016-02-15 04:41:12 +01:00
Benjamin Otte
3597baf272 win32: Update color handling to recent GtkWin32Theme changes 2016-02-15 04:41:12 +01:00
Benjamin Otte
a1617c6d6d win32: Canonicalize theme-name before adding to hash table
This way, we get rid of du0plicates.
2016-02-15 04:41:12 +01:00
Benjamin Otte
d584e22e02 win32: Add gtk_win32_theme_parse()
So all places can use this function instead of parsing things themselves.
2016-02-15 04:41:12 +01:00
Benjamin Otte
3b19db425e css: Add a number value handling win32 sizes 2016-02-15 04:41:12 +01:00
Benjamin Otte
88b7dfdb1e win32: Move init code into windows-specific code
Avoids warnings about undefined functions on non-windows.
2016-02-11 04:14:28 +01:00
Benjamin Otte
4dfbaccd67 win32 theme: Add a GtkWin32Theme object
This object wraps a HTHEME and takes care of recreating it on theme changes.
2016-02-11 03:44:48 +01:00
Benjamin Otte
1519801878 win32: Capture WM_THEMECHANGED
We're not doing anything useful with it yet. This will follow in the coming commits.
2016-02-11 03:44:48 +01:00
Benjamin Otte
99153ed585 win32: Remove XP-specific code
We don't support XP anymore.
2016-02-11 03:44:48 +01:00
Benjamin Otte
a620a1d688 win32: Remove unused functions / header includes 2016-02-11 03:44:48 +01:00
Benjamin Otte
08ac1504d2 symboliccolor: Implement using GtkCssValue 2012-11-25 02:41:17 +01:00
Benjamin Otte
1367ef7e54 cssstylefuncs: Remove base argument
The GtkCssParser keeps track of the base file now.
2012-05-11 16:42:12 +02:00
Benjamin Otte
1223d53a82 cssparser: Move symbolic color parser to gtksymboliccolor.c 2012-04-17 08:59:19 +02:00
Benjamin Otte
bd400b0957 win32: Move variable declarations into #if block 2012-04-07 13:01:24 +02:00
Alexander Larsson
a4cde82365 win32: Fall back to raleigh with the classic theme
This is not ideal, we should have a real classic windows theme,
but at least its better than everything being pink, which is what
happens otherwise when theming is not enables.
2012-04-03 19:26:15 +02:00
Chun-wei Fan
f32d8be6a5 gtk/gtkwin32theme.c: Remove C99ism 2012-03-21 23:28:43 +08:00
Alexander Larsson
d43632fbdc win32: More theme workaround on XP 2012-03-20 11:36:03 +01:00
Alexander Larsson
cb1a825cc3 win32: Theme statusbars 2012-03-16 16:44:24 +01:00
Alexander Larsson
dcaec2610d win32: Add more theme workarounds on XP 2012-03-15 21:12:33 +01:00
Benjamin Otte
05e6cde97d win32: Fix compiler warning 2012-03-15 02:55:25 +01:00
Alexander Larsson
e9f070db0f win32: Fix up toolbar rendering on XP
It seems XP doesn't correctly set the alpha when rendering toolbar
buttons on an alpha target, we fix this up afterwards if necessary.
2012-03-13 17:10:44 +01:00
Alexander Larsson
f4a68dff88 Fix rendering of theme parts on Windows XP
It seems XP doesn't handle drawing non-alpha theme parts
on alpha destinations. We fix this by using alpha bitmaps only when
needed.

However this means any non-drawn area by the theme part is now draw
black, so we must take more care to only draw where the theme part draws,
so we find the theme part size when available.
2012-03-09 16:43:00 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Benjamin Otte
d021ed7c5e win32: Remove GtkWin32ThemePart
Its job is done by GtkCssImage now.
2012-01-09 18:37:57 +01:00
Benjamin Otte
8f42f8c554 win32: Export _gtk_win32_theme_part_create_surface() 2012-01-09 18:37:56 +01:00
Benjamin Otte
590b125ffc win32: Export _gtk_win32_lookup_htheme_by_classname() 2012-01-09 18:37:56 +01:00
Alexander Larsson
21c7e8cf47 win32-theme: Support custom margins in win32 theme parts 2011-11-28 09:13:54 +01:00
Alexander Larsson
7c092be0ce win32-theme: Make syntax for mixing theme parts more regular
This lets us extend the argument list better
2011-11-28 08:58:41 +01:00
Alexander Larsson
5f782d2449 win32-theme: Support mixing parts
We need this to do something about the non-existing inconsistent
radio button state in win32.
2011-11-18 11:06:32 +01:00
Alexander Larsson
3309639c1c Add support for win32 theme colors as symbolic colors 2011-11-18 10:16:38 +01:00
Alexander Larsson
fdbf029df3 win32-theme: Support multiple parts being combined
This is needed for e.g. scrollbar sliders
2011-11-17 14:34:39 +01:00
Alexander Larsson
bc38cf1ff8 win32-theme: Support -gtk-win32-size CSS value 2011-11-17 12:30:08 +01:00
Alexander Larsson
abe6598a13 Add initial cut at win32 theme support for CSS
We now support -gtk-win32-theme-part(class,part,state) in background
and border-image CSS properties. This renders the corresponding
theme part using DrawThemeBackground() and acts as a base for a
CSS based windows theme.

Note that we build the parsing code even on non-win32 so that
all themese will parse the same on all arches. We draw pink instead
of the actual theme parts on non-win32 though.
2011-11-17 12:29:03 +01:00