Commit Graph

142 Commits

Author SHA1 Message Date
Matthias Clasen
9bc07a2634 Add a message-dialog style class
This helps in separating message dialogs from other dialogs,
theming-wise.
2014-06-12 09:22:36 -04:00
Matthias Clasen
e97cf2fd0b Add GTK_STYLE_CLASS_POPUP to the docs 2014-06-12 09:22:06 -04:00
Matthias Clasen
60cd7076cf Add a csd style class
This will be used for client-side decorated windows.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:01:42 -04:00
Matthias Clasen
bf8a169cb9 docs: Another round of markup removal 2014-03-29 00:24:15 -04:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
a4b5929e81 docs: use apostrophe in *'re 2014-02-07 13:37:09 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
3c4dbe6c7a Add GTK_STYLE_CLASS_DESTRUCTIVE_ACTION 2014-02-07 10:28:53 -05:00
William Jon McCann
de42376122 Add GTK_STYLE_CLASS_SUGGESTED_ACTION 2014-02-07 10:28:52 -05:00
Benjamin Otte
0e6a9858e1 stylecontext: Deprecate gtk_style_context_invalidate()
Everything is invalidated automatically these days.
2013-10-05 13:57:51 +02:00
Paolo Borelli
e59c28743a Add a needs-attention child property to GtkStack
The child property is watched by the StackSwicther which in turns sets a
needs-attention css class on the corresponding button, so that the theme
can for instance show a throbbing animation if one of the hidden pages
needs the user attention.

https://bugzilla.gnome.org/show_bug.cgi?id=707153
2013-09-25 22:34:22 -04:00
David Trowbridge
a864f9d052 Fix GtkEntry drawing to provide visual feedback when editable=FALSE.
GtkEntry currently draws exactly the same no matter what the state of the
'editable' property. This is pretty confusing for users because there's
no visual feedback at all, it just seems like their keyboard is broken.

This change adds a "read-only" class to the StyleContext, which will
continue to allow the user to select/copy the text, but will draw the
entry as if it were insensitive, providing some indication that the
contents can't be changed.

Signed-off-by: David Trowbridge <trowbrds@gmail.com>

http://bugzilla.gnome.org/show_bug.cgi?id=694831
2013-08-19 13:41:39 -04:00
Matthias Clasen
624ec0fb7d Add a style class for context menus
Attached widgets inherit from the style of the widget they are
attached to. This can sometimes have unintended consequences,
like a context menu in the main view of gedit inheriting the font
that is configured for documents, or the context menu of the preview
in the font chooser coming up with humongous font size.

To fix this problem, we introduce a context menu style class
and use it for all menus that are used like that. The theme
can then set a font for this style class.

https://bugzilla.gnome.org/show_bug.cgi?id=697127
2013-08-18 13:46:48 -04:00
Cosimo Cecchi
3ea0e4a019 stylecontext: add GTK_STYLE_CLASS_TITLEBAR define
For consistency with the other stock style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
2013-08-16 23:12:22 -04:00
Kjell Ahlstedt
4d86472b92 Continue the deprecation of GtkIconSet
Deprecate gtk_icon_set_render_icon_surface() and gtk_image_get_icon_set(),
which take parameters of the deprecated GtkIconSet.

https://bugzilla.gnome.org/show_bug.cgi?id=703616
2013-07-09 06:54:27 -04:00
Kjell Ahlstedt
16c08ae135 Fix some inconsistent deprecations
Some functions had only a deprecation comment in the .c file, or only a
deprecation annotation in the .h file. Add the missing parts.

https://bugzilla.gnome.org/show_bug.cgi?id=703616
2013-07-09 06:54:26 -04:00
Alexander Larsson
635ae9bd91 icon factory: Add gtk_icon_set_render_icon_surface
Support scales when falling back to loading icons from the
icon theme.

