Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-01-09 11:04:37

OlafD
Member
Registered: 2023-06-22
Posts: 5

[SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

Hi everyone,

is it possible to change the icon/button in this plugin? I've tried various changes in gtk.css, but nothing works, because i don't know the wright spelling for this classes/id's etc.

The button is very useful for calling the corresponding directory. Unfortunately, my panel is 50 px large and therefore the button of the plugin is very large and I would like to make it appear smaller.

Can you help me?

Thanks in advance.

Greatings Olaf

Last edited by OlafD (2024-01-11 11:44:25)

Offline

#2 2024-01-09 18:08:14

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

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

Hello and welcome.

Assuming version 1.1.3, you can use:

#fsguard-15 #xfce-panel-button image {-gtk-icon-transform: scale(0.50);}

...change "15" to match the id of your plugin that you can get from hovering over the plugin in the Items tab of xfce4-panel Properties dialog. Also adjust "0.50" to suit.


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 2024-01-10 07:11:24

OlafD
Member
Registered: 2023-06-22
Posts: 5

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

ToZ wrote:

Hello and welcome.

Assuming version 1.1.3, you can use:

#fsguard-15 #xfce-panel-button image {-gtk-icon-transform: scale(0.50);}

...change "15" to match the id of your plugin that you can get from hovering over the plugin in the Items tab of xfce4-panel Properties dialog. Also adjust "0.50" to suit.

Great...that works! Many thanks!!!

Next is: Is it possible to reduce the margins around the image? I've tried this:

#fsguard-2 #xfce-panel-button image {
	-gtk-icon-transform: scale(0.50);
	margin-top: -20px;
	margin-bottom: -20px;
	margin-left: -20px;
	margin-right: -20px;
	}

But nothing happens.

P.S. Is there any more-detailed-documentation about the possibility of theming xfce4-panel what i can study?

Offline

#4 2024-01-10 11:07:16

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

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

OlafD wrote:

Next is: Is it possible to reduce the margins around the image?

What exactly are you trying to accomplish? Are you trying to move the icon closer to the label?
By setting the same negative margin on all sides you are simply negating all of them. Try just one side to see an effect.

P.S. Is there any more-detailed-documentation about the possibility of theming xfce4-panel what i can study?

  • The xfce4-panel doc pages have some theming information buried into them if you wish to peruse them.
    .

  • The gtk3 documentation (specifically CSS Overview and CSS Properties).
    .

  • This forum is another good source as there are many theme-related questions here. Use the search feature.
    .

  • I also like to look at the source code of existing themes, especially the gtk3 default Adwaita theme and Greybird (which is written by an Xfce contributor).
    .

  • And finally, the GTK3 Inspector tool is a very helpful resource.


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

#5 2024-01-10 12:44:49

OlafD
Member
Registered: 2023-06-22
Posts: 5

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

What exactly are you trying to accomplish? Are you trying to move the icon closer to the label?
By setting the same negative margin on all sides you are simply negating all of them. Try just one side to see an effect.

Yes, you're right.

I want to make this margins thinner (red arrows)

U1CdTnF.png

If I only use margin-top, then the top edge decreases.

#fsguard-2 #xfce-panel-button image {
	-gtk-icon-transform: scale(0.50);
	margin-top: -20px;
	}

Result:
Q2j0FZu.png

But when I add margin-bottom, nothing happens at the bottom and the upper margin is restored.

#fsguard-2 #xfce-panel-button image {
	-gtk-icon-transform: scale(0.50);
	margin-top: -20px;
	margin-bottom: -20px;
	}

Result:
6nnKz3l.png

Offline

#6 2024-01-10 15:40:56

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

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

-gtk-icon-transform only resizes the image, but not the container of that image. The other thing you can do is to try to also move the label element upwards using negative margins like this (looks like the progressbar is tied to the label and will also move up:

#fsguard-2 #xfce-panel-button image {
	-gtk-icon-transform: scale(0.50);
	margin-top: -20px;
	}
#fsguard-2 box label {
	margin-top: -20px;
	}

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

#7 2024-01-11 08:23:35

OlafD
Member
Registered: 2023-06-22
Posts: 5

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

Yeeepppiiieee...GREAT....that's it!

MAAAAAAAANY many THANKS !

I've played a little with the params:

#fsguard-2 #xfce-panel-button image {
	-gtk-icon-transform: scale(0.50);
	}
	
#fsguard-2 box label {
	margin-top: -40px;
	margin-bottom: -35px;
	}

And that's the result:

OPTlp7B.png


But it was very tricky to play with the params of the margins of `box label`. When i don't set the margin-bottom, then the progress bar is to far from label. But at the same time, i also have to adjust the value of margin-top, otherwise there is a confused mess of label and progress bar. That's what I meant at the top with "played".

P.S. Thanks for the hints of study GTK and CSS. That is exactly what I mean: How am I supposed to know that I have to enter `box` and `label` there to address certain graphical elements and change their values. I hope the docs will guide me into the wisdom there.

Offline

#8 2024-01-11 08:33:01

OlafD
Member
Registered: 2023-06-22
Posts: 5

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

P.S. I don#t know how to set this topic as [SOLVED] roll

Offline

#9 2024-01-11 10:44:28

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

Re: [SOLVED] xfce4-fsguard-plugin - Reduce Icon-size

OlafD wrote:

P.S. Thanks for the hints of study GTK and CSS. That is exactly what I mean: How am I supposed to know that I have to enter `box` and `label` there to address certain graphical elements and change their values. I hope the docs will guide me into the wisdom there.

The GTK Inspector will be most helpful here. It will allow you to see the actual widget layouts.

fsguard.png

P.S. I don#t know how to set this topic as [SOLVED]

Edit your first (initial) post and you prepend "[SOLVED]" to the subject line.

Last edited by ToZ (2024-01-11 10:48:08)


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