Commit Graph

176 Commits

Author SHA1 Message Date
Timm Bäder
e36ddfec17 Remove all widget style property code 2017-07-19 21:27:14 -04:00
Benjamin Otte
95a2a5c54c gtk: Remove GtkJunctionSides 2016-12-20 18:01:12 +01:00
Benjamin Otte
bcf70e3a03 API: Remove everything relating to "grip"
Grips have long been unused in GTK, so remove all support for them.
This removes the GTK_STYLE_CLASS_GRIP and the special
gtk_render_handle() code for drawing those grips.
2016-11-16 19:27:43 +01:00
Rico Tzschichholz
502e63eddc stylecontext: Remove deprecated API 2016-10-23 18:23:59 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Benjamin Otte
9b9b475f0a API: stylecontext: Remove regions 2016-10-16 18:17:21 +02:00
Benjamin Otte
66dd954290 API: stylecontext: Remove old unused animation functions 2016-10-16 18:17:21 +02:00
Timm Bäder
f2c455fedb Remove GtkThemingEngine
As well as the corresponding GtkCssEngineValue used to parse it in css.
2016-10-16 18:17:21 +02:00
Timm Bäder
58a76b700f stylecontext: Remove _REGION_ constants 2016-10-16 18:17:21 +02:00
Timm Bäder
ed184b3935 Remove GtkIconFactory
Move the icon size lookup API into gtkicontheme.c
2016-10-16 18:17:21 +02:00
Timm Bäder
9fd1a1bbe3 widget: Remove cursor-aspect-ratio/window-dragging style properties
And replaces its usages in GtkTextView/GtkStyleContext with a hard-coded
0.04 which was the default value for cursor-aspect-ratio.  Also remove
the public gtk_draw_insertion_cursor which used draw_insertion_cursor
which in turn looked up cursor-aspect-ratio
2016-10-16 18:17:21 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Bernhard Reutner-Fischer
5a04edc57b docs: typo in GTK_STYLE_CLASS_LIST_ROW docs
Fix typo in documentation of GTK_STYLE_CLASS_LIST_ROW: s/rowss/rows/g

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=765632
2016-04-26 16:41:52 -04:00
Matthias Clasen
b035cc2cb6 Update style class docs
Instead of pointing to (outdated) widgets here, just refer to
widget docs in general.
2016-01-10 17:08:56 -05:00
Matthias Clasen
2e921691d9 Redo CSS style printing
Drop the custom style printing implementation in gtkcssnode.c and
instead reuse the existing gtk_css_style_print function, extending
it a bit to suit our needs.

Instead of computing values, just recognize initial values by
having no CSS section. Also do away with the show-initial flag, and
just always filter out initial values. The flag can come back when
it is needed.
2016-01-03 15:36:48 -05:00
Matthias Clasen
68edc47f6a Add a function to dump CSS nodes and styles
Add a gtk_style_context_to_string function that can serialize
a CSS node or tree of nodes, optionally including CSS properties
as well.

This will be useful in writing tests.
2016-01-03 09:19:30 -05:00
Cosimo Cecchi
a5a5091555 stylecontext: fix gtk-doc comment syntax 2015-12-22 11:56:23 -08:00
Cosimo Cecchi
a1e80d99d2 stylecontext: deprecate gtk_style_context_set_background()
Nothing in GTK calls it anymore.
2015-07-01 16:09:23 -07:00
Matthias Clasen
b73578f95d Add a scrollable indication
Draw a themable indication when an edge of a scrolled window
is hiding some content that can be scrolled in.
2014-12-10 10:00:21 -05:00
Lapo Calamandrei
4aca13e39e Statusbar: add 'statusbar' style class 2014-11-11 17:23:04 +01:00
Matthias Clasen
cf0c9eb158 GtkPaned: Add a "wide-handle" property
This can be used by applications to indicate that a paned is expected
to be actively used by the users for configuring the UI, and needs
a prominent handle.

https://bugzilla.gnome.org/show_bug.cgi?id=738860
2014-10-20 08:50:53 -04:00
Matthias Clasen
f93795d272 Add a style class for touch selection popovers 2014-10-07 13:27:52 -04:00
Matthias Clasen
0004e667ab GtkTextView: Add a monospace property
This is a convenient shortcut for a common case. It is implemented
by adding a .monospace style class to the text view, and letting
the theme decide about the monospace font to use.
2014-10-07 00:39:42 -04:00
Matthias Clasen
75bcecb363 Add a label style class 2014-10-04 21:53:29 -04:00
Benjamin Otte
82b7d21f6e print: Add a .paper style class
... and use it in the print preview.
2014-10-04 17:18:50 +02:00
Benjamin Otte
91467a45fc stylecontext: Deprecate functions
- gtk_style_context_get_background_color()
- gtk_style_context_get_border_color()

Those functions shouldn't be used anymore, because they don't represent
anything from the CSS styling we support. The background color often
isn't used due to background images and there are actually 4 different
border colors (1 for each side) - if there isn't also a border image in
use.
2014-10-03 06:18:06 +02:00
Benjamin Otte
d3c147a62d stylecontext: Split render functions out into gtkrender.[ch] 2014-10-03 06:18:05 +02:00
Benjamin Otte
7e5b58c727 stylecontext: Move private a11y function to private header 2014-08-16 19:39:44 +02:00
Carlos Garnacho
18c113cde1 stylecontext: Add GTK_STYLE_CLASS_OVERSHOOT
This class is meant to render the hint on scrolledwindow corners
when scrolling past-limits.

https://bugzilla.gnome.org/show_bug.cgi?id=731297
2014-07-09 23:11:42 -04:00
Matthias Clasen
a56a61d9cc Trivial rearrangement 2014-07-06 22:37:57 -04:00
Matthias Clasen
8328cfac92 Add defines for title style classes 2014-07-04 18:53:33 -04:00
Matthias Clasen
e6341a0b63 Add a FLAT style class
This will be used for frame-less buttons and frames in the future.
2014-06-26 22:02:08 -04:00
Benjamin Otte
d80bf0790d stylecontext: Deprecate regions
Regions are done in a very non-css way. They don't fit the DOM in that
they don't integrate into the CSS tree and they have very weird matching
behavior in selectors.

So I'm deprecating them now. GtkNotebook and GtkTreeview will continue
to use them and as long as they do, we can't remove the code for it.
But once those are ported it might be safe to remove the code as it will
clean up lots of places in the code by quite a bit.
2014-06-19 22:26:51 +02:00
Lars Uebernickel
d0a3c8bd6f gtkpopover: set background and popover css classes
https://bugzilla.gnome.org/show_bug.cgi?id=731834
2014-06-18 14:24:14 +02:00
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