Author Topic: Queue buttons placement  (Read 1693 times)

hansi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Queue buttons placement
« on: August 27, 2015, 04:35:22 »
Hello,

I'm trying to reproduce the old Shimmer queue buttons placement (with QueueActions + ShuffleList + EmptyList widgets), but unfortunately without any success...  >:(

Here's an example of I would like to obtain:


And this is where I am for now:


Is this feasible with the new 1.1.15 ? If yes, are there anyone here who would be kind enough to show me how?

Thank you in advance..

Here is the relevant layout code:
Code: [Select]
### main left: artist pane and album-cover ###
VBLeft = _VBListCover HBStatus
VBListCover = _NBList HBQueueButtons 1Cover(default=elementary/no-cover.svg,showcover=0)
NBList = (tabpos="bottom") QueueList(songtree=1,tabtitle=_"Queue (%n)",tabicon="gmb-song",cols="queuenumber titleaa",colwidth="queuenumber 20 titleaa 248",showbb=1,hscrollbar=0) HBparcourir HBLyrics VBAlbuminfo VBArtistinfo
HBQueueButtons = QueueActions ShuffleList EmptyList
HBparcourir = (tabtitle=_"Parcourir",tabicon="gmb-browse") _FPane
HBLyrics = (tabtitle=_"Lyrics",tabicon="emblem-shared") _PluginLyrics
VBArtistinfo = (tabtitle=_"Artist",tabicon="gmb-artist") _PluginArtistinfo
VBAlbuminfo = (tabtitle=_"Album",tabicon="emblem-generic") _PluginAlbuminfo
HBStatus = 3Total(noheader=1,format=long,relief=none,button=1,mode=library) -2Sort(button=1,tip=_"Right-click to toggle shuffle/random") -2Filter(button=1,tip=_"Right-click to remove filters") -2ToggleButton3(icon=gmb-picture,relief=none,size=menu,widget=Cover,tip=_"Show/Hide Cover")

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Queue buttons placement
« Reply #1 on: August 27, 2015, 19:59:58 »
The closest you can get currently is use a custom Queue page instead of the default one, it doesn't support the %n in its title (replaced by number of songs) :
Code: [Select]
HBQueueButtons = QueueActions -EmptyList -ShuffleList
VBQueueWithButtons= (tabtitle=_"Queue",tabicon=gmb-song) _QueueList(songtree=1,cols="queuenumber titleaa",colwidth="queuenumber 20 titleaa 248",showbb=1,hscrollbar=0) HBQueueButtons
remove the HBQueueButtons from VBListCover
and replace QueueList in NBList by VBQueueWithButtons

hansi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: Queue buttons placement
« Reply #2 on: August 28, 2015, 03:00:55 »
Oh great ! Thank you so much !! But about Queue number, maybe it could be displayed between QueueActions and -EmptyList ?

hansi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: Queue buttons placement
« Reply #3 on: August 30, 2015, 01:57:39 »
Woops, I forgot to mention that I had to add a "group=" parameter to QueueActions + EmptyList + ShuffleList + QueueList in order to make the buttons functional with the good Queue, the left one instead of the main one (on the right)...

hansi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: Queue buttons placement
« Reply #4 on: August 31, 2015, 09:40:30 »
Great! I finally succeed by tinkering a new widget based on Pos!

Well, it's not nearly as good and convenient that if it was in the title of the tab (like the original Shimmer layout), but it's better than nothing...



gmusicbrowser_layout.pm:
Code: [Select]
PosMini =>
{ class => 'Layout::Label',
group => 'Play',
xalign => .5,
initsize=> ::__n("%d song","%d songs",99999),
update => sub  { my $t=(@$::ListPlay==0) ? '':
@$::Queue ? ::__n("%d song","%d songs", scalar @$::Queue):
!defined $::Position ? ::__n("%d song","%d songs",scalar @$::ListPlay):
($::Position+1).'/'[email protected]$::ListPlay;
  $_[0]->set_markup_with_format( '<i>%s</i>', $t );
},
click1 => 'MenuQueue',
click3 => sub { ::ChooseSongs([::GetNeighbourSongs(5)]) unless $::RandomMode || @$::Queue; },
event => 'Pos Queue Filter',
},

Corrected layout code:
Code: [Select]
NBList = (tabpos="bottom") VBQueueWithButtons HBparcourir HBLyrics VBAlbuminfo VBArtistinfo
HBQueueButtons = QueueActions(group=2) _PosMini -EmptyList(group=2) -ShuffleList(group=2)
VBQueueWithButtons= (tabtitle=_"Queue",tabicon=gmb-song) _QueueList(songtree=1,group=2,cols="queuenumber titleaa",colwidth="queuenumber 20 titleaa 248",showbb=1,hscrollbar=0) HBQueueButtons