Commit Graph

443 Commits

Author SHA1 Message Date
330158977d gtk: make the .trough background-color darker() as it was in GTK+ 2.x 2011-02-06 13:48:42 +01:00
c990699922 gtk: don't style GtkLabel:selected's color separately
or labels in selected state will not have a different color. Reviewed
by Carlos.
2011-02-05 14:10:18 +01:00
3c1ff82b21 Fix a memory leak in GtkCSSProvider
Found by Felix Riemann
https://bugzilla.gnome.org/show_bug.cgi?id=641558
2011-02-04 21:13:56 -05:00
d51c617e13 css-provider: Fix up the Switch style
As it was with the old style, when the Switch is in the "on" state the
trough should be using the selected background color.
2011-01-31 16:21:36 +00:00
cb498c2101 Speed up expander animation
Go back to 200ms, which is what we had in GTK+ 2.x.
Themes can change this, of course.
2011-01-31 10:51:09 -05:00
09a52de478 Add a missing id to the docs 2011-01-31 07:39:06 -05:00
f67ab808fd doc fixes 2011-01-30 23:35:25 -05:00
8bb0d552f1 Improve binding-set parser
Make gtk_binding_entry_add_signal_from_string() return the expected
token in case of parsing error, so that we can return a GError
instead of spewing. Also, add a separate scope for binding-set,
since allowing {} in identifiers in SCOPE_VALUE breaks the fact
that the ; after the last assignment in a rule is optional.
2011-01-30 21:27:56 -05:00
bf9e59e392 Make documentation match behaviour 2011-01-30 21:27:55 -05:00
c70b65f0eb Document @binding-set and the gtk-key-bindings css parser property 2011-01-30 21:24:52 -05:00
d39f0411be Add the gtk-key-bindings CSS parser property.
This property takes a list of binding set names to have these
stored as a GPtrArray containing GtkBindingSets. this property
is handled so merging GtkStyleProperties will merge both
GtkBindingSet lists.
2011-01-30 21:24:51 -05:00
dbff92fd9f Add @binding-set rules to the CSS parser
these custom rules can be used to define key themes
as in the RC files, a series of bind/unbind rules
may be added then:

@binding foo-bar {
  bind "<alt>1" { "move-cursor" (visual-positions, 1, 0) };
  unbind "<ctl>d"
}
2011-01-30 21:24:51 -05:00
b98caf9385 GtkCssProvider: Take into account variant
When loading a theme, make sure we take into account the variant
so we don't use the plain version when the theme changes.

Also make sure to fallback to the plain theme when loading a variant
fails.

https://bugzilla.gnome.org/show_bug.cgi?id=640983
2011-01-30 21:22:12 -05:00
08af1783c5 Make GtkTreeView use GtkStyleContext
Expander animation has been replaced by implicit animations
from the style context.

Column headers are also properly themed, GtkContainer::get_path_for_child()
is implemented and the treeview resets column buttons style on columns
being reordered.

