The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Case insensitive CSS styles

These changes was commited to the Birdfont repository Thu, 14 Jan 2016 23:17:09 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Thu, 14 Jan 2016 23:17:09 +0000 (00:17 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Thu, 14 Jan 2016 23:17:09 +0000 (00:17 +0100)
commit 810ba4e8bcc20e91f74626a430cc27dc854caef8
tree c66c410d27e2c8496a7d87df046233c3d1337630
parent 46f109983f33587c994679ab3776cb0cfdd65d8f
Case insensitive CSS styles

birdui/BoxLayout.vala
birdui/Component.vala
birdui/GtkWidget.vala
dodo.py
libsvgbird/SvgStyle.vala
--- a/birdui/BoxLayout.vala +++ b/birdui/BoxLayout.vala @@ -56,6 +56,8 @@ component.x = child_x; component.y = child_y; component.layout (); + component.apply_padding (); + child_x += component.padded_width; if (component.height > height) {
--- a/birdui/Component.vala +++ b/birdui/Component.vala @@ -224,8 +224,9 @@ foreach (Component component in components) { component.layout (); - width = component.width; - height = component.height; + component.apply_padding (); + width = component.padded_width; + height = component.padded_height; } }
--- a/birdui/GtkWidget.vala +++ b/birdui/GtkWidget.vala @@ -15,6 +15,7 @@ using Gtk; using Gdk; using Cairo; + using Math; namespace Bird { @@ -44,9 +45,13 @@ component.draw (cairo_context); return true; }); + + int width = (int) rint (component.padded_width); + int height = (int) rint (component.padded_height); + set_size_request (width, height); } } }
diff --git a/dodo.py b/dodo.py
--- a/dodo.py +++ b/dodo.py @@ -596,7 +596,7 @@ $(pkg-config --libs gobject-2.0) \ $(pkg-config --libs xmlbird) \ $(pkg-config --libs """ + config.GEE + """) \ - -L ./build/bin -l svgbird \ + -L ./build/bin -l m -l svgbird \ -o build/bin/""" + target_binary libbirdgems = Builder('birdui',
--- a/libsvgbird/SvgStyle.vala +++ b/libsvgbird/SvgStyle.vala @@ -37,7 +37,7 @@ } public string? get_css_property (string key) { - return style.get (key); + return style.get (key.down ()); } public SvgStyle copy () { @@ -176,8 +176,8 @@ continue; } - k = pair[0].strip (); - v = pair[1].strip (); + k = pair[0].strip ().down (); + v = pair[1].strip ().down (); if (k == "padding") { parse_padding_shorthand (v);