summaryrefslogtreecommitdiff
path: root/wikipedia/widgets/SideBarButton.js
diff options
context:
space:
mode:
Diffstat (limited to 'wikipedia/widgets/SideBarButton.js')
-rw-r--r--wikipedia/widgets/SideBarButton.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/wikipedia/widgets/SideBarButton.js b/wikipedia/widgets/SideBarButton.js
deleted file mode 100644
index b602d6c..0000000
--- a/wikipedia/widgets/SideBarButton.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const Lang = imports.lang;
-const Gdk = imports.gi.Gdk;
-const GdkPixbuf = imports.gi.GdkPixbuf;
-const Gtk = imports.gi.Gtk;
-
-const SideBarButton = new Lang.Class({
- Name: 'EndlessSideBarButton',
- Extends: Gtk.Button,
-
- // This is a button for the article list widget. It has a label and an icon image.
- // The icon image will only appear on hover or press of button
- _init: function(hover_icon_path, params) {
- this.parent(params);
-
- this.set_size_request(40, -1);
-
- this._image = new Gtk.Image({
- resource: hover_icon_path,
- no_show_all: true
- });
-
- this.add(this._image);
-
- this.connect('state-changed', Lang.bind(this, this._update_appearance));
- },
-
- _update_appearance: function(widget, state) {
- // 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();
- return false; // don't block event
- }
- // If no hover or press, then hide the arrow icon
- this._image.hide();
- return false; // don't block event
- }
-});
-