summaryrefslogtreecommitdiff
path: root/wikipedia/widgets
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2014-01-29 17:51:32 -0800
committerMatt Watson <mattdangerw@gmail.com>2014-01-29 17:51:32 -0800
commit0c01f6b7dea772df6ad1642be5c31dcd3fa06cd1 (patch)
treec419d784aaa38ac1a448e93f02eba9d71c2a893f /wikipedia/widgets
parent1885402793fffa0d73d52c721c69a9dade9d7fbc (diff)
Always reserve space for arrow on article list
This keeps the content from jumping on article list mouseover. Used the same opacity trick we use for the category button arrow. Did this in js instead of css, and the image file was set in js and I wanted to be consistent. But could also be done in css with state flags [endlessm/eos-sdk#537]
Diffstat (limited to 'wikipedia/widgets')
-rw-r--r--wikipedia/widgets/ListTextButton.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/wikipedia/widgets/ListTextButton.js b/wikipedia/widgets/ListTextButton.js
index c87150f..41a7585 100644
--- a/wikipedia/widgets/ListTextButton.js
+++ b/wikipedia/widgets/ListTextButton.js
@@ -21,7 +21,7 @@ const ListTextButton = new Lang.Class({
this._hover_icon_pixbuf = GdkPixbuf.Pixbuf.new_from_resource(hover_icon_path);
this._image = new Gtk.Image({
- no_show_all: true
+ opacity: 0,
});
this._image.set_from_pixbuf(this._hover_icon_pixbuf);
@@ -47,11 +47,11 @@ const ListTextButton = new Lang.Class({
// If button is hovered over and/or pressed, then show the arrow icon
if (widget.get_state_flags() & Gtk.StateFlags.ACTIVE ||
widget.get_state_flags() & Gtk.StateFlags.PRELIGHT) {
- this._image.show();
+ this._image.set_opacity(1);
return false;
}
// If no hover or press, then hide the arrow icon
- this._image.hide();
+ this._image.set_opacity(0);
return false;
}
});