Author Topic: Display current filter  (Read 3243 times)

robber49

  • Newbie
  • *
  • Posts: 9
    • View Profile
Display current filter
« on: March 08, 2012, 00:37:25 »
I've been messing around with my layout again recently and I am wondering if there is a way to display just a simple text label showing the currently active filter (or static list). Maybe I am overlooking something it but I don't see any way to do it.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1100
    • View Profile
Re: Display current filter
« Reply #1 on: March 08, 2012, 02:16:34 »
Currently the only way is the with_text=1 option of Filter : Filter(with_text=1) this will show the filter name or "static list"/"unnamed filter" next to the filter icon. I guess it could be improved by showing the name of the static list if it is has one, instead of "static list".

robber49

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Display current filter
« Reply #2 on: May 16, 2012, 01:11:12 »
Would it be possible to change the font? Or maybe get rid of or change the Icon?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1100
    • View Profile
Re: Display current filter
« Reply #3 on: May 16, 2012, 01:35:00 »
yes, to change the font you can use the markup option, which use the pango markup, %s will be replaced by the text :
Code: [Select]
markup=<b>%s</b>
markup='<span font="Arial 18">%s</span>'

for the icons, the widget has 3 modes : library filter list
you can change the icon of one or more of these modes with this option :
Code: [Select]
stock="library:0 filter:gmb-filter-ok list:gtk-edit"you can use 0 to disable an icon, you can add custom icons in ~/.config/gmusicbrowser/icons/

example with all icons disabled (currently you have to disable each of them individually) :
Code: [Select]
Filter(with_text=1,markup=<b>%s</b>,stock="library:0 filter:0 list:0")