Carlos Garnacho
95ae1a0aa6
GtkThemingEngine: don't overshoot when rendering frames.
2010-12-04 15:39:39 +01:00
Carlos Garnacho
e47c8e2490
GtkStyle: Return the default icon set if no context is attached.
2010-12-04 15:39:39 +01:00
Carlos Garnacho
5d496aa7f3
GtkStyle: Do not warn if attach count == 0
...
This is going go happen more and more often now, as realize handlers start
removing the gtk_widget_style_attach() calls.
2010-12-04 15:39:39 +01:00
Carlos Garnacho
6bf04fbd94
GtkCssProvider: Add a default border color for insensitive elements.
2010-12-04 15:39:39 +01:00
Matthias Clasen
e57e0e978d
Illustrate extension rendering
2010-12-04 15:39:39 +01:00
Matthias Clasen
8589c5c65e
Add slider illustration
2010-12-04 15:39:38 +01:00
Matthias Clasen
7e96a51953
Add examples for frame rendering
2010-12-04 15:39:38 +01:00
Matthias Clasen
4c04d944e8
Atempt to fix stretched 9slice rendering
2010-12-04 15:39:38 +01:00
Matthias Clasen
30fe448750
Fix handling of junctions in frame drawing code
2010-12-04 15:39:38 +01:00
Matthias Clasen
e522381183
Add a background example to the docs
2010-12-04 15:39:38 +01:00
Matthias Clasen
d532c0e5c2
Test some wilder names for classes, etc
2010-12-04 15:39:37 +01:00
Matthias Clasen
391e445d11
Allow digits in selectors and values, where appropriate
2010-12-04 15:39:37 +01:00
Matthias Clasen
f13f315312
Some more images for gtk_render docs
2010-12-04 15:39:37 +01:00
Matthias Clasen
d4c70f214d
Declare transition and border-image properties to be writeonly
...
We don't make the types of their values public, so getting their
values is useless and will leak.
2010-12-04 15:39:37 +01:00
Matthias Clasen
a5e10e9b26
Improve some gtk_render_ docs
...
With pictures !!
2010-12-04 15:39:36 +01:00
Matthias Clasen
d7a0fe5bf1
Document predefined style provider priorites
...
Also, rename GTK_STYLE_PROVIDER_PRIORITY_DEFAULT to _THEME and
use it for themes.
2010-12-04 15:39:35 +01:00
Matthias Clasen
a260059c7f
Fix doc formatting
2010-12-04 15:39:35 +01:00
Matthias Clasen
d9b0da5b83
Fix resize grip drawing
...
There was some confusion about junctions...
2010-12-04 15:39:34 +01:00
Matthias Clasen
be0ed14cce
Fix GtkRadioButton drawing
2010-12-04 15:39:34 +01:00
Matthias Clasen
fc10599ac8
Make unfocused selections visible in entries
2010-12-04 15:39:33 +01:00
Matthias Clasen
21a193ad02
Make expanders prelight
2010-12-04 15:39:33 +01:00
Matthias Clasen
8b6112b6e0
Rewrite GtkInfoBar color handling to bypass GtkStyle
...
This avoids a segfault that was happening due to the recursion
detection not working anymore with the old way of doing things.
2010-12-04 15:39:33 +01:00
Carlos Garnacho
d63615d9cc
GtkCssProvider: Render inconsistent toggle buttons differently.
2010-12-04 15:39:32 +01:00
Carlos Garnacho
9b2f878b06
GtkCssProvider: do not use selected fg/bg in sliders or spinbutton buttons.
2010-12-04 15:39:32 +01:00
Carlos Garnacho
bcf1ee4825
GtkCssProvider: Use 1px border width for spinbutton buttons.
2010-12-04 15:39:32 +01:00
Carlos Garnacho
74b032b816
GtkCssProvider: Render radio and check boxes framess in menus.
2010-12-04 15:39:32 +01:00
Carlos Garnacho
b33d48a802
GtkCssProvider: use selected fg/bg for selected menu items in CSS.
2010-12-04 15:39:31 +01:00
Carlos Garnacho
85aa672ff7
GtkCssProvider: Draw frame around menubars and toolbars in default CSS.
2010-12-04 15:39:31 +01:00
Matthias Clasen
fea567bb9f
More documentation reshuffling
2010-12-04 15:39:31 +01:00
Matthias Clasen
ace967a042
Tweak wording
2010-12-04 15:39:30 +01:00
Matthias Clasen
3a7f79e814
Document border images better
2010-12-04 15:39:30 +01:00
Matthias Clasen
953ac51fb8
Make url parsing work for slices
...
The border-image parsing code relies on parse_path_str to return
a meaningful end_ptr in case of success, too.
2010-12-04 15:39:29 +01:00
Matthias Clasen
28e549082c
Fix Gtk9Slice creation
2010-12-04 15:39:29 +01:00
Matthias Clasen
69254c552a
Allow / in values
...
Otherwise, using url(path) on the right-hand side of properties
is not going to work.
2010-12-04 15:39:28 +01:00
Matthias Clasen
7d6fb7b7e7
Add some images to the docs
...
Add graphs for the transition functions and gradient examples.
2010-12-04 15:39:28 +01:00
Matthias Clasen
b2d338d370
GtkWidgetPath documentation tweaks
2010-12-04 15:39:27 +01:00
Matthias Clasen
077270142f
GtkStyleContext documentation tweaks
2010-12-04 15:39:27 +01:00
Matthias Clasen
bcf3de095f
Document various style-related enums
2010-12-04 15:39:26 +01:00
Carlos Garnacho
11480c57f0
GtkStyleContext: Use correct type for animation duration.
2010-12-04 15:39:26 +01:00
Carlos Garnacho
32ccac94e0
GtkAnimationDescription: parse "loop" correctly.
...
This sscanf parsing needs to go...
2010-12-04 15:39:25 +01:00
Carlos Garnacho
0c1cfd8a34
GtkStyle: handle scales when translating the detail string.
2010-12-04 15:39:24 +01:00
Carlos Garnacho
71f187a84f
GtkCssProvider: Handle progressbars.
2010-12-04 15:39:24 +01:00
Carlos Garnacho
f3445a2430
GtkCssProvider: Do not have border-color the same than active bg-color.
2010-12-04 15:39:24 +01:00
Carlos Garnacho
171157b0e4
GtkMenu: Use GtkStyleContext for rendering.
2010-12-04 15:39:23 +01:00
Carlos Garnacho
6fff76568c
GtkMenuBar: Use GtkStyleContext for rendering.
2010-12-04 15:39:23 +01:00
Carlos Garnacho
0df9c70200
Use gtk_render_activity() when rendering progressbars through GtkStyle
2010-12-04 15:39:23 +01:00
Carlos Garnacho
ee37847952
GtkCssProvider: Use default value when handling "none".
...
This way the default value has a way to override other values in previous
GtkStyleProviders when merged.
2010-12-04 15:39:22 +01:00
Matthias Clasen
5e26fb75a0
Add GtkStyleProperties to the docs
2010-12-04 15:39:22 +01:00
Matthias Clasen
e2f91f7201
Documentation improvements
...
This patch adds more detail to the explanation of CSS, and also
adds documentation about which files are read.
We also make :focus an alternative to :focused (since :focus is
a standard CSS pseudo-class).
2010-12-04 15:39:22 +01:00
Carlos Garnacho
9567ed01e8
GtkCssProvider: Base prelight foreground on bg color.
...
Entries are also handled, so base/text colors are used.
2010-12-04 15:39:21 +01:00
Carlos Garnacho
de94d04fea
GtkCssProvider: Make prelight a bit less light in default CSS.
2010-12-04 15:39:21 +01:00
Carlos Garnacho
bc3c9ce619
GtkStyle: Fix typo.
...
GtkStateType was being used in gtk_style_context_get(), instead of
GtkStateFlags, oops.
2010-12-04 15:39:20 +01:00
Carlos Garnacho
ead23cd0ce
GtkThemingEngine: Make render_option() depend on border-style and border-color.
2010-12-04 15:39:20 +01:00
Carlos Garnacho
be4a616e6e
GtkRadioButton: Use GtkStyleContext for rendering.
2010-12-04 15:39:20 +01:00
Carlos Garnacho
756e20f58c
Make "button" class depend on mode for GtkToggleButtons
2010-12-04 15:39:20 +01:00
Carlos Garnacho
84d586043e
Fix checkbuttons theming in CSS so it's more similar to 2.x
2010-12-04 15:39:19 +01:00
Carlos Garnacho
7478a77b04
GtkCheckButton: Use GtkStyleContext for rendering.
2010-12-04 15:39:19 +01:00
Carlos Garnacho
04783534ed
GtkThemingEngine: Make render_check() depend on border-style and border-color.
2010-12-04 15:39:19 +01:00
Carlos Garnacho
f62583d30c
GtkContainer: Also copy permanent container's classes on get_path_for_child()
...
This makes inheritance work for the simplest cases when style is defined
for classes.
2010-12-04 15:39:18 +01:00
Carlos Garnacho
6d1cf76822
GtkWidgetPath: Make iter API deal with gints.
...
now gtk_widget_path_iter_* takes gints instead of guints, and also accept
numbers == -1 or > path_length for the path head.
2010-12-04 15:39:18 +01:00
Carlos Garnacho
5f88997297
GtkWidgetPath: Make gtk_widget_path_prepend_type() return nothing.
...
It's senseless to always return 0
2010-12-04 15:39:18 +01:00
Carlos Garnacho
198bb314c7
GtkStyleContext: preserve state on save().
2010-12-04 15:39:18 +01:00
Carlos Garnacho
1bfb169ce6
GtkThemingEngine: Documents that engines must only use this API.
...
It was a bit unclear in the documentation, even if it was from the
API POV.
2010-12-04 15:39:18 +01:00
Matthias Clasen
c5b38121ec
Add tests for matching
...
These tests try to decipher how specificity works for selectors.
2010-12-04 15:39:17 +01:00
Matthias Clasen
e1819055b9
Copy GtkWidgetPaths correctly
...
The code was forgetting to copy class information.
2010-12-04 15:39:17 +01:00
Matthias Clasen
49fed3d7d7
More css parsing tests
2010-12-04 15:39:17 +01:00
Matthias Clasen
4135fbf4d6
A little closer to css
...
Declarations are ;-separated, but there is no ; required after
the last declaration. We harmlessly accept either.
2010-12-04 15:39:17 +01:00
Matthias Clasen
933440e1f1
Some css parsing tests
2010-12-04 15:39:16 +01:00
Matthias Clasen
0396550ece
Work harder at parsing import statements
...
Also, turn g_warning() into g_message() for now, so that tests
don't abort. Eventually, this needs to all go into GErrors.
2010-12-04 15:39:16 +01:00
Matthias Clasen
11cd19987b
Move import syntax closer to css
...
Css allows @import url ("foo.css") or @import "foo.css" or
@import url ('foo.css') but not @import url(foo.css) or @immport foo.css.
2010-12-04 15:39:16 +01:00
Matthias Clasen
f92c352f96
Some error reporting
...
When we take a GError argument, better use it.
2010-12-04 15:39:16 +01:00
Matthias Clasen
5f13b65065
Fix prototype of gtk_css_style_provider_load_from_data
...
GError arguments must be **.
2010-12-04 15:39:16 +01:00
Matthias Clasen
72f9a7940f
Add an outline around menu popups
2010-12-04 15:39:15 +01:00
Matthias Clasen
c8e5d3b07b
Transform the 'menu' detail string to the 'popup' class
2010-12-04 15:39:15 +01:00
Matthias Clasen
016a656923
Fix prelighting of inconsistent radio and check buttons
2010-12-04 15:39:15 +01:00
Matthias Clasen
b6776dc116
Fix the resize handle drawing
2010-12-04 15:39:15 +01:00
Matthias Clasen
627b33265b
Handle float and uint style properties
...
These were giving errors in testgtk.
2010-12-04 15:39:15 +01:00
Matthias Clasen
f0eafe60f8
Remove debug output
2010-12-04 15:39:14 +01:00
Matthias Clasen
4e778d7371
Fix a typo
2010-12-04 15:39:14 +01:00
Matthias Clasen
512bc44dbc
Make frames visible by default
2010-12-04 15:39:14 +01:00
Matthias Clasen
9ca66efe2c
Fix a memory leak
2010-12-04 15:39:14 +01:00
Matthias Clasen
69f91fed94
Translate detail strings for radio buttons
2010-12-04 15:39:14 +01:00
Carlos Garnacho
25b6945971
GtkThemingEngine: remove unused code
2010-12-04 15:39:13 +01:00
Carlos Garnacho
892fe46324
Fix compile warnings
2010-12-04 15:39:13 +01:00
Carlos Garnacho
c9dc09e980
GtkStyleProvider: Pass a GParamSpec in get_style_property().
...
This is so we can know the owner type of the property, and matching
with the stored strings in GtkCssProvider is direct.
2010-12-04 15:39:13 +01:00
Carlos Garnacho
b613f1f1f2
GtkStyleContext: Also use screen providers for widget style properties.
2010-12-04 15:39:13 +01:00
Carlos Garnacho
13e186bbca
Handle menuitem detail string better.
2010-12-04 15:39:13 +01:00
Carlos Garnacho
9a2d1e5433
GtkSettings: install theme CSS with a lower priority.
...
This is so GtkSettings has an opportunity to modify theme colors.
2010-12-04 15:39:12 +01:00
Carlos Garnacho
0057aa5445
Add corners to GtkJunctionSides, defining sides as 2 corners.
2010-12-04 15:39:12 +01:00
Matthias Clasen
eb8a1c4e33
Don't whine about expander-style missing
...
This check was lost in the GtkStyleContext porting.
2010-12-04 15:39:12 +01:00
Carlos Garnacho
43cff6f6f7
GtkCssProvider: theme notebooks.
2010-12-04 15:39:11 +01:00
Carlos Garnacho
6099399fa7
GtkThemingEngine: Use border settings on render_extension/frame_gap()
2010-12-04 15:39:11 +01:00
Carlos Garnacho
60a2e90df7
GtkStyle: transform tabs' detail string.
2010-12-04 15:39:10 +01:00
Carlos Garnacho
534942d994
GtkThemingEngine: Do not use possible reserved word.
2010-12-04 15:39:10 +01:00
Carlos Garnacho
d4aade109f
Fix gtk_css_provider_get_named() docs.
2010-12-04 15:39:09 +01:00
Carlos Garnacho
c37797a10c
GtkSettings: Keep right refcount of the theme provider.
2010-12-04 15:39:08 +01:00
Carlos Garnacho
611cb007b4
GtkSettings: Ensure the theme CSS is loaded on startup.
2010-12-04 15:39:08 +01:00
Carlos Garnacho
8243c3c025
GtkCssProvider: Fix typo in gtk_css_provider_get_named()
...
provider was being redefined in the inner block, so the loaded
provider didn't get to be returned.
2010-12-04 15:39:08 +01:00
Carlos Garnacho
a185954d7c
Hardcode 3.0 version for style files and paths.
...
It's about time to start using the right paths.
2010-12-04 15:39:07 +01:00
Carlos Garnacho
9ffaf1122d
GtkCssProvider: Accept '%' in value strings.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
64e798e190
Do not initialize RC subsystem.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
62ee0956e3
GtkStyleProperties: Use GParamSpec for properties registration.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
1c847d9c21
GtkCssProvider: Docs fix for -gtk-gradient() syntax.
2010-12-04 15:39:06 +01:00
Carlos Garnacho
bcf81a0e23
Handle looping transition animations.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
1123159dc9
GtkCssProvider: Handle better wrong enum/flag values.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
9bb96e271d
GtkCssProviders: Parse GTypeFlags based values.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
5cb6fed0bd
GtkCssProvider: Add initial unit parsing logic
...
At the moment only "px" are supported, and such is the default
value when no unit is specified.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
65abcb722e
GtkCssProvider: Handle the "none" keyword to unset properties.
2010-12-04 15:39:05 +01:00
Carlos Garnacho
c57fdf4c75
GtkStyleContext: Resolve symbolic colors for widget style properties.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
d865cf4b38
GtkStyleProperties: Handle GdkColor types.
...
Just in case.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
8b9b9c22e7
GtkCssProvider: Also parse GdkColor values
...
This is necessary for widget style properties to work.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
815e3499ae
GtkCssProvider: Add lighter/darker color functions.
...
These behave the same than in GtkStyle.
2010-12-04 15:39:04 +01:00
Carlos Garnacho
cb2f9a86e5
GtkCssProvider: allow color names from rgb.txt when parsing colors.
2010-12-04 15:39:03 +01:00
Carlos Garnacho
44b1a6c852
GtkStyleContext: Add #define's for the default properties.
2010-12-04 15:39:03 +01:00
Carlos Garnacho
1be9d6ebc9
Document missing GtkStateType values.
...
The documentation has also moved to gtkenums.h.
2010-12-04 15:39:02 +01:00
Carlos Garnacho
1487b34679
Remove GTK_STATE_LAST.
...
It didn't turn out to be that useful, nor widely used.
2010-12-04 15:38:56 +01:00
Carlos Garnacho
1fb6cc8d77
Use the correct cairo-gobject.h include path.
2010-12-04 15:38:56 +01:00
Carlos Garnacho
fb97bd1f0a
GtkThemingEngine: Document missing class vmethods.
2010-12-04 15:38:55 +01:00
Carlos Garnacho
4689b63739
GtkButton: Use GtkStyleContext for rendering.
2010-12-04 15:38:55 +01:00
Carlos Garnacho
dc2df7d178
GtkWindow: Use GtkStyleContext for rendering.
2010-12-04 15:38:55 +01:00
Carlos Garnacho
3f12fc2bd8
GtkStyleContext: Add gtk_style_context_set_background().
...
This function replaces gtk_style_set_background().
2010-12-04 15:38:54 +01:00
Carlos Garnacho
d9664021cc
GtkWidget: Update pango context from style context's font description.
2010-12-04 15:38:49 +01:00
Carlos Garnacho
1cfeeadc70
GtkWidget: Ensure the style context always has an screen.
...
Things like font settings depend on the screen, and widgets
like GtkTextView trigger queries on widgets without screen
when the parent window is being destroyed.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
48f239c1f2
Add CSS class defines for toolbars and docks.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
99879d4a5f
GtkStyle: translate a few more detail strings.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
3848a58b17
GtkCssProvider: theme progressbars in default CSS.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
0431239ead
GtkThemingEngine: ensure 1px wide frames aren't painted between pixels.
2010-12-04 15:38:48 +01:00
Carlos Garnacho
f66275fa6a
GtkThemingEngine: Use square cap for solid frames.
2010-12-04 15:38:47 +01:00
Carlos Garnacho
3d1403e684
GtkThemingEngine: ensure that background isn't rendered past the frame boundaries.
2010-12-04 15:38:47 +01:00
Carlos Garnacho
d6ba3b7d89
GtkThemingEngine: Get rid of obsolete code for tooltips.
2010-12-04 15:38:47 +01:00
Carlos Garnacho
661a13fe4d
GtkStyleContext: Fix check for GtkIconSize in render_icon_pixbuf().
2010-12-04 15:38:46 +01:00
Carlos Garnacho
405f2f306a
GtkStyleContext: restore widget state too in restore().
2010-12-04 15:38:45 +01:00
Carlos Garnacho
8b267a58da
GtkCssProvider: Do not miss the last class name in concatenated classes.
...
Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.
2010-12-04 15:38:45 +01:00
Carlos Garnacho
d321713704
GtkStyle: transform window background detail string.
2010-12-04 15:38:44 +01:00
Carlos Garnacho
1ec47b20db
GtkStyle: Transform menubar detail string.
2010-12-04 15:38:43 +01:00
Carlos Garnacho
46b8cc8686
GtkStyle: Transform menu accelerators string
2010-12-04 15:38:42 +01:00
Carlos Garnacho
4c898a3c7e
GtkStyleContext: Define some more class names.
2010-12-04 15:38:42 +01:00
Carlos Garnacho
912ad78cc5
Remove GTK_REGION_DEFAULT
...
GTK_STYLE_CLASS_DEFAULT is preferred to match a default area, as
it doesn't make sense to have a per-region default.
2010-12-04 15:38:41 +01:00
Carlos Garnacho
271145645c
GtkThemingEngine: Use GtkSymbolicColor for shades.
2010-12-04 15:38:41 +01:00
Carlos Garnacho
df95a74a27
GtkThemingEngine: Do not require a default value when registering properties
...
NULL should work for 0 for int/double/enum/... types and NULL for
pointer types, this should be sane enough to not require a default
value.
2010-12-04 15:38:40 +01:00
Carlos Garnacho
765f653df6
GtkSymbolicColor: Only require styleproperties when resolving named colors.
...
It is not necessary for resolving colors based on literals,
so be a bit less strict here.
2010-12-04 15:38:40 +01:00
Carlos Garnacho
525963d74d
GtkSymbolicColor: convert to/from hls when shading.
...
This makes shading equal to GtkStyle's.
2010-12-04 15:38:39 +01:00
Carlos Garnacho
3ea9568c20
GtkSymbolicColor: Do not clamp shade/mix/alpha factors.
2010-12-04 15:38:39 +01:00
Carlos Garnacho
a23863211b
GtkStyleContext: Add gtk_render_icon_pixbuf()
...
This function is similar to gtk_style_render_icon(), which is now
implemented on top of this one.
2010-12-04 15:38:38 +01:00
Carlos Garnacho
06c8857191
GtkThemingEngine: Fix compile warning.
2010-12-04 15:38:38 +01:00
Carlos Garnacho
605fa03248
Fix compile warning
2010-12-04 15:38:37 +01:00
Carlos Garnacho
f2c6c82ff0
GtkStatusIcon: update to use gtk_widget_override_symbolic_color().
2010-12-04 15:38:37 +01:00
Carlos Garnacho
f383e6b0a2
GtkWidget: Add new set of methods to override style information.
...
gtk_widget_override_*() deprecates gtk_widget_modify_*(). There are
only functions to modify fg/bg/font/symbolic color, If anything more
fancy/complex is needed. There is the possibility of adding a
GtkStyleProvider yourself.
2010-12-04 15:38:36 +01:00
Carlos Garnacho
920637abef
GtkStyle: Listen to context changes.
...
This way the GtkStyle is updated to the latest style info, actually
emitting ::style-set must be performed after invalidating the style
context.
2010-12-04 15:38:36 +01:00
Carlos Garnacho
33e95ae65f
GtkStyleContext: Add the start of a default set of class names/regions.
2010-12-04 15:38:36 +01:00