squentin / gmusicbrowser

jukebox for large collections of music
http://gmusicbrowser.org
GNU General Public License v3.0
194 stars 42 forks source link

How to make folder search box persistent? (enhancement) #232

Open MountainX opened 2 years ago

MountainX commented 2 years ago

In the standard playlist layout and the panes on the right, when I single click on an item in the folder list, I can then start typing text to search for other items in that list. A text input field appears at the bottom of the pane with my search term.

I would like to make that text input field persistent. I want it to always show. The reason is that i wish to avoid having to click on a list item as a prerequisite for searching for another item. I have tried clicking on the header tab of the pane (e.g., "Folder") and then typing but no search box appears when doing that.

An enhancement would be adding an option in the settings menu to persistently show a search input field. Absent that, is there a simple way to customize the CSS to achieve my goal?

QaldeK commented 2 years ago

Hi, You can customize the layout (you can copy the one you want to modify in /usr/share/gmusicbrowser/layouts/ to ~/.config/gmusicbrowser/layouts/ ). There is documentation about layout customization.
With the option "searchbox=1" you can add a persistent searchbox, but it don't exactly the same as the one it appears when you type, and its only for Artist/Album/Genre panel. The line in the "playlist layout" with the "searchbox" option added : HPfp0 = FilterPane0(nb=1,hidebb=1,page=artists,page_artists/lmarkup=1,searchbox=1) FilterPane1(nb=2,hidebb=1,page=album,page_album/lpicsize=32,page_album/lmarkup=1,searchbox=1)

MountainX commented 2 years ago

You can customize the layout (you can copy the one you want to modify in /usr/share/gmusicbrowser/layouts/ to ~/.config/gmusicbrowser/layouts/ ).

Thanks. How do I figure out which standard layout file I'm using? In the GMB GUI, I have "Playlist" layout selected. Does that correspond to /usr/share/gmusicbrowser/layouts/main.layout?

QaldeK commented 2 years ago

Yes, The playlist layout is in /gmusicbrowser/layouts/main.layout. But there is several layout in this file. Their name are in "[Name layout]. Playlist is [Playlist].

MountainX commented 2 years ago

Following your example, I got this working. It looks super simple after seeing your example, but I would not have been able to figure it out myself from the documentation alone.

its only for Artist/Album/Genre panel.

I'd like to have the persistent search box for the Folder tab too. I read the docs again and tried a few experiments, but did not get the result. Maybe you mean that it is limited by design of GMB, not simply a limitation of your example?

I'm also trying to figure out how to make the time slider (seek bar for the playing song) have more thickness. Maybe you can kindly give me a suggestion for that? The docs mention changing text, but say nothing (afaict) about the thickness of the bar itself.

I tried changing the yscale from 0 to 2, and that totally screwed up my layout while not increasing the thickness of the time line.

ABtimebar   = (yscale=2) TimeBar

Thank you again for your help.

QaldeK commented 2 years ago

I'd like to have the persistent search box for the Folder tab too. I read the docs again and tried a few experiments, but did not get the result. Maybe you mean that it is limited by design of GMB, not simply a limitation of your example? Yep, i thinks it's a limitation.

I dont know if we can modify the thickness of time slider. But you can use alternately TimeBar widget : it's more thickness, and have other option. See doc:

TimeBar : Playing position progress bar

text : specify a text to display inside the bar, it can contain %-letters and $-words, in addition these variables are available : $percent, $current, $left, $total
text_empty : used instead of text when no song is selected
ellipsize : used to ellipsize the text, default to end, can be none, start, middle, or end
font : set the font
MountainX commented 2 years ago

I dont know if we can modify the thickness of time slider. But you can use alternately TimeBar widget : it's more thickness, and have other option. See doc:

TimeBar : Playing position progress bar

I think the Playlist layout is already using that widget. I have this in the standard Playlist layout section.

HBButtons   = Prev Play Next Time 5_ABtimebar

ABtimebar = (yscale=0) TimeBar

However, instead of looking like this image:

http://gmusicbrowser.org/screenshots/itunelike.png

,,,it instead has a very thin line and no handle to grab with the mouse. It's very hard to change the position. I don't know why it looks like it does. But I'm running KDE, so maybe that's why.

MountainX commented 2 years ago

I may be encountering a bug...

The Playlist layout uses a TimeBar defined like this:

ABtimebar   = (yscale=0) TimeBar

In KDE at least, the result is a vertically centered horizontally laid out time control with a very thin line indicating the playing position. To change the position you must click exactly on the thin line.

Changing it to this:

ABtimebar   = TimeBar

results in the same horizontal thin line indicating the playing position, but now it is vertically aligned at the bottom. And clicking anywhere in the widget works for changing the playing position, so it is much easier to use now.

I think it is expected to work like this by default [with (yscale=0) defined], but it doesn't (again, at least on KDE).

My favorite time position widget is the one define in contrib.layout for Category = Conz Name = _"Conz Glimm (different controls)"

However, when I tried copying those definitions into the Playlist layout, I ended up with nothing -- no time position control was displayed. I tried a lot of variations and always ended up with nothing.

How could I use the time position widget from Conz Glimm in the Playlist layout?

Also, I would love to have the vertical volume bar along the right edge of the window in the Playlist layout like I saw in another layout, but I also could not accomplish that.