diff options
author | Philip Chimento <philip@endlessm.com> | 2013-10-18 13:56:58 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2013-10-18 13:56:58 -0700 |
commit | e9519cb483704cc9158cb3646c80fabe1e57aa4b (patch) | |
tree | 7e7a76e28ba913a64ea94b501c7e050bf0530293 /wikipedia/widgets/category_button.js | |
parent | 60369d32ec26deba64766b58b4470d7b9c8a629f (diff) |
wikipedia: Use Lato fonts
Fonts are changed according to the conversion table. It turns out that
what we thought was the "Benton Sans correction" does not only apply to
Benton Sans - I think it is due to GTK's lack of baseline alignment,
something that has been rectified in GTK 3.10.
[endlessm/eos-sdk#361]
Diffstat (limited to 'wikipedia/widgets/category_button.js')
-rw-r--r-- | wikipedia/widgets/category_button.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wikipedia/widgets/category_button.js b/wikipedia/widgets/category_button.js index ade1f21..54f0b79 100644 --- a/wikipedia/widgets/category_button.js +++ b/wikipedia/widgets/category_button.js @@ -10,8 +10,10 @@ const CATEGORY_LABEL_LEFT_MARGIN = 25; // pixels const CATEGORY_LABEL_BOTTOM_MARGIN = 20; // pixels const CATEGORY_BUTTON_RIGHT_MARGIN = 20; // pixels const CATEGORY_BUTTON_BOTTOM_MARGIN = 20; // pixels -const CATEGORY_LABEL_BENTON_SANS_CORRECTION = 0; // pixels -const CATEGORY_BUTTON_BENTON_SANS_CORRECTION = 10; // pixels +// The following two are corrections because GTK 3.8 doesn't have baseline +// alignment. Remove and align properly in GTK 3.10. FIXME +const CATEGORY_LABEL_BASELINE_CORRECTION = 0; // pixels +const CATEGORY_BUTTON_BASELINE_CORRECTION = 10; // pixels const _HOVER_ARROW_URI = '/com/endlessm/wikipedia-domain/assets/category_hover_arrow.png'; const MAIN_CATEGORY_SCREEN_WIDTH_PERCENTAGE = 0.37; @@ -71,7 +73,7 @@ const CategoryButton = new Lang.Class({ }); this._label = new Gtk.Label({ margin_left: CATEGORY_LABEL_LEFT_MARGIN, - margin_bottom: CATEGORY_LABEL_BOTTOM_MARGIN - CATEGORY_LABEL_BENTON_SANS_CORRECTION, + margin_bottom: CATEGORY_LABEL_BOTTOM_MARGIN - CATEGORY_LABEL_BASELINE_CORRECTION, hexpand: true, halign: Gtk.Align.START, xalign: 0.0, // deprecated Gtk.Misc properties; necessary because @@ -80,7 +82,7 @@ const CategoryButton = new Lang.Class({ this._arrow = new Gtk.Image({ resource: _HOVER_ARROW_URI, margin_right: CATEGORY_BUTTON_RIGHT_MARGIN, - margin_bottom: CATEGORY_BUTTON_BOTTOM_MARGIN + CATEGORY_BUTTON_BENTON_SANS_CORRECTION, + margin_bottom: CATEGORY_BUTTON_BOTTOM_MARGIN + CATEGORY_BUTTON_BASELINE_CORRECTION, halign: Gtk.Align.END, valign: Gtk.Align.END, opacity: 0 |