Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhoran committed May 11, 2016
2 parents ce29aa0 + af409c3 commit 72297b3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
14 changes: 13 additions & 1 deletion src/streamMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ const StreamBase = new Lang.Class({
this._paPath = null;
this._parent = parent;

this._label = new St.Label({style_class: 'simple-stream-label', reactive: true})
this._label = new St.Label({style_class: 'simple-stream-label',
reactive: true, track_hover:true});
this._muteBtn = new St.Button();
this._volSlider = new Slider.Slider(0);

Expand Down Expand Up @@ -363,6 +364,7 @@ const SimpleStream = new Lang.Class({
icon = new St.Icon({style_class: 'icon'});
icon.set_gicon(info.get_icon());
}
this._label.add_style_pseudo_class('clickable');
}

if(name == null){
Expand Down Expand Up @@ -556,6 +558,7 @@ const MPRISStream = new Lang.Class({
this._mediaLength = 0;
this._sigFVol = this._sigFMute = -1;
this.actor.add_style_class_name("mpris-stream");
this._label.add_style_pseudo_class('clickable');

this.unsetPAStream();

Expand Down Expand Up @@ -681,11 +684,20 @@ const MPRISStream = new Lang.Class({
this._posSlider.actor.connect('notify::hover', Lang.bind(this, function(){
this._setFocused(this._posSlider.actor.hover, 'active-bottom');
}));
this._label.connect('notify::hover', Lang.bind(this, function(){
this._setFocused(this._label.hover, 'active-top');
}));

this._muteBtn.set_track_hover(true);
this._muteBtn.connect('notify::hover', Lang.bind(this, function(){
this._setFocused(this._muteBtn.hover, 'active-top');
}));

this._volSlider.actor.connect('key-focus-in', Lang.bind(this, function(){ this._setFocused(true, 'active-top'); }));
this._volSlider.actor.connect('key-focus-out', Lang.bind(this, function(){ this._setFocused(false, 'active-top'); }));
this._posSlider.actor.connect('key-focus-in', Lang.bind(this, function(){ this._setFocused(true, 'active-bottom'); }));
this._posSlider.actor.connect('key-focus-out', Lang.bind(this, function(){ this._setFocused(false, 'active-bottom'); }));

},

_setFocused: function(activate, type){
Expand Down
13 changes: 11 additions & 2 deletions src/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
spacing:2px;
}


.simple-stream-label{
color:lightgray;
}

.simple-stream-label:hover:clickable {
color:white;
}

.solitary .stream_container,
.stream_container:empty{
margin-bottom:0px;
Expand Down Expand Up @@ -155,7 +164,7 @@

.mpris-stream:active-top{
background-gradient-start: rgba(74,80,80,1);
background-gradient-end: rgba(74,80,80,0);
background-gradient-end: rgba(74,80,80,0.3);
background-gradient-direction: vertical;
}

Expand All @@ -164,7 +173,7 @@
}

.mpris-stream:active-bottom{
background-gradient-start: rgba(74,80,80,0);
background-gradient-start: rgba(74,80,80,0.3);
background-gradient-end: rgba(74,80,80,1);
background-gradient-direction: vertical;
}
Expand Down

0 comments on commit 72297b3

Please sign in to comment.