You are not logged in.

#1 2017-01-24 01:24:38

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

[SOLVED] Make some XFCE panel plugins icons smaller

Hello I just want to know how to make these to panel plugins smaller...
This is the Pulseaudio Plugin and the Power Manager Plugin.

u9Vav.png

Thanks for any help!

Last edited by Hacksaurus_Babu (2017-04-27 23:47:28)

Offline

#2 2017-01-24 06:54:59

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] Make some XFCE panel plugins icons smaller

It might not be a solution but if you change the panel height, icons will scale accordingly.

Offline

#3 2017-01-24 14:03:24

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

Re: [SOLVED] Make some XFCE panel plugins icons smaller

That would work, but I want to be able to change the size of the icon at any panel height...

Offline

#4 2017-01-24 14:29:21

toz
Member
Registered: 2011-10-28
Posts: 497

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Since those are both GTK3 plugins, something like this in ~/.config/gtk-3.0/gtk.css might work:

.xfce4-panel
    button {
        padding: 6px 6px;
    }

...adjust 6px to suit.

Note1: it will affect all GTK3 buttons in the panel.
Note2: the space has to be available for the padding or the icon will clip.

Edit: Restart the panel for it to take effect: "xfce4-panel -r".

Last edited by toz (2017-01-24 14:30:21)

Offline

#5 2017-01-24 18:58:20

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

Re: [SOLVED] Make some XFCE panel plugins icons smaller

What do mean panel buttons? Does that mean launchers too? I just wanted those 2 plugins to be resized... Is that possible?

Offline

#6 2017-01-24 19:23:10

toz
Member
Registered: 2011-10-28
Posts: 497

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Hacksaurus_Babu wrote:

What do mean panel buttons?

Depending on the plugin, it may make use of the GTKButton widget. If it does, and the plugin is based on GTK3, then the code above will affect it.

Does that mean launchers too?

Some panel plugins have been migrated to gtk3, but the launchers have not yet been (still based on gtk2). So they would not be affected.

I just wanted those 2 plugins to be resized... Is that possible?

In that case, you can specify #widget_names in GTK3 css styling to focus on a specific element. Use this snippet instead to only get at those two items:

#pulseaudio-button { padding: 6px 6px; }
#xfce4-power-manager-plugin { padding: 6px 6px; }

More info on GTK3 styling here and on a helpful tool (Gtk Inspector) here.

Offline

#7 2017-01-25 01:15:45

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Ok I did some digging around some directories and it seems that there is no gtk.css in

 ~/.config/gtk-3.0

So I instead I modified my themes gtk.css, and nothing happened... I simply put:

pulseaudio-button { padding: 6px 6px; }
xfce4-power-manager-plugin { padding: 6px 6px; }

at the very bottom of the file...
Am I doing something wrong?

Off-topic:
I have seen a lot on the XFCE forums (I try to find some already asked questions there, don't have an account) could you help me here? https://bbs.archlinux.org/viewtopic.php … 3#p1685933 Thanks!

Offline

#8 2017-01-25 01:40:47

toz
Member
Registered: 2011-10-28
Posts: 497

Re: [SOLVED] Make some XFCE panel plugins icons smaller

A couple of things:

1. ~/.config/gtk-3.0/gtk.css is an override file in which to put user-specifics tweaks to the theme. Manually changing the theme's files can be problemmatic if the theme is updated later (your changes will be over-written). If the ~/.config/gtk-3.0/gtk.css doesn't exist, then create one. It will be processed.

2. For the snippet to add, you need to use the #s (they are not comment markings like in shell scripts). These are used in css to identify a specific widget by name.

So to sum up, create the ~/.config/gtk-3.0/gtk.css file and add the following to it:

#pulseaudio-button { padding: 6px 6px; }
#xfce4-power-manager-plugin { padding: 6px 6px; }

...then restart the xfce4-panel:

xfce4-panel -r

...to have it re-read the settings.

If this doesn't work, post back the gtk and icon themes that you are using.

(As for the off-topic link, I'll post in there).

Offline

#9 2017-01-25 01:50:51

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Aha it works! Marking as solved!
Thanks for the help!

EDIT: So how would I create space so I can make my icons bigger?

Last edited by Hacksaurus_Babu (2017-01-25 01:54:45)

Offline

#10 2017-01-25 02:08:02

toz
Member
Registered: 2011-10-28
Posts: 497

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Hacksaurus_Babu wrote:

So how would I create space so I can make my icons bigger?

To make the icons bigger, decrease the px padding values. For instance, change the "6px" to "3px".

Offline

#11 2017-01-25 02:11:46

Hacksaurus_Babu
Member
Registered: 2017-01-21
Posts: 106

Re: [SOLVED] Make some XFCE panel plugins icons smaller

Hmmm ok, can I make a padding value less than 1 but greater than 2?

Offline

#12 2020-08-18 00:41:02

saint613
Member
Registered: 2020-06-25
Posts: 11

Re: [SOLVED] Make some XFCE panel plugins icons smaller

/home/user/gtk-3.0/gtk.css

#pulseaudio-button * { -gtk-icon-transform: scale(0.6); }
#xfce4-power-manager-plugin * { -gtk-icon-transform: scale(0.6); ]}

Offline

#13 2020-08-18 01:09:36

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Make some XFCE panel plugins icons smaller

saint613, this thread is three years old. Please do not necrobump.

Closing.

Offline

Board footer

Powered by FluxBB