In order to actually render scaled icons we add
gtk_icon_set_render_icon_surface which renders to a cairo_surface_t
which includes whatever scaling you need for scaled icons.
2013-07-03 14:39:26 +02:00
Alexander Larsson
91a268f00e stylecontext: add gtk_render_icon_surface
This draws an icon from a cairo_surface. We want to use this more rather
than render_icon as this means we can skip the pixbuf to surface
conversion (including allocation and alpha premultiplication) at
render time, plus we can use create_similar_image which may allow
faster rendering.
2013-07-03 14:39:26 +02:00
Alexander Larsson
4cc1fe5bf5 GtkStyleContext: Add gtk_style_context_get/set_scale 2013-07-03 14:39:25 +02:00
Alexander Larsson
1dd0b468a7 GtkListBox: Add style classes for lists and rows 2013-06-13 12:17:07 +02:00
Matthias Clasen
20c8c8b91c Add annotations to gtk headers
Add annotations to all exported functions in GTK+ headers.
2013-05-05 15:38:47 -04:00
Owen W. Taylor
449e8c8856 Add gtk_widget_add_tick_callback(), remove GtkTimeline, etc.
Add a very simple GtkWidget function for an "tick" callback, which
is connected to the ::update signal of GdkFrameClock.

Remove:

 - GtkTimeline. The consensus is that it is too complex.
 - GdkPaintClockTarget. In the rare cases where tick callbacks
    aren't sufficient, it's possible to track the
    paint clock with ::realize/::unrealize/::hierarchy-changed.

GtkTimeline is kept using ::update directly to allow using a GtkTimeline
with a paint clock but no widget.
2013-02-14 17:19:52 -05:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Benjamin Otte
52768ee6ec stylecontext: Deprecate direction property
...  and the functions implementing it. Also deprecate the direction
getter on GtkThemingEngine.
2012-12-18 18:25:42 +01:00
Benjamin Otte
9ae9649188 stylecontext: Deprecate gtk_style_context_get_font()
This is for a very simple reason: The getter is returning a const value
and the font isn't const anymore. So we need to store the font
description somewhere but we can't reuse it as it's changing all the
time (yay animations, yay inherited values). Sucks.

So keep the hack in here but deprecate the function.
2012-12-06 02:57:19 +01:00
Carlos Garnacho
63c75a2384 texthandles: Add an extra style class to the cursor-mode handle
Themes may want to render handles differently depending on whether
the widget is in selection mode (2 handles enclosing a selection) or
cursor mode (one handle pointing out the insertion cursor).
2012-10-26 18:38:38 +02:00
Carlos Garnacho
81045779f6 Improve CSS styling of touch text selection handles
Don't hook on the widget style context and set up instead
a widget path for itself. Also use a common style class
for both handles, with an extra top/bottom class for each
handle.
2012-09-03 17:08:02 +02:00
Carlos Garnacho
1f7e375c33 Add GtkTextHandle
This is a helper object to allow text widgets to implement
text selection on touch devices. It allows for both cursor
placement and text selection, displaying draggable handles
on/around the cursor and selection bound positions.

Currently, this is private to GTK+, and only available to
GtkEntry and GtkTextView.
2012-09-03 00:19:03 -04:00
Cosimo Cecchi
68acf78c5d level-bar: introduce GtkLevelBar
Similar to CcStrengthBar from gnome-control-center, but more generic and
with thorough CSS styling support.

https://bugzilla.gnome.org/show_bug.cgi?id=677892
2012-07-16 01:01:38 -04:00
Matthias Clasen
5de021cfdc Revert "level-bar: introduce GtkLevelBar"
This reverts commit 126a2308ca.

Pushed by mistake.
2012-07-11 07:15:34 -04:00
Cosimo Cecchi
126a2308ca level-bar: introduce GtkLevelBar
Similar to CcStrengthBar from gnome-control-center, but more generic and
with thorough CSS styling support.

https://bugzilla.gnome.org/show_bug.cgi?id=677892
2012-07-10 22:41:12 -04:00
Debarshi Ray
1d5ba789d5 stylecontext: Add GTK_STYLE_CLASS_DIM_LABEL
Fixes: https://bugzilla.gnome.org/674468
2012-04-27 14:55:49 +02:00
Cosimo Cecchi
a94f4a4387 stylecontext: add a define for an OSD style class 2012-04-19 15:10:52 -04:00
Cosimo Cecchi
00440e32a4 stylecontext: reorder style classes defines
A couple of style classes defines ended up mixed with the region
defines.
2012-04-19 15:10:52 -04:00
Benjamin Otte
04c5fdaca6 css: Remove old animation code
Deprecate public API where appropriate and make it no-ops.
Remove all calls to it.
Get rid of the 'transition' css property.

For now, this means spinners don't animate anymore.
2012-04-17 08:59:19 +02:00
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