Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-10-27 21:48:35

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

gtk.css unmounted devices in theme

Hi!

I wonder if someone could point me in a direction what handles unmounted/mounted devices in gtk.css for tweaking the gtk theme.
At the moment the device shows the same color regardless if the device is mounted or not.

Thanks in advance

Offline

#2 2023-10-27 23:19:54

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,034

Re: gtk.css unmounted devices in theme

I don't think you can manipulate the device icons from css.

Internally, thunar calls g_volume_get_icon (from the GIO library) to get the themed icon for the device. You can get a list of the icons that are searched for in the current theme (devices folder) by running:

gio mount -li

...and seeing something like:

themed icons:  [drive-harddisk-solidstate]  [drive-harddisk]  [drive]  [drive-harddisk-solidstate-symbolic]  [drive-harddisk-symbolic]  [drive-symbolic]
symbolic themed icons:  [drive-harddisk-solidstate-symbolic]  [drive-harddisk-symbolic]  [drive-symbolic]  [drive-harddisk-solidstate]  [drive-harddisk]  [drive]

My icon theme, Qogir, has the second one in the list so that one is used.

So all devices, mounted or not, will get the same icon. Additionally, internally thunar sets a 50% alpha value on unmounted values so to look a little dimmer:

          /* 50% translucent for unmounted volumes */
          if (shortcuts_icon_renderer->device != NULL
              && !thunar_device_is_mounted (shortcuts_icon_renderer->device))
            alpha = 0.50;
          else
            alpha = 1.00;

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-10-28 07:28:37

Von_Kossa
Member
Registered: 2011-02-14
Posts: 22

Re: gtk.css unmounted devices in theme

Interesting,
Actually everything works in Thunar, it is in xfdesktop-4.19.1 that it is not working. It is not showing 50% alpha value on unmounted devices.
And if i understand you correctly this is not a theme setting, sounds more like a bug.
Afterall it is a beta.

Offline

#4 2023-10-28 10:40:15

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,034

Re: gtk.css unmounted devices in theme

Ah yes, in xfdesktop 4.19 it doesn't do that. I agree, a bug report is probably best here.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB