summaryrefslogtreecommitdiff
path: root/wikipedia
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2014-01-17 22:25:47 -0200
committerPhilip Chimento <philip@endlessm.com>2014-01-22 22:43:53 -0200
commitc466c45d91b13e2d284751c300de6c8bf112ee5a (patch)
treeb755941a546896844cc3f0f084a5358a18a9dbcb /wikipedia
parent4c3f4cf844bc4909a373899f46ed51322ce98984 (diff)
Replace category arrow asset
Replace the old PNG asset with an SVG asset. [endlessm/eos-sdk#505]
Diffstat (limited to 'wikipedia')
-rw-r--r--wikipedia/widgets/category_button.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/wikipedia/widgets/category_button.js b/wikipedia/widgets/category_button.js
index e6cfdde..ed95507 100644
--- a/wikipedia/widgets/category_button.js
+++ b/wikipedia/widgets/category_button.js
@@ -10,11 +10,12 @@ 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_BUTTON_SIZE_PIXELS = 42;
// 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 CATEGORY_BUTTON_RESOURCE_URI = 'resource:///com/endlessm/wikipedia-domain/assets/wikipedia-category-forward-symbolic.svg';
const CATEGORY_MIN_WIDTH = 120; // pixels
GObject.ParamFlags.READWRITE = GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE;
@@ -74,7 +75,10 @@ const CategoryButton = new Lang.Class({
max_width_chars: 20
});
this._arrow = new Gtk.Image({
- resource: _HOVER_ARROW_URI,
+ gicon: new Gio.FileIcon({
+ file: Gio.File.new_for_uri(CATEGORY_BUTTON_RESOURCE_URI)
+ }),
+ pixel_size: CATEGORY_BUTTON_SIZE_PIXELS,
margin_right: CATEGORY_BUTTON_RIGHT_MARGIN,
margin_bottom: CATEGORY_BUTTON_BOTTOM_MARGIN + CATEGORY_BUTTON_BASELINE_CORRECTION,
halign: Gtk.Align.END,