The default CSS has changed to theme treeviews sensibly.
2011-01-27 20:57:11 +01:00
ea24fa62c8 Privately export css_provider_get_theme_dir 2011-01-27 00:32:07 -05:00
e3be6fc24f Unset border-width for treeview rows in default CSS
Fixes bug #640391 - Display lines between rows when window is focused.
Reported by Guillaume Desmottes.
2011-01-24 18:14:05 +01:00
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
a12dad75a2 Split out private style context api into a private header 2011-01-23 18:29:28 -05:00
e3774b6ff2 Render check/radio buttons with border-color: @fg_color 2011-01-23 20:01:22 +01:00
0a5e8ce685 Mention type vs region ambiguity in the docs 2011-01-19 12:55:48 -05:00
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
f430a306f7 Make GtkCheckButton/GtkRadioButton background white again 2011-01-19 04:28:49 +01:00
e28a2695ac Improve progressbars theming.
Make progressbar itself have an outset border, and improve spacings.
2011-01-17 04:43:16 +01:00
9438107bff Plugged leak in gtkcssprovider.c
SelectorStyleInfo structs were never freed.
2011-01-16 20:52:43 +09:00
26db0b7276 Make GtkMenu(Shell) use GtkStyleContext
The default CSS has also been modified to theme these sensibly
2011-01-12 20:55:36 +01:00
162380fca5 Make GtkCalendar use GtkStyleContext 2011-01-10 20:49:34 +01:00
12944d9c23 Do not set any padding for scrolled window children. 2011-01-10 20:49:27 +01:00
d9dab98ad6 GtkCssProvider: enable parsing negative GtkBorders
this can be used as in regular CSS under some situations,
so child items overlap the parent element's border.
2011-01-10 20:49:14 +01:00
c5a8584c3e CSS styles for the selection in a TextView.
https://bugzilla.gnome.org/show_bug.cgi?id=639106
2011-01-10 18:52:35 +01:00
2f6514ce34 Make GtkHSV use GtkStyleContext
two custom classes replace the light/dark focus detail strings,
it doesn't make much sense to have a GTK_STYLE_CLASS_* for that.
2011-01-10 03:49:59 +01:00
8de4661d80 Set the style for .view so i.e the GtkTextView gets the right style. 2011-01-07 11:35:40 +01:00
bf2a6114ab Mention gvfs in the gtk_show_uri() docs
https://bugzilla.gnome.org/show_bug.cgi?id=622125
2011-01-04 11:25:40 -05:00
554e649a68 Make GtkTooltip use GtkStyleContext 2011-01-04 03:06:17 +01:00
7981869308 Update GtkAssistant to GtkStyleContext 2011-01-04 03:06:08 +01:00
5fe027500e win32: include gtkprivate.h for win32 GTK_DATA_PREFIX 2011-01-02 13:33:11 +01:00
b2e8992291 Make GtkProgressBar use GtkStyleContext 2010-12-28 19:25:48 +01:00
e5e95934ba Fix color name (as of rgb.txt) parsing in symbolic colors
The end of the substring wasn't being detected properly.
2010-12-24 19:37:30 +01:00
5b6bdcf016 Fix a tag mismatch in the docs 2010-12-21 18:18:34 -05:00
5b299ce7af Remove reference to GTK2_RC_FILES from the docs
Pointed out in bug 637471.
2010-12-20 10:23:43 -05:00
b792a31995 widgetpath: allow GTypes non-derived from GTK_TYPE_WIDGET
This makes things like GtkCellRenderer or GtkNumerableIcon more easily
themeable.

https://bugzilla.gnome.org/show_bug.cgi?id=637169
2010-12-17 18:30:57 +01:00
1b64655eb6 cssprovider: Explode if we fail to parse the default CSS
This can only happen if somebody really messed up with a checkin, and in
that case we want to explode early.
2010-12-15 14:51:26 +01:00
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
a517cf1bed Make GtkExpander use GtkStyleContext 2010-12-13 22:31:30 +01:00
618b1a8b33 GtkCssProvider: Make selectors applying from the topmost widget rank higher
For example, for an entry within a notebook, previously these 2 rules would
have the same weight:

.entry {}
.notebook {}

Now ".entry" will rank higher than ".notebook" for the GtkEntry, further
specific selectors such as:

.notebook .entry {}

still get a higher score than the previous ones.
2010-12-13 22:31:28 +01:00
107cebe546 gtk_css_provider_get_named: don't leak subpath (#636777) 2010-12-08 21:13:03 -05:00
ad80cb6279 Allow + in identifiers
This is necessary since we treat paths as identifiers in
@import rules, and it is common to have a + in there (at least
when distchecking gtk+ ...)
2010-12-06 14:13:07 -05:00
f1fafca6ca Make invalid stylesheets fail to parse again
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.

This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
2010-12-06 00:47:13 -05:00
d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
0cba2dc726 GtkCssProvider: Improve error handling and reporting.
Nicer error reports are provided, and a GError can be spread from
anywhere in parsing, so over time more precise and meaningful
messages can be produced.
2010-12-04 15:39:57 +01:00
066f35bf28 Parse user CSS from $XDG_CONFIG_HOME/gtk-3.0/gtk.css 2010-12-04 15:39:53 +01:00