Matthias Clasen
f2ab9e497d
Prepare the stylecontext test to run out-of-srcdir
...
This is necessary to make distcheck work.
2010-12-06 14:13:07 -05:00
Matthias Clasen
ad80cb6279
Allow + in identifiers
...
This is necessary since we treat paths as identifiers in
@import rules, and it is common to have a + in there (at least
when distchecking gtk+ ...)
2010-12-06 14:13:07 -05:00
Benjamin Otte
fc711434bc
gtk: Remove old DirectFB code for drawing window decorations
...
I'm not sure it'd even compile.
2010-12-06 18:57:11 +01:00
Murray Cumming
d23fb64d97
Fix a typo to fix the build.
2010-12-06 16:01:55 +01:00
Matthias Clasen
5f75ffc974
Add gtk_widget_path_get_type to the headers
...
Bug 636591
2010-12-06 09:50:01 -05:00
Matthias Clasen
f1fafca6ca
Make invalid stylesheets fail to parse again
...
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.
This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
2010-12-06 00:47:13 -05:00
Matthias Clasen
94c9eb72ce
Don't use g_warning when loading an engine fails
...
This causes the tests to abort if clearlooks can't be found.
2010-12-06 00:44:01 -05:00
Benjamin Otte
d378470e87
appchooser: Remove bogus function declaration
2010-12-06 01:30:19 +01:00
Benjamin Otte
6d6ee9a26a
style: Remove unused code
2010-12-06 01:02:52 +01:00
Benjamin Otte
645d0ac403
API: gdk: Remove depth argument from gdk_window_get_geometry()
...
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Paolo Borelli
b36cb87df9
Use the new style context API in GtkButton
...
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
2010-12-05 23:12:32 +01:00
Paolo Borelli
4a7e746bbc
Use the new style context API in GtkLabel.
2010-12-05 22:07:30 +01:00
Paolo Borelli
561346bd40
Remove unused function modify_color_property
2010-12-05 22:07:30 +01:00
Carlos Garnacho
4cca7554b8
GtkStyleContext: warn on meaningless coords in gtk_render_* calls
2010-12-05 20:19:55 +01:00
Carlos Garnacho
5361490db8
Bug 636511 - New style override functions do not work on textview
...
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
2010-12-05 20:19:55 +01:00
Matthias Clasen
d5df33c75f
Fix abi check after recent merges
2010-12-05 12:18:30 -05:00
Kristian Rietveld
137f16c4c5
Do not bother starting a draw call if bar_size <= 0
2010-12-05 13:57:04 +01:00
Paolo Borelli
e0efd067e4
Avoid memory corruption in the color_properties hashtable.
2010-12-05 12:30:28 +01:00
Javier Jardón
d351b40a0b
Add internal accessor for GtkEntry->is_cell_renderer
...
This fixes commit fb3429e507
2010-12-04 22:06:02 -05:00
Carlos Garnacho
37719380ae
Fix call to gtk_widget_override_cursor()
2010-12-04 18:26:34 +01:00
Carlos Garnacho
3d28adf317
Make gtk_widget_override_cursor() take GdkRGBAs
...
Even though the style properties have the GdkColor type, the other
gtk_widget_override_* API takes RGBA colors, so it is consistent
now.
2010-12-04 17:49:28 +01:00
Carlos Garnacho
1c87180d5d
GtkThemingEngine: Fix parameters for gtk_theming_engine_lookup_color()
2010-12-04 15:39:58 +01:00
Carlos Garnacho
0cba2dc726
GtkCssProvider: Improve error handling and reporting.
...
Nicer error reports are provided, and a GError can be spread from
anywhere in parsing, so over time more precise and meaningful
messages can be produced.
2010-12-04 15:39:57 +01:00
Carlos Garnacho
06d8676354
GtkThemingEngine: Be a bit more robust against missing essential properties.
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos
07eeae1582
GtkWidget: add gtk_widget_render_icon_pixbuf()
...
and deprecate gtk_widget_render_icon()
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos
905ba2f198
GtkIconFactory: add gtk_icon_set_render_icon_pixbuf()
...
and deprecate gtk_icon_set_render_icon().
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos
b75972d0ce
GtkStyle: set style context state before calling gtk_render_icon_pixbuf()
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
ca59b042df
GtkStyle: make context property readable
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
15d997d58a
GtkWidget: queue a resize when style context changed
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
f261d56da3
GtkStyleContext: invalidate icon caches when resetting widgets
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
3b3307b946
Use gtk_style_context_reset_widgets() instead of gtk_rc_reset_styles()
2010-12-04 15:39:56 +01:00
Carlos Garcia Campos
a8c8c23c77
GtkSettings: add _gtk_settings_get_screen() private method
2010-12-04 15:39:55 +01:00
Carlos Garnacho
47add6c7c3
Block direct #including in style headers
2010-12-04 15:39:55 +01:00
Carlos Garnacho
bacb7906f2
Add helper API for getting colors/borders in GtkStyleContext/GtkThemingEngine
2010-12-04 15:39:55 +01:00
Carlos Garnacho
3e8d138ed6
GtkStyleProperties: Refactor color/gradient resolution
2010-12-04 15:39:55 +01:00
Carlos Garnacho
9aca6c8071
GtkWidget: Add gtk_widget_override_cursor().
...
This function replaces gtk_widget_modify_cursor().
2010-12-04 15:39:54 +01:00
Carlos Garnacho
b0c87faa50
Add GtkModifierStyle as a private object
...
This object backs up gtk_widget_override_* operations. This object
is not meant to be public because any intention to modify widgets'
style in a themeable way should involve using regions/classes, so
they're modifiable through CSS. As such, the API is really
short-scoped.
2010-12-04 15:39:54 +01:00
Carlos Garnacho
0d2d60cf8a
Gtk9Slice: Fix stretch rendering.
...
"Nearest" filter used when scaling the image, so image borders
aren't blurred.
2010-12-04 15:39:54 +01:00
Carlos Garnacho
afeac82fbd
GtkThemingEngine: Add gtk_theming_engine_lookup_color()
...
It could also be handy for theme engines...
2010-12-04 15:39:53 +01:00
Carlos Garnacho
066f35bf28
Parse user CSS from $XDG_CONFIG_HOME/gtk-3.0/gtk.css
2010-12-04 15:39:53 +01:00
Carlos Garnacho
9bdb7e6945
GtkThemingEngine: Remove unused variables
2010-12-04 15:39:53 +01:00
Carlos Garnacho
901af8fec8
Fix compiler warnings.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
cf0bd12e6c
GtkStyleProperties: Turn border-width into a GtkBorder property.
...
All current users of this CSS property have been updated to deal
with a GtkBorder.
Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho
f7e7201f11
Fix docs typo.
2010-12-04 15:39:51 +01:00
Carlos Garnacho
daab45565a
GtkCssProvider: Fix up state matching when looking up style properties.
2010-12-04 15:39:51 +01:00
Carlos Garnacho
297fa7a3dd
GtkStyleProvider: Add GtkStateFlags parameter to get_style_property().
...
Widget style properties can now have different values depending on the
current state.
2010-12-04 15:39:51 +01:00
Carlos Garnacho
2ca905db5e
GtkStyleContext: Handle directionality when picking next provider.
2010-12-04 15:39:50 +01:00
Carlos Garnacho
46de2130d3
GtkWidget: unset NULL properties when overriding style.
2010-12-04 15:39:50 +01:00
Carlos Garnacho
64b7d9e5c1
GtkThemingEngine: Render gradients in tabs.
...
Background will be actually rotated in tabs, so the "bottom" side coincides
with the junction point, this makes gradients work as expected in rotated tabs.
2010-12-04 15:39:50 +01:00
Carlos Garnacho
32c2b13969
GtkThemingEngine: split background rendering to a private function.
2010-12-04 15:39:50 +01:00
Carlos Garnacho
4c1a2426d4
GtkStyle: Commit a few typos when translating states.
2010-12-04 15:39:49 +01:00
Carlos Garcia Campos
4aaf193602
docs: gtk_style_context_get_screen() always returns a valid screen
2010-12-04 15:39:49 +01:00
Carlos Garcia Campos
7a5a622998
Check screen really changed before notifying it and invalidating the context
2010-12-04 15:39:49 +01:00
Carlos Garcia Campos
7abf76fbc1
Initialize screen of GtkStyleContext to default screen
2010-12-04 15:39:48 +01:00
Matthias Clasen
587c08a151
Add explanation to failing test
2010-12-04 15:39:48 +01:00
Matthias Clasen
12d6b5889d
Add a testcase a problem with style property handling
2010-12-04 15:39:48 +01:00
Matthias Clasen
f86e8f7512
Allow images for background-image
...
In addition to -gtk-gradient(...), allow url(path), and create
a pattern from the image. Still to do: allow stretch/repeat options.
2010-12-04 15:39:48 +01:00
Matthias Clasen
ca143b1303
Add list of classes and regions to the docs
2010-12-04 15:39:48 +01:00
Matthias Clasen
897c370f5f
Avoid compiler warnings
2010-12-04 15:39:47 +01:00
Matthias Clasen
5adfe6029d
Don't add class "scrollbar" for every trough
...
Turns out "trough" as a detail string is used in a variety
of widgets, not all of which are scrollbars.
2010-12-04 15:39:47 +01:00
Matthias Clasen
2578f4f4c3
Trivial doc fixes
2010-12-04 15:39:47 +01:00
Matthias Clasen
e598f17871
Some header cleanups
...
Move GtkGradient to their own files, also move GtkBorder out of
gtkstyle.h, so that header can be all deprecated.
2010-12-04 15:39:47 +01:00
Matthias Clasen
1915a19503
Add deprecation notes
2010-12-04 15:39:46 +01:00
Matthias Clasen
f8a874abb1
Initial attempt at deprecating GtkStyle api
...
This will probably need some finetuning.
2010-12-04 15:39:46 +01:00
Matthias Clasen
bbca96044e
Fix memory handling when dealing with colors
2010-12-04 15:39:45 +01:00
Matthias Clasen
53c2114356
Deprecate gtk_icon_info_load_symbolic_for_style
...
We might end removing it altogether since it is a bit silly to have
Since: 3.0
Deprecated: 3.0
2010-12-04 15:39:45 +01:00
Carlos Garnacho
e9ef162d4c
GtkSpinner: Use style context for rendering.
...
Animation is now handled by the theming layer, a looping animation
has been defined in the default CSS to handle active spinners.
2010-12-04 15:39:45 +01:00
Carlos Garnacho
3d956b10ee
GtkStyleContext: handle prelight transitions
2010-12-04 15:39:44 +01:00
Carlos Garnacho
c90bee16ba
GtkThemingEngine: Handle prelight transitions in render_layout()
2010-12-04 15:39:44 +01:00
Carlos Garnacho
e696c24f08
GtkThemingEngine: Also render topright and bottomleft corners if junction sides say so
2010-12-04 15:39:44 +01:00
Carlos Garnacho
11004ef61d
Initialize all looping, active state transitions on map()
...
This allows widgets to gtk_widget_set_state_flags() before mapping
and have animations started anyway when this happens.
2010-12-04 15:39:44 +01:00
Carlos Garnacho
4027dceaa9
Add #define for the "spinner" style class
2010-12-04 15:39:44 +01:00
Carlos Garnacho
62e9188ff3
GtkStyleContext: store layout extents for animation purposes.
2010-12-04 15:39:43 +01:00
Carlos Garnacho
818aca5aee
GtkStyleContext: Only allow looping transitions for states being turned on.
2010-12-04 15:39:43 +01:00
Carlos Garnacho
ad6da0cdb8
GtkStyleContext: Stop animations if the window is gone.
2010-12-04 15:39:43 +01:00
Carlos Garnacho
cc18d65986
GtkThemingEngine: render square corner if the gap is too close on render_frame_gap()
2010-12-04 15:39:43 +01:00
Matthias Clasen
f0eed4a5b1
Use gtk_icon_info_load_symbolic_for_context
...
gtk_icon_info_load_symbolic_for_style is going to be deprecated.
2010-12-04 15:39:43 +01:00
Matthias Clasen
f90881271f
Add a GtkStyleContext-variant of symbolic icon loading
2010-12-04 15:39:42 +01:00
Matthias Clasen
0f98b15090
Add illustration to gtk_render_handle docs
2010-12-04 15:39:42 +01:00
Matthias Clasen
3ddee2561b
Small doc addition
2010-12-04 15:39:42 +01:00
Matthias Clasen
d1f1af202b
Add a frame-gap illustration
2010-12-04 15:39:42 +01:00
Matthias Clasen
1391a61bc5
Improve frame-gap drawing
...
Instead of overdrawing the gap with bg-color, clip it away.
2010-12-04 15:39:42 +01:00
Matthias Clasen
54eadfcefd
Fix another parameter mismatch
2010-12-04 15:39:42 +01:00
Matthias Clasen
b51c0f826a
fix parameter name mismatch
2010-12-04 15:39:41 +01:00
Carlos Garnacho
9c0ef02ea5
GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
...
There is now code to handle this for one-item widgets (such as GtkButton)
in gtk_widget_set_state_flags()
2010-12-04 15:39:41 +01:00
Carlos Garnacho
2f0b5d8a9d
GtkCheckButton: Look active when the pointer button is pressed and hovering
2010-12-04 15:39:41 +01:00
Carlos Garnacho
037c982824
GtkStyleContext: Handle empty areas when coalescing invalidation regions.
2010-12-04 15:39:41 +01:00
Carlos Garnacho
2fb9687f55
GtkToggleButton: Make it able to be prelight and active at the same time.
2010-12-04 15:39:40 +01:00
Carlos Garnacho
1d5a6b687e
GtkComboBox: Use style context for rendering
2010-12-04 15:39:40 +01:00
Carlos Garnacho
c6b2e47931
Let gtk_widget_get_path() correct early calls during init().
2010-12-04 15:39:40 +01:00
Carlos Garnacho
ebd8463007
GtkCssProvider: Handle unfocused label selections in default CSS.
2010-12-04 15:39:40 +01:00
Carlos Garnacho
90dd2eb42b
GtkLabel: Use style context for rendering.
2010-12-04 15:39:40 +01:00
Carlos Garnacho
0fce9342ef
GtkThemingEngine: Draw 3D-like effects on square frames with lines.
2010-12-04 15:39:40 +01:00
Carlos Garnacho
3138cc7677
GtkThemingEngine: Render rounded frames with light/shadow connections at 45°
2010-12-04 15:39:39 +01:00
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