Commit 810ba4e
Case insensitive CSS styles
Changed files (5)
modifiedbirdui/BoxLayout.valamodifiedbirdui/Component.valamodifiedbirdui/GtkWidget.valamodifieddodo.pymodifiedlibsvgbird/SvgStyle.vala
Diff
@@ -56,6 +56,8 @@ class BoxLayout : Component { component.x = child_x; component.y = child_y; component.layout ();+ component.apply_padding ();+ child_x += component.padded_width; if (component.height > height) {@@ -224,8 +224,9 @@ class Component : GLib.Object { foreach (Component component in components) { component.layout ();- width = component.width;- height = component.height;+ component.apply_padding ();+ width = component.padded_width;+ height = component.padded_height; } } @@ -15,6 +15,7 @@ using Gtk; using Gdk; using Cairo;+using Math; namespace Bird { @@ -44,6 +45,10 @@ class Widget : DrawingArea { 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); } }@@ -596,7 +596,7 @@ def make_birdui(target_binary, deps): $(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',@@ -37,7 +37,7 @@ public class SvgStyle : GLib.Object { } public string? get_css_property (string key) {- return style.get (key);+ return style.get (key.down ()); } public SvgStyle copy () {@@ -176,8 +176,8 @@ public class SvgStyle : GLib.Object { 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);