Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-04-09 21:18:19

memeplex
Member
Registered: 2013-11-21
Posts: 4

xthickness/ythickness settings for panel icon padding

Hi all, I would like to revisit this unanswered topic http://forum.xfce.org/viewtopic.php?id=8120 and even go a bit further. As tauro before, I need to tweak the thickness in a differentiated way for each panel. But from a more general perspective, it would be nice to know how to select specific items in each panel, not only specific panels. That is, the syntax and semantics of theme rules and the selectors for the most common applets and panel items, beyond the usual copy&paste recipe that anyone can find simply googling "xfce xthickness". Is there any savvy user/developer here that can explain this in a more illuminating and detailed way? Then the wiki could be expanded with these new gems of information. Best regards, Carlos.

Offline

#2 2014-04-10 00:09:44

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,335

Re: xthickness/ythickness settings for panel icon padding

If you go to the Panel Preferences -> Items tab, and hover your mouse over one of the items, a tooltip will pop up that will contain the internal-name. The internal-name is the widget name, so you can do something like:

style "my-launchers"
{
    xthickness = 3
    ythickness = 3
}

widget "*launcher*" style "my-launchers"

This will affect all launchers, but you can be more specific with the widget name to affect individual launchers.

Offline

#3 2014-04-10 18:26:03

memeplex
Member
Registered: 2013-11-21
Posts: 4

Re: xthickness/ythickness settings for panel icon padding

That's a very useful tip, ToZ, thanks for sharing it. I see you use the widget directive, how do you know whether to use widget, widget_class or class? The typical recipe includes the three of them:

widget_class "*Panel*" style "panel"
widget "*Panel*" style "panel"
class "*Panel*" style "panel"

Offline

#4 2014-04-10 21:47:19

ToZ
Moderator
From: Toronto, Canada
Registered: 2011-06-02
Posts: 1,335

Re: xthickness/ythickness settings for panel icon padding

how do you know whether to use widget, widget_class or class?

Good question. I used widget in this example because we knew the actual widget name (being that it is exposed through the tooltip). When you don't know the widget name or want to effect change on a class of similar widgets, then you would use the widget_class or class options.

Understanding the widget hierarchy is key to this. Also knowing how Xfce extends those classes is important, but for the most part, you're looking at the source code for this. Personally, I feel my understanding is rudimentary, so take this with a grain of salt.

If you don't know the widget name or you want to effect a class of widgets, you can use the widget_class parameter. Referring back to the hierarchy, you can see that alot of button widgets are derived from the GTKButton. Therefore, to effect all button-based widgets you can do something like:

widget_class "*Button*" style "mystyle"

...or by something like the Panel class you mention above if you want to effect all Panel classes (instantiated from I'm not sure which class - you'd have to look at the source). Class I believe is just a higher level.

Alot of times you see all 3, I wonder if its just to make sure you cover all your bases.

EDIT: Just came across this. Looks like a helpful explanation.

Last edited by ToZ (2014-04-10 21:48:25)

Offline

Board footer

Powered by FluxBB