Commit Graph

107 Commits

Author SHA1 Message Date
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Cosimo Cecchi
1411020a8b stylecontext: add a "scrollbars-junction" style class
It will be used in the following commit.

https://bugzilla.gnome.org/show_bug.cgi?id=669335
2012-02-29 10:25:00 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Paolo Borelli
f73ff748db Add a deprecation mark to draw_insertion_cursor
This function has been replaced with gtk_render_insertion_cursor, but we
forgot to mark it as deprecated.
2012-02-27 17:48:37 +01:00
Matthias Clasen
2c25bd85b8 gtk: Use versioned deprecations
This patch changes all uses of GDK_DEPRECATED(_FOR) in gtk headers
by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same
time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions
in 3.2 and 3.4.
2012-02-27 07:11:43 -05:00
Benjamin Otte
a815f10299 API: Add gtk_style_context_get_section()
This API allows querying the location where style properties were
defined. An example implementation will be committed soon.
2012-01-11 15:48:54 +01:00
Benjamin Otte
b50d2b74d7 API: Add GtkStyleContext::parent
We need this for proper support of CSS inherit.
2012-01-09 18:37:50 +01:00
Cosimo Cecchi
c538fb8f64 stylecontext: add GTK_STYLE_CLASS_ARROW
For e.g. submenu items arrow in GtkMenuItems.

https://bugzilla.gnome.org/show_bug.cgi?id=665420
2011-12-05 09:30:57 -05:00
Paolo Borelli
2ef5844bac Introduce gtk_render_insertion_cursor
The new function provides an API that takes the PangoLayout and index
as input params, this way it handles strong and weak cursors internally
factoring out all code duplicated in the widgets that need to render
cursors.

https://bugzilla.gnome.org/show_bug.cgi?id=640317
2011-12-01 01:22:39 +01:00
Cosimo Cecchi
6740121fab stylecontext: add GTK_STYLE_CLASS_LINKED
"linked" is a style class for linked areas, such as a box containing
buttons belonging to the same control.
2011-11-28 14:41:48 -05:00
Alexander Larsson
ca829b484c Add pulse style class and use in progress bar and entry
This is used for indeterminate progress reporting.
2011-11-18 10:15:04 +01:00
Marc-André Lureau
3b436eec6d css: start background-repeat
By default, a background image is stretched. Instead, it is worth to
have a tiled background.

This patch allows background surfaces to be repeated or not, and should
be compatible with future extensions and CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 11:10:44 -05:00
Matthias Clasen
98db3dd5dd Move gtk_draw_insertion_cursor out of gtkstyle.[hc]
This function does not use GtkStyle at all and is not deprecated.
2011-11-01 23:51:18 -04:00
Cosimo Cecchi
8d3f7e3a4a stylecontext: add style classes for top/bottom/right/left areas
This is useful to e.g. theme notebook tabs differently according to
their position directly from the CSS sheet.

GtkNotebook support in a separate commit.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
7e22b46c1f combobox: add a "combobox-entry" style class for comboboxes with entries
This way themes can use GtkComboBox.combobox-entry to match that
specific case, and GtkComboBox.combobox-entry .button to match the
button/arrow side of the widget.
2011-08-09 16:08:00 +02:00
Matthias Clasen
1164ceb4fc GtkStyleContext: add some aux. a11y api
This function translates the fg/bg color into atk attributes.
2011-07-05 16:08:07 -04:00
Matthias Clasen
c2449763ce Fix up docs for predefined style classes.
The table was incomplete and out of date. Instead, just
put a list of links in that place, and move all the extra
documentation to the macros. Bug 653785
2011-06-30 19:18:26 -04:00
Javier Jardón
bf0d8402f5 gtk: Use const instead G_CONST_RETURN 2011-06-10 13:07:54 +01:00
Cosimo Cecchi
430f6ecbc3 stylecontext: add an "image" style class
For images such as icons in GtkEntry widgets.
2011-06-09 23:17:09 +02:00
Cosimo Cecchi
514e77581a stylecontext: add gtk_render_icon() 2011-06-09 23:17:09 +02:00
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