Commit Graph

24096 Commits

Author SHA1 Message Date
Carlos Garnacho
6356f01b06 GtkThemingEngine: render 0-radius frames with 3D-like 45° corner effect 2010-12-04 15:38:27 +01:00
Carlos Garnacho
43f7fb8354 GtkThemingEngine: Clear the background for .background class 2010-12-04 15:38:27 +01:00
Carlos Garnacho
d565e15951 GtkStyle: translate active state in paint_flat_box(). 2010-12-04 15:38:27 +01:00
Carlos Garnacho
087249db07 GtkCssProvider: Update end string when misparsing symbolic colors. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
7d441000f7 GtkCssProvider: Allow '\t' when parsing values. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
4ca3b5071e GtkSymbolicColor: Initialize alpha when resolving shades. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
975f133d63 GtkThemingEngine: Improve rendering of inset/outset borders. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
39ce35dd75 GtkCssProvider: Improve default CSS. 2010-12-04 15:38:26 +01:00
Carlos Garnacho
6bd0865601 GtkStyle: Handle scrollbar buttons. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
490d59f045 Do not shade alpha values. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
3bfc59b9bb GtkStyle: Match "trough" and "slider" detail strings.
This is so scrollbars can be themed throught the "trough" and
"slider" classes.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
4e02218f52 Use GdkRGBA all around in GtkStyleContext. 2010-12-04 15:38:25 +01:00
Carlos Garnacho
3a455ed8f9 GtkStyleSet: Register the border-style and border-color properties
This is also implemented in the theming engine, although the default
CSS should be using it in order to theme buttons, troughs, sliders
and such.
2010-12-04 15:38:25 +01:00
Carlos Garnacho
8d4ffedbf1 GtkStyleContext: '_' prefix the structs, gtk-doc prefers this. 2010-12-04 15:38:24 +01:00
Carlos Garnacho
770f050d8c GtkWidgetPath: turn into a boxed type. 2010-12-04 15:38:24 +01:00
Carlos Garnacho
c9a3da5025 GtkStyleContext: s/set/add/ and s/unset/remove/ for classes/regions.
Several classes and regions may be set to GtkStyleContext, so rename
the functions to be more intuitive.
2010-12-04 15:38:24 +01:00
Carlos Garnacho
161d5175e1 GtkThemingEngine: Honor border-radius in render_background(). 2010-12-04 15:38:24 +01:00
Carlos Garnacho
f7dd423862 GtkStyleSet: Register the "border-radius" property 2010-12-04 15:38:24 +01:00
Carlos Garnacho
32b50f2948 GtkStyleContext: Update function declaration in header. 2010-12-04 15:38:23 +01:00
Carlos Garnacho
0a0a1a20a7 GtkCssProvider: Make it able to parse enums. 2010-12-04 15:38:23 +01:00
Carlos Garnacho
d03caa4683 GtkCssProvider: Run through the widget path in the correct order.
Comparing a selector with a widget path was being done backwards since
the change to use GtkContainer::get_path_for_child().
2010-12-04 15:38:23 +01:00
Matthias Clasen
35a41bd801 Make loading of theming engines from modules work 2010-12-04 15:38:23 +01:00
Carlos Garnacho
d0f681e898 GtkStyleContext: Add gtk_style_context_new(). 2010-12-04 15:38:22 +01:00
Carlos Garnacho
c2f47063c3 GtkCssProvider: Parse default/sorted region flags. 2010-12-04 15:38:22 +01:00
Carlos Garnacho
4a9890e3ab GtkCssProvider: Parse missing widget states. 2010-12-04 15:38:22 +01:00
Carlos Garnacho
68bfb94f69 Change semantics of the methods to check whether an animation is running.
It actually messed up with the state being actually set, and having a
transition animation running for it. Now this dichotomy is removed, and
gtk_style_context_state_is_running() only checks whether an animation is
running, leaving state checking to flags & GTK_STATE_FLAG_*.
2010-12-04 15:38:22 +01:00
Carlos Garnacho
96c16e246c GtkStyleContext: Actually store region ID when starting an animation. 2010-12-04 15:38:21 +01:00
Carlos Garnacho
a79626b7fb Add theming docs
Both API and file format is documented, there's still missing
a migration doc though.
2010-12-04 15:38:21 +01:00
Carlos Garnacho
59b0fa8133 Remove GtkOrientation parameter from gtk_render_handle().
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.
2010-12-04 15:38:21 +01:00
Benjamin Berg
e8c103f652 Use cairo gobject support instead of a new boxed type. 2010-12-04 15:38:20 +01:00
Carlos Garnacho
88a3c2daae GtkGradient: Handle symbolic gradients.
The css parser has been modified to parse correctly radial gradients:

