1

Is possible add a icon in the navigation items of GtkStackSidebar like the simulation image below?

enter image description here

Matheus Saraiva
  • 1,144
  • 1
  • 11
  • 33
  • 1
    I don't know if this will work, or what minimum version of GTK+ you need for this, but investigate the [`icon-name` child property of GtkStack](https://developer.gnome.org/gtk3/stable/GtkStack.html#GtkStack--c-icon-name). I also don't know if this will let you use custom icons or not. – andlabs Oct 07 '16 at 20:24
  • It seems to work with `GtkStackSwitcher` [(case)](http://stackoverflow.com/questions/23662257/how-do-i-change-the-property-of-a-gtk-widget-such-as-a-stack). But according to my tests does not work with `GtkStackSidebar` :(. I'm setting the property but nothing happened. – Matheus Saraiva Oct 08 '16 at 00:41
  • 1
    The side bar is just a listbox with labels, you could either make your own with icons or figure out a way to modify it. An example would be Nautilus has a sidebar with icons. – TingPing Oct 08 '16 at 13:15
  • The Nuatilus sidebar is a `GtkPlacesSidebar`. – Matheus Saraiva Oct 08 '16 at 13:23
  • Which is just a listbox as I said. – TingPing Oct 08 '16 at 16:29
  • @MatheusSaraiva Were you able to solve this? – Behrooz Jan 13 '20 at 08:30
  • Gnome Settings use a `GtkListBox`: https://github.com/GNOME/gnome-control-center/blob/master/shell/cc-panel-list.ui – e-info128 Nov 01 '21 at 16:36
  • Gnome Tweaks (which is shown in the question) also uses a `ListBox`: https://github.com/GNOME/gnome-tweaks/blob/9b246fef298bff1dceffcf81160d6da652735208/gtweak/tweakview.py#L13 I think that's the best bet. – Sylvester Kruin Nov 19 '21 at 23:33

0 Answers0