Commit Graph

199 Commits

Author SHA1 Message Date
Carlos Garnacho
e8c78edeb2 theme: Fix prelight on selected rows' expanders
There was no prelight effect on selected rows' expanders with the
builtin theme, noticed by Kris Rietveld.
2011-04-03 12:32:20 +02:00
Carlos Garcia Campos
ef061c4e96 gtkentry: Add hinting to GtkEntry
gtk_entry_set_placeholder_text() makes the entry display the given text
when it is empty and unfocused. Based on previous patch by Alberto
Garcia.

https://bugzilla.gnome.org/show_bug.cgi?id=440963
2011-03-21 09:37:37 +01:00
Carlos Garnacho
fe12c46531 cssprovider: Reset the scope before skipping to the next rule after an error happens.
This is so the selector token gets parsed with the correct GScanner scope/config
on all situations.
2011-03-07 23:06:54 +01:00
Carlos Garnacho
aa6eee73e5 cssprovider: plug two more leak fixes 2011-03-07 23:06:54 +01:00
Carlos Garnacho
794593a4f8 cssprovider: return immediately if there's remaining data behind a parsed value
parse_value() could fill in a GError, but yet (incorrectly) return G_TOKEN_NONE,
having the GError leaked as a result.

https://bugzilla.gnome.org/show_bug.cgi?id=642604 , Reported by Felix Riemann.
2011-03-07 23:06:54 +01:00
Carlos Garnacho
3100b76ba9 Fix parsing of color names containing numbers
They were being defined correctly through @define-color
in CSS, but parsing failed at the moment of creating
GtkSymbolicColors depending on these.
2011-02-17 20:10:49 +01:00
Michael Natterer
330158977d gtk: make the .trough background-color darker() as it was in GTK+ 2.x 2011-02-06 13:48:42 +01:00
Michael Natterer
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
Matthias Clasen
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
Emmanuele Bassi
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
Matthias Clasen
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
Matthias Clasen
09a52de478 Add a missing id to the docs 2011-01-31 07:39:06 -05:00
Matthias Clasen
f67ab808fd doc fixes 2011-01-30 23:35:25 -05:00
Matthias Clasen
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
Matthias Clasen
bf9e59e392 Make documentation match behaviour 2011-01-30 21:27:55 -05:00
Carlos Garnacho
c70b65f0eb Document @binding-set and the gtk-key-bindings css parser property 2011-01-30 21:24:52 -05:00
Carlos Garnacho
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
Carlos Garnacho
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
Bastien Nocera
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
Carlos Garnacho
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
Matthias Clasen
ea24fa62c8 Privately export css_provider_get_theme_dir 2011-01-27 00:32:07 -05:00
Carlos Garnacho
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
Matthias Clasen
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
Matthias Clasen
a12dad75a2 Split out private style context api into a private header 2011-01-23 18:29:28 -05:00
Carlos Garnacho
e3774b6ff2 Render check/radio buttons with border-color: @fg_color 2011-01-23 20:01:22 +01:00
Matthias Clasen
0a5e8ce685 Mention type vs region ambiguity in the docs 2011-01-19 12:55:48 -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
Carlos Garnacho
f430a306f7 Make GtkCheckButton/GtkRadioButton background white again 2011-01-19 04:28:49 +01:00
Carlos Garnacho
e28a2695ac Improve progressbars theming.
Make progressbar itself have an outset border, and improve spacings.
2011-01-17 04:43:16 +01:00
Tristan Van Berkom
9438107bff Plugged leak in gtkcssprovider.c
SelectorStyleInfo structs were never freed.
2011-01-16 20:52:43 +09:00
Carlos Garnacho
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
Carlos Garnacho
162380fca5 Make GtkCalendar use GtkStyleContext 2011-01-10 20:49:34 +01:00
Carlos Garnacho
12944d9c23 Do not set any padding for scrolled window children. 2011-01-10 20:49:27 +01:00
Carlos Garnacho
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
Paolo Borelli
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
Carlos Garnacho
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
Ignacio Casal Quinteiro
8de4661d80 Set the style for .view so i.e the GtkTextView gets the right style. 2011-01-07 11:35:40 +01:00
Matthias Clasen
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
Carlos Garnacho
554e649a68 Make GtkTooltip use GtkStyleContext 2011-01-04 03:06:17 +01:00
Carlos Garnacho
7981869308 Update GtkAssistant to GtkStyleContext 2011-01-04 03:06:08 +01:00
Hans Breuer
5fe027500e win32: include gtkprivate.h for win32 GTK_DATA_PREFIX 2011-01-02 13:33:11 +01:00
Carlos Garnacho
b2e8992291 Make GtkProgressBar use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho
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
Matthias Clasen
5b6bdcf016 Fix a tag mismatch in the docs 2010-12-21 18:18:34 -05:00
Matthias Clasen
5b299ce7af Remove reference to GTK2_RC_FILES from the docs
Pointed out in bug 637471.
2010-12-20 10:23:43 -05:00
Cosimo Cecchi
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
Benjamin Otte
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
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
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