background-image: -gtk-gradient (radial,
                                 center center, 0,
                                 center center, 0.8,
                                 from (#000), to (#fff));

The theming engine has been modified to correctly animate these,
as well as transitions between different pattern types.
2010-12-04 15:38:20 +01:00
Carlos Garnacho
2e8b1cd358 Gtk9Slice: Fix stretch case. 2010-12-04 15:38:20 +01:00
Carlos Garnacho
a65d0d00c0 GtkWidget: Store GtkStyleContext in private struct. 2010-12-04 15:38:19 +01:00
Carlos Garnacho
5bbab9872d GtkStyleContext: Cache style properties accross class/region changes. 2010-12-04 15:38:19 +01:00
Carlos Garnacho
88b78953b6 GtkContainer: Add method to get the GtkWidgetPath for a child.
This is now used throughout in order to have the full path for a given widget,
including intermediate named regions, the default implementation just returns
the GtkContainer's path copy, no intermediate regions between.
2010-12-04 15:38:19 +01:00
Carlos Garnacho
c575733eda GtkStyleContext: Fix animation framework to work with the new draw() semantics.
Invalidation region coalescing now happens recursively as draw() runs, and the
widget's x/y as now drawing coordinates are 0,0 based.
2010-12-04 15:38:18 +01:00
Carlos Garnacho
f9788eb173 GtkCssProvider: Add support for @import rules
Now other CSS files can be referenced from the currently parsed file:

@import url (other-file.css);
@import url (/some/file.css);
2010-12-04 15:38:18 +01:00
Carlos Garnacho
0ef48c0bde GtkCssProvider: no need for resetting the parser prior to parsing data
This is done anyway on each iteration to parse_rule() in parse_stylesheet()
2010-12-04 15:38:18 +01:00
Carlos Garnacho
8e96e4e41f GtkCssProvider: improve file paths parser.
It will now return a full path, and check about the file being sane.
2010-12-04 15:38:18 +01:00
Carlos Garnacho
1772b00e85 GtkCssProvider: Transform custom colors to a @define-color rule.
Given there are other rules such as @import (which will be supported),
keep a sane namespace here, so for (re)defining a color name, in the CSS
file it will look like:

@define-color color-name #fff;
@define-color other-color mix (@color-name, #f00, 0.4);
2010-12-04 15:38:18 +01:00
Carlos Garnacho
a1a90396b7 GtkThemingEngine: Do not return a const GtkThemingEngine on load() 2010-12-04 15:38:18 +01:00
Carlos Garnacho
5c2cf1e934 Plug some leaks. 2010-12-04 15:38:18 +01:00
Carlos Garnacho
5c8a818671 Fix typo in the Gtk9Slice parser. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
5b11d14a49 GtkButton: Notify on prelight state change. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
908babd8ae GtkThemingEngine: Implement animations between gradients/colors. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
d8187b34bb GtkSymbolicColor: Use G_DEFINE_BOXED_TYPE 2010-12-04 15:38:17 +01:00
Carlos Garnacho
7583f31609 GtkStyleContext: Store animation region for a bunch of paint operations. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
fecc079087 GtkStyleContext: Invalidate whole window if no invalidation region is obtained. 2010-12-04 15:38:17 +01:00
Carlos Garnacho
20051e02eb GtkCssProvider: use mapped file to read CSS files. 2010-12-04 15:38:16 +01:00
Carlos Garnacho
80cf01c271 GtkCssProvider: unset filename on load_from_data() 2010-12-04 15:38:16 +01:00