diff options
-rw-r--r-- | data/assets/category_hover_arrow.png | bin | 3047 -> 0 bytes | |||
-rw-r--r-- | data/assets/wikipedia-category-forward-symbolic.svg | 8 | ||||
-rw-r--r-- | data/eos-wikipedia-domain.gresource.xml | 2 | ||||
-rw-r--r-- | wikipedia/widgets/category_button.js | 8 |
4 files changed, 15 insertions, 3 deletions
diff --git a/data/assets/category_hover_arrow.png b/data/assets/category_hover_arrow.png Binary files differdeleted file mode 100644 index 13a2fb0..0000000 --- a/data/assets/category_hover_arrow.png +++ /dev/null diff --git a/data/assets/wikipedia-category-forward-symbolic.svg b/data/assets/wikipedia-category-forward-symbolic.svg new file mode 100644 index 0000000..2fe909d --- /dev/null +++ b/data/assets/wikipedia-category-forward-symbolic.svg @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" + width="42px" height="42px" viewBox="-0.5 0.5 42 42" enable-background="new -0.5 0.5 42 42" xml:space="preserve"> +<path style="fill:#bebebe" d="M20.5,0.5c-11.598,0-21,9.402-21,21s9.402,21,21,21s21-9.402,21-21S32.098,0.5,20.5,0.5z M17.999,32.499L15,29.5l7.998-8 + L15,13.5l2.999-2.999l11,10.999L17.999,32.499z"/> +</svg> diff --git a/data/eos-wikipedia-domain.gresource.xml b/data/eos-wikipedia-domain.gresource.xml index 8f0025d..0d319b1 100644 --- a/data/eos-wikipedia-domain.gresource.xml +++ b/data/eos-wikipedia-domain.gresource.xml @@ -10,9 +10,9 @@ <file>assets/submenu_separator_shadow_b.png</file> <file>assets/submenu_hover_arrow.png</file> <file>assets/submenu_background.jpg</file> - <file>assets/category_hover_arrow.png</file> <file>assets/image_strip_back_button.png</file> <file compressed="true">assets/wikipedia-category-back-symbolic.svg</file> + <file compressed="true">assets/wikipedia-category-forward-symbolic.svg</file> <file>assets/topbar_back_icon_normal.png</file> </gresource> </gresources> 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, |