gmusicbrowser Forum

Main board => Customization => Topic started by: cruelangel on February 10, 2012, 22:52:05

Title: [layout] Simplyer *updated on Valentine's day*
Post by: cruelangel on February 10, 2012, 22:52:05
I modded the rhythmbox layout to create this very simple layout, sort of inspired by decibel 2.
Hope you guys like it. :3

Changelog:
2012.02.14:
- Added albumart overlay (it now has a rounded corners)
- Created a menubar, and made both the menubar and the menubutton optional
- Added default playlist headers
2012.02.11: Cleaned up code.



And here are two questions:
1. Is there a way to define default headers for SongList?
2. Could it be possible to create a single layout, that adapts to desktop environment? (My ideal idea is that if it's in unity, it exports the menu as a normal menu, and in anything else, it would use the elementary style appmenu button like now.) - I'm guessing it's not possible.
Title: Re: [layout] Simplyer *updated*
Post by: laite on February 13, 2012, 18:44:12
And here are two questions:
1. Is there a way to define default headers for SongList?

Hi, that's nice and simple layout, I like it! For your question #1, you can use 'cols'. Example:
Code: [Select]
SongList1(cols="album year length")
Title: Re:[layout] Simplyer *updated*
Post by: Quentin Sculo on February 14, 2012, 02:03:14
2. Could it be possible to create a single layout, that adapts to desktop environment? (My ideal idea is that if it's in unity, it exports the menu as a normal menu, and in anything else, it would use the elementary style appmenu button like now.) - I'm guessing it's not possible.
No it's not possible. I'm not aware of a standard way to check if a global menu is used. The only thing I know is the global menu works by defining a environment variable that tells gtk to use a given plugin. I'm not even sure it still works that way. So that would mean checking the plugin filename which is not a very nice method, though I guess it could work. If anyone knows a better way to check if there is a global menu let me know.
Title: Re: [layout] Simplyer *updated*
Post by: cruelangel on February 14, 2012, 12:14:19
And here are two questions:
1. Is there a way to define default headers for SongList?

Hi, that's nice and simple layout, I like it! For your question #1, you can use 'cols'. Example:
Code: [Select]
SongList1(cols="album year length")
Thanks, added it. :3


Now about the Menubar/Menubutton/Unity thing: Now there's an optional menubar and an optional menubutton, and they can be disabled from each other. I wanted it to be simply toggle-able, as in, if you enable the Menubutton, de Menubar hides and vice-versa. That does not seemed to work. I set the button hidden by default, made the option to toggle both, but either they both unhide themselves, or they both become hidden. (That is obviously a big no.)
BTW weird/funny feature, that in Unity the global menu always shows the menubar, even if you set it hidden.

Aaaand... here's a new question: Right now the layout does not show where it is right now in the song in minutes:seconds. (LabelTime) Is it needed? If yes, where should I put it? Should I just turn the slider in to a progressbar with time overlay like in the Exaile layout?
Title: Re : Re: [layout] Simplyer *updated*
Post by: mgrubert on February 15, 2012, 12:33:24
Now about the Menubar/Menubutton/Unity thing: Now there's an optional menubar and an optional menubutton, and they can be disabled from each other. I wanted it to be simply toggle-able, as in, if you enable the Menubutton, de Menubar hides and vice-versa. That does not seemed to work. I set the button hidden by default, made the option to toggle both, but either they both unhide themselves, or they both become hidden. (That is obviously a big no.)

Give a try to something like this :

hidden = Menubar | ButtonForMenubutton

Menubar =
Menubutton =
ButtonForMenubar = ToggleButton1(icon=gtk-go-up,widget=Menubar| ButtonForMenubutton,togglegroup=1,tip=_"Switch to classic menu")
ButtonForMenubutton = ToggleButton2(icon=gtk-go-down,widget=Menubutton| ButtonForMenubar,togglegroup=1,tip=_"Switch to button menu")

Title: Re: Re : Re: [layout] Simplyer *updated*
Post by: cruelangel on February 16, 2012, 01:27:16
Give a try to something like this :...
Well that's not exactly what I wanted, since that would introduce a new button, which I don't want.
It should be a simple menu item in the View menu. If you click that, it hides the whole menubar, and shows the appmenu button. Then in the appmenu button menu there would be a similar option, that does this the other way around. (Appmenu button goes away, menubar appears.) Well the current version is the next best thing, I guess.
Title: Re: [layout] Simplyer *updated on Valentine's day*
Post by: mgrubert on February 16, 2012, 12:35:48
You could do the same with itemmenu :

In menubar :
MenuItem01(togglewidget=menubar,togglegroup=2,label=_"Classic menu") \
MenuItem02(togglewidget=menubutton,togglegroup=2,label=_"Button menu") \
In menubutton :
MenuItem11(togglewidget=menubar,togglegroup=3,label=_"Classic menu") \
MenuItem12(togglewidget=menubutton,togglegroup=3,label=_"Button menu") \