Commit Graph

457 Commits

Author SHA1 Message Date
Benjamin Otte
f51419adb0 cssstylefuncs: Rename functions
This is in preaparation for the big GtkCssComputedValues => GtkCssStyle
rename
2015-01-07 14:26:46 +01:00
Erick Pérez Castellanos
ed1fb8d2af Minor documentation fix 2014-12-18 10:43:13 -05:00
Benjamin Otte
b49c7c3421 styleprovider: Fold get_change() vfunc into lookup() 2014-12-10 03:49:40 +01:00
Benjamin Otte
e2dddd62cf cssselector: Redo change verification
Instead of walking the selector tree, we walk the selectors.
2014-12-10 03:49:40 +01:00
Matthias Clasen
e2ce0700a6 GtkCssProvider: Load themes from versioned directories
Look for themes in $prefix/themes/$name/gtk-$version/ (for
version = 3.16, 3.14, ...), before using the old location
$prefix/themes/$name/gtk-3.0/. This gives theme authors a
way to support multiple versions of GTK+ 3 with separate
css files.
2014-11-12 19:22:55 -05:00
Matthias Clasen
55fd3a762c GtkCssProvider: Factor out a function
Move finding the gtk.css file into its own function. We will
make this more complicated in the near future.
2014-11-12 18:20:35 -05:00
Benjamin Otte
433c20e59d styleproperties: Remove header where it's not used 2014-10-24 21:31:40 +02:00
Matthias Clasen
f73db86a63 Fix docs for gtk_css_provider_load_from_resource 2014-10-22 00:32:38 -04:00
Matthias Clasen
978afce04a Fix a thinko in the previous commit
GTK+ relies on this function silently failing for invalid data.
2014-10-04 16:06:30 -04:00
Matthias Clasen
a00842fa99 Add a function to load css from a resource
This is common enough that we should just provide an API for it
- we already had a function for this purpose anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=672946
2014-10-04 15:52:02 -04:00
Emmanuele Bassi
5ad60caa3c css: Implement font-stretch
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:

  http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch

It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.

https://bugzilla.gnome.org/show_bug.cgi?id=735593
2014-08-28 13:41:40 +01:00
Benjamin Otte
19eb1614de cssmatcher: Use widget path's state
Don't take a state when constructing the CSS matcher. Instead, rely on
the newly introduced state in the widget path.

This way, the state can be queried not only on the first element, but on
all elements of the widget path.
2014-07-19 23:42:39 +02:00
Matthias Clasen
2952739593 GtkCssProvider: Allow to enable debug at runtime
Add a private function that lets us decide at runtime whether to
keep css section information around - this will be useful in the
GtkInspector.
2014-07-06 22:37:57 -04:00
Benjamin Otte
aa6652aac7 cssprovider: Names starting with -gtk- aren't style props
We want to have the "-gtk-" prefix for our custom CSS properties. But
we also want to parse names starting with a "-" as style properties.
So make sure that "-gtk-" is treated like a normal property and we emit
errors when somebody uses it wrong.

This is to catch errors with people typing
  -gtk-iconsource: none;
instead of the correct
  -gtk-icon-source: none;
2014-06-17 00:01:25 +02:00
Volker Sobek
f8b6bfe744 docs: Remove '\' escape character from literals
commit 7f6a964c47 replaced entities, but
escaped the replacement text also inside literals, which resulted in the
escaping '\' to also appear in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727322
2014-04-04 01:24:35 -04:00
Benjamin Otte
d5792eb1fe cssprovider: Fix error message
expected a valid semicolon
sounds kinda not so great. Make it say
  expected semicolon

Unless somebody can tell me the difference between valid and invalid
semicolons?
2014-03-19 12:44:24 +01:00
Andrés G. Aragoneses
596364e9fc trivial: fix typo in docs of gtk_css_provider_to_string 2014-03-02 12:09:48 +01:00
Andrés G. Aragoneses
cf6c277d49 trivial: fix typo in docs of gtk_css_provider_to_string 2014-03-02 09:47:31 +01:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
eb14b00187 docs: fix typo 2014-02-07 21:34:27 -05:00
William Jon McCann
01b2440370 docs: rewrite the CSS Properties docs 2014-02-07 20:53:00 -05:00
William Jon McCann
f5e540d71a docs: improve the cssprovider documentation layout 2014-02-07 20:53:00 -05:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
f0000b2f3d docs: use more apostrophes 2014-02-07 13:26:12 -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
f116f0071e docs: use links instead of <xref> 2014-02-07 11:13:11 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
c6ef8bdc9c docs: don't use <para id=""> 2014-02-04 20:21:05 -05:00
William Jon McCann
8ad75bdfff docs: don't use <replaceable> 2014-02-04 19:20:16 -05:00
William Jon McCann
5dd751f006 docs: don't use ulink. use markdown instead 2014-02-04 18:53:51 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
William Jon McCann
bf7afa48f8 docs: replace all figures with headings and images 2014-02-04 17:20:43 -05:00
William Jon McCann
9f99f567c8 docs: use markdown instead of inlinegraphic tags 2014-02-04 16:58:53 -05:00
William Jon McCann
50e06e11ee docs: use markdown instead of <filename> tags 2014-02-04 16:58:53 -05:00
William Jon McCann
a479ee5de5 docs: use markdown for <envar> tags 2014-02-04 16:58:53 -05:00
Matthias Clasen
09d1b28249 docs: Convert to markdown
Specifically, switch to using markdown syntax for sections.
2014-02-02 00:30:27 -05:00
William Jon McCann
e31ebda1d7 docs: don't escape entities in example code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
5d053e03a9 docs: fix css properties table 2014-01-28 01:27:39 -05:00
William Jon McCann
974e930fb8 Use a define for the default theme name 2014-01-24 08:08:34 -05:00
William Jon McCann
4a11acdc8c resources: move resources into a subdirectory 2014-01-23 21:04:59 -05:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
P. F. Chimento
29c7562ca7 doc: Documented icon-shadow CSS property
The docs say that text-shadow applies a drop shadow to both text
and icons, but icons need to use the icon-shadow property.

https://bugzilla.gnome.org/show_bug.cgi?id=698181
2013-04-19 10:19:25 -04:00
Chris Cummins
e707eadaf2 Update GtkCssProvider box-shadow documentation
Non-inset box-shadows are no longer ignored by the GTK+ theming engine,
outset shadows are supported.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-04-09 12:52:52 +01:00
Alexander Larsson
eb4667b6e1 css: Do get_change directly on the tree without matching first
Rather than first collecting matches and then getting the change
for them we do the change collection directly on the tree. This
is about twice as fast.
2012-12-10 12:11:02 +01:00
Alexander Larsson
d69c6fff7a css: Don't keep around linear selectors
Now we use the selector tree everywhere, so there is no need to
keep around the linear selectors unless we're using them to
verify the tree correctness, so free them.
2012-11-30 14:53:30 +01:00
Alexander Larsson
c10a0962cf css: Remove gtk_css_ruleset_matches
This is only not needed anymore, and only the VERIFY_TREE code
should access ->selector.
2012-11-30 14:53:30 +01:00