[gtk+/gtk-style-context] A little closer to css
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context] A little closer to css
- Date: Thu, 18 Nov 2010 23:37:17 +0000 (UTC)
commit 208a52dad76d99076d2936a8c657b855814dc6fa
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 18 18:36:08 2010 -0500
A little closer to css
Declarations are ;-separated, but there is no ; required after
the last declaration. We harmlessly accept either.
gtk/gtkcssprovider.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 649a583..d8faebf 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -50,24 +50,25 @@
* <programlisting>
* /* Theme labels that are descendants of a window */
* GtkWindow GtkLabel {
- * background-color: #898989;
+ * background-color: #898989
* }
*
* /* Theme notebooks, and anything that's within these */
* GtkNotebook {
- * background-color: #a939f0;
+ * background-color: #a939f0
* }
*
* /* Theme combo boxes, and entries that
* are direct children of a notebook */
* GtkComboBox,
* GtkNotebook > GtkEntry {
- * background-color: #1209a2;
+ * color: @fg_color;
+ * background-color: #1209a2
* }
*
* /* Theme any widget within a GtkBin */
* GtkBin * {
- * font-name: Sans 20;
+ * font-name: Sans 20
* }
* </programlisting>
* </example>
@@ -79,12 +80,12 @@
* <programlisting>
* /* Theme a label named title-label */
* GtkLabel#title-label {
- * font-name: Sans 15;
+ * font-name: Sans 15
* }
*
* /* Theme any widget named main-entry */
* #main-entry {
- * background-color: #f0a810;
+ * background-color: #f0a810
* }
* </programlisting>
* </example>
@@ -102,7 +103,7 @@
*
* /* Theme spinbuttons' entry */
* GtkSpinButton.entry {
- * color: #900185;
+ * color: #900185
* }
* </programlisting>
* </example>
@@ -197,7 +198,7 @@
* <example>
* <title>Using the @import rule</title>
* <programlisting>
- * @import url ("path/to/common.css")
+ * @import url ("path/to/common.css");
* </programlisting>
* </example>
* <para>
@@ -254,7 +255,7 @@
* example in common CSS it is fine to define a font through
* the different @font-family, @font-style, @font-size
* properties, meanwhile in GTK+'s CSS only the canonical
- * @font property would be supported.
+ * @font property is supported.
* </para>
* <para>
* The currently supported properties are:
@@ -1578,8 +1579,7 @@ symbolic_color_parse_str (const gchar *string,
str++;
end = str;
- while (*end == '-' || *end == '_' ||
- g_ascii_isalpha (*end))
+ while (*end == '-' || *end == '_' || g_ascii_isalpha (*end))
end++;
name = g_strndup (str, end - str);
@@ -2015,7 +2015,7 @@ gradient_parse_str (const gchar *str,
str++;
SKIP_SPACES (str);
- position = g_strtod (str, &end);
+ position = g_ascii_strtod (str, &end);
str = end;
SKIP_SPACES (str);
@@ -2875,7 +2875,7 @@ parse_rule (GtkCssProvider *css_provider,
g_scanner_get_next_token (scanner);
if (scanner->token != ';')
- return ';';
+ break;
g_scanner_get_next_token (scanner);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]