[gnome-music] new UI updates on playerbar
- From: Seif Lotfy <seiflotfy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] new UI updates on playerbar
- Date: Thu, 4 Apr 2013 12:45:43 +0000 (UTC)
commit 7f8e900ed9317d1b53b93a06039af5faef0a5cef
Author: Eslam Mostafa <cseslam gmail com>
Date: Thu Apr 4 14:37:22 2013 +0200
new UI updates on playerbar
Signed-off-by: Seif Lotfy <seif lotfy com>
src/player.js | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/src/player.js b/src/player.js
index adabaa6..8b9243f 100644
--- a/src/player.js
+++ b/src/player.js
@@ -37,14 +37,30 @@ const PlayPauseButton = new Lang.Class({
Extends: Gtk.ToggleButton,
_init: function() {
- this.play_image = Gtk.Image.new_from_icon_name("media-playback-start-symbolic", Gtk.IconSize.BUTTON);
- this.pause_image = Gtk.Image.new_from_icon_name("media-playback-pause-symbolic",
Gtk.IconSize.BUTTON);
+ this.play_image = Gtk.Image.new_from_icon_name("media-playback-start-symbolic", Gtk.IconSize.MENU);
+ this.pause_image = Gtk.Image.new_from_icon_name("media-playback-pause-symbolic", Gtk.IconSize.MENU);
this.parent();
this.set_image(this.play_image);
},
});
+const MenuButton = new Lang.Class({
+ Name: "MenuButton",
+ Extends: Gtk.Button,
+
+ _init: function () {
+ this.parent();
+ let box = new Gtk.HBox();
+ let image = Gtk.Image.new_from_icon_name("media-playlist-repeat-symbolic", Gtk.IconSize.MENU);
+ let arrow = Gtk.Image.new_from_icon_name("go-down-symbolic", Gtk.IconSize.MENU);
+ box.pack_start(image, false, false, 3);
+ box.pack_start(arrow, false, false, 3);
+ this.add(box);
+ this.show_all();
+ },
+});
+
const Player = new Lang.Class({
Name: "Player",
@@ -156,7 +172,7 @@ const Player = new Lang.Class({
},
_setup_view: function() {
- var alignment,
+ let alignment,
artist_lbl,
box,
databox,
@@ -179,16 +195,19 @@ const Player = new Lang.Class({
toolbar_start.get_style_context().add_class(Gtk.STYLE_CLASS_LINKED);
prev_btn = new Gtk.Button();
- prev_btn.set_image(Gtk.Image.new_from_icon_name("media-skip-backward-symbolic",
Gtk.IconSize.BUTTON));
+ prev_btn.set_size_request(35, -1);
+ prev_btn.set_image(Gtk.Image.new_from_icon_name("media-skip-backward-symbolic", Gtk.IconSize.MENU));
prev_btn.connect("clicked", Lang.bind(this, this._onPrevBtnClicked));
toolbar_start.pack_start(prev_btn, false, false, 0);
this.play_btn = new PlayPauseButton();
+ this.play_btn.set_size_request(55, -1);
this.play_btn.connect("toggled", Lang.bind(this, this._onPlayBtnToggled));
toolbar_start.pack_start(this.play_btn, false, false, 0);
next_btn = new Gtk.Button();
- next_btn.set_image(Gtk.Image.new_from_icon_name("media-skip-forward-symbolic", Gtk.IconSize.BUTTON));
+ next_btn.set_size_request(35, -1);
+ next_btn.set_image(Gtk.Image.new_from_icon_name("media-skip-forward-symbolic", Gtk.IconSize.MENU));
next_btn.connect("clicked", Lang.bind(this, this._onNextBtnClicked));
toolbar_start.pack_start(next_btn, false, false, 0);
this.box.pack_start(toolbar_start, false, false, 3)
@@ -261,6 +280,7 @@ const Player = new Lang.Class({
});
this.box.pack_end(toolbar_end, false, false, 3);
+ /*
rate_btn = new Gtk.Button ();
rate_btn.set_image(Gtk.Image.new_from_icon_name("bookmark-new-symbolic", Gtk.IconSize.BUTTON));
toolbar_end.pack_end(rate_btn, false, false, 0);
@@ -269,6 +289,10 @@ const Player = new Lang.Class({
this.shuffle_btn.set_image (Gtk.Image.new_from_icon_name("media-playlist-shuffle-symbolic",
Gtk.IconSize.BUTTON));
this.shuffle_btn.connect("clicked", Lang.bind(this, this._onShuffleBtnClicked));
toolbar_end.pack_end(this.shuffle_btn, false, false, 0);
+ */
+
+ let menuBtn = new MenuButton();
+ toolbar_end.pack_end(menuBtn, false, false, 0);
this.eventbox = new Gtk.Frame();
this.eventbox.get_style_context().add_class("play-bar")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]