Commit Graph

87 Commits

Author SHA1 Message Date
Cosimo Cecchi
195a235cd4 stylecontext: add a sidebar style class 2011-03-17 17:12:53 -04:00
Cosimo Cecchi
89e565a82f stylecontext: add an inline-toolbar style class 2011-03-17 15:47:04 -04:00
Cosimo Cecchi
e772082a2a stylecontext: add a raised style class
This is useful for raised elements, for example raised buttons on
primary toolbars.

https://bugzilla.gnome.org/show_bug.cgi?id=644248
2011-03-08 20:05:30 -05:00
Cosimo Cecchi
e9182123a8 stylecontext: add a primary toolbar style class 2011-03-03 17:48:26 -05:00
Cosimo Cecchi
d5c4a0f503 all: add a "separator" style class 2011-03-03 17:48:26 -05:00
Matthias Clasen
77e46de0e1 GtkScale: Add style classes for marks
This enables better styling of the slider in the presence of
marks. Based on a patch by Bastien Nocera,
https://bugzilla.gnome.org/show_bug.cgi?id=643685
2011-03-03 16:49:49 -05:00
Benjamin Otte
ccc3679a62 stylecontext: Use the common approach for priate pointers
Has two advantages:
1) consistency
2) "print *context->priv" actually works in gdb
2011-02-11 23:21:11 +01:00
Michael Natterer
3933f99ed7 gtk: add missing class padding
Sorry for this late ABI break, but the newly added style classes
definitely need padding, so I can just as well add missing padding
globally.
2011-01-25 22:29:00 +01:00
Matthias Clasen
a12dad75a2 Split out private style context api into a private header 2011-01-23 18:29:28 -05:00
Carlos Garnacho
0b7496558d Make GtkCssProvider deal with widget types not being in plain CamelCase
Fixes bug #Bug 639754, reported by Kjell Ahlstedt. gtkmm doesn't
use plain CamelCase for its widget type names, so in order to
distinguish widget type names from regions in the CSS parser,
the following checks are now done:

* if it contains an uppercase letter -> widget class (that should
  also work for gtkmm)

* if it's a string compound by lowercase letters and '-' -> it's
  a region, checks have been added in gtk_style_context_add_region()
  and gtk_widget_path_iter_add_region() to ensure this.
2011-01-19 04:28:49 +01:00
Milan Bouchet-Valat
44da5a0094 Improve docs about GtkStyleContext padding/border/margin
GTK_STYLE_PROPERTY_BORDER_WIDTH is of style GtkBorder, not gint.

Also make it clearer what the definition and ordering of these 3
properties is. Reorder them in the header to be more logical.
2011-01-11 12:28:54 +01:00
Carlos Garnacho
48a4f88ab1 Mark orientable widgets with the vertical/horizontal css classes
This can be used to theme widgets differently depending on the
orientation. Bug 639157, reported by Christian Dywan.
2011-01-10 23:53:29 +01:00
Carlos Garnacho
4c4df23d12 GtkThemingEngine: Fix handles rendering
The wrong class was being used, so the theming engine didn't
match it properly.
2011-01-10 23:52:36 +01:00
Carlos Garnacho
de36dda925 Add gtk_style_context_scroll_animations()
This function will be needed in widgets like GtkTreeView,
since gdk_window_scroll() doesn't trigger the usual
mechanisms to update the invalidation area, this function
is needed together with it.
2011-01-10 20:49:41 +01:00
Carlos Garnacho
e6277d3b82 Add gtk_style_context_cancel_animations()
This function takes a region ID and cancels all animations
on or beneath that region (as in push/pop_animatable_region).

First user of this is GtkWidget itself, so unmapped widgets
have looping animations cancelled. Fixes bug #638119, reported
by Jesse van den Kieboom.
2011-01-10 03:50:01 +01:00
Carlos Garnacho
96d8f85dcc Make DnD code use GtkStyleContext for the highlight rectangle. 2011-01-04 03:06:20 +01:00
Carlos Garnacho
7981869308 Update GtkAssistant to GtkStyleContext 2011-01-04 03:06:08 +01:00
Carlos Garnacho
06462b98a0 Make GtkFrame use GtkStyleContext. 2010-12-28 19:18:57 +01:00
Carlos Garnacho
66800aa212 Make GtkTextView use GtkStyleContext
GtkTextAppearance still uses GdkColors, even though it could
switch to GdkRGBA with little hassle as it seems sheldomly used
out there.
2010-12-15 03:17:58 +01:00
Carlos Garnacho
ee31a016ec Make GtkInfoBar use GtkStyleContext
All colors are defined now in the default css, and classes have
been added so the bars are fully themeable (as opposed to
gtk_widget_override_*, which require changing the color map itself)
2010-12-14 02:29:57 +01:00
Carlos Garnacho
a517cf1bed Make GtkExpander use GtkStyleContext 2010-12-13 22:31:30 +01:00
Carlos Garnacho
89e6cad92f GtkSpinButton: Use GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho
c64a1891f8 Port GtkRange widgets to GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho
3306305fe1 GtkNotebook: Use GtkStyleContext. 2010-12-13 22:31:29 +01:00
Carlos Garnacho
99f59d8266 Fix coalescing of state animation areas for multiple window widgets.
Coordinates needed to be translated relative to the window position
in within the widget.
2010-12-13 22:31:27 +01:00
Paolo Borelli
f285a84bd6 Add convenience function for the font description. 2010-12-13 22:31:27 +01:00
Benjamin Otte
3070d6e3d5 Revert "docs: Reinstate pixbufs section in GDK docs"
I committed my whole working tee instead of just one file. Ooops.
This reverts commit ded14b2562.
2010-12-09 23:55:33 +01:00
Benjamin Otte
ded14b2562 docs: Reinstate pixbufs section in GDK docs
It was accidentally removed in 0775b0a858
2010-12-09 11:14:21 +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 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
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
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
Carlos Garnacho
4027dceaa9 Add #define for the "spinner" style class 2010-12-04 15:39:44 +01:00
Carlos Garnacho
44b1a6c852 GtkStyleContext: Add #define's for the default properties. 2010-12-04 15:39:03 +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
48f239c1f2 Add CSS class defines for toolbars and docks. 2010-12-04 15:38:48 +01:00
Carlos Garnacho
4c898a3c7e GtkStyleContext: Define some more class names. 2010-12-04 15:38:42 +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
33e95ae65f GtkStyleContext: Add the start of a default set of class names/regions. 2010-12-04 15:38:36 +01:00
Carlos Garnacho
ebf5bd390f Add gtk_render_activity()
This method will render progress bars and spinners, these should
handle active and inconsistent states' animation progress in order
to perform animations.
2010-12-04 15:38:33 +01:00
Carlos Garnacho
4e02218f52 Use GdkRGBA all around in GtkStyleContext. 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
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
32b50f2948 GtkStyleContext: Update function declaration in header. 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
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
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
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