Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-05-09 13:29:34

Mitt
Member
Registered: 2014-08-05
Posts: 26

[Solved] Changing panel icons sizes

Hi,

I found that changing gtk theme also changes sizes of panel icons. For example, assuming that the panel is 27 pixels big, Bluebird have much bigger icons on the panel comparing to Adwaita or Ceti-2 which I am using now. What does set it?

Thank you

Yeah, here are screenshots, Bluebird and Ceti-2
http://imgur.com/omXfiF4
http://imgur.com/bZzdmye

Offline

#2 2015-05-09 14:30:49

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

Re: [Solved] Changing panel icons sizes

That would be the result of padding. In each of the theme's gtk-2.0/panel.rc file, you will find xthickness and ythickness values. These represent the space between the edge and the start of the button.

Ceti-2 has:

xthickness = 4
ythickness = 3

Bluebird has:

xthickness      = 1
ythickness      = 0

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 2015-05-09 15:30:36

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

Thank you

Offline

#4 2015-05-20 14:43:56

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

What if there is no panel.rc file? In themes like QNX, Clearlooks etc. there is nothing but buttons are different though for example in QNX they're much bigger than in Clearlooks or Adwaita.

Offline

#5 2015-05-20 15:15:08

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

Re: [Solved] Changing panel icons sizes

Edit (or create if it doesn't exist) the file ~/.gtkrc-2.0 and add the following into it:

##############################################################################
### Window button padding
style "theme-panel"
{
	xthickness	= 3
	ythickness	= 3
}
widget "*tasklist*" style "theme-panel"

...and adjust the values as required.


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

#6 2015-05-20 15:46:26

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

Hmm I did it with

style "theme-panel"
{
	xthickness	= 1
	ythickness	= 0
}
widget "*tasklist*" style "theme-panel"

But it didn't change anything no matter what theme I choose.

Offline

#7 2015-05-20 18:20:17

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

Re: [Solved] Changing panel icons sizes

Hmmm. I tested with the Numix and Meditteranean themes and it worked. Now that I try some of the other themes, I see your point.

I wonder if it has something to do with re-using the "theme-panel" style name. If instead, I use:

##############################################################################
### Window button padding
style "my-tasklist-padding" 
{
        xthickness      = 1
        ythickness      = 0
}
widget "*tasklist*" style "my-tasklist-padding"

...it seems to work for all the themes that I have except Ceti-2. Will have to have a closer look to see why that particular theme doesn't abide by this directive.

Also, the Appearance theme needs to be changed for it to read and process any changes to that file.


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

#8 2015-05-20 18:25:10

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

Re: [Solved] Changing panel icons sizes

Okay, git it. Ceti is forcing a certain button padding. The following should overwrite tasklist settings for all themes:

##############################################################################
### Window button padding
style "my-tasklist-padding" 
{
        xthickness      = 1
        ythickness      = 0
}
widget "*tasklist*" style:highest "my-tasklist-padding"

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

#9 2015-05-20 19:34:06

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

Still nothing, Clearlooks has same small buttons it had had, and these buttons change in size when I switch themes.

Maybe need to write panel.rc for Clearlooks lol

Offline

#10 2015-05-20 20:14:39

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

Re: [Solved] Changing panel icons sizes

I just dropped the Clearlooks theme onto my system and the code snippet changes the button sizes. Are you using any other gtk hacks? Is there something else in your ~/.gtkrc-2.0 or /etc/gtk-2.0/gtkrc files?


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

#11 2015-05-20 20:19:09

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

Nope, mine ~/.gtkrc-2.0 is empty and I don't have /etc/gtk-2.0/gtkrc file.

Offline

#12 2015-05-20 20:27:10

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

Re: [Solved] Changing panel icons sizes

I'm not sure why its not working on your system. Which distro are you using? Which version of Xfce?


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

#13 2015-05-20 20:38:54

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

4.12, I pulled it from Debian experimental, I'm using Devuan. Everything related to gtk, xfce and other user interface stuff is from sid and experimental (if exists).

Offline

#14 2015-12-05 13:18:27

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: [Solved] Changing panel icons sizes

Hi again,

I was playing with themes recently and decided to make panel.rc myself.

Here's Clearlooks example I currently use:

style "panel-button" {

    xthickness = 0
    ythickness = 0
  
    bg[NORMAL]        = shade (1.04, @bg_color)
    bg[PRELIGHT]      = shade (1.06, @bg_color)
    bg[ACTIVE]          = shade (0.85, @bg_color)

}

widget "*PanelWidget*"		style "panel-button"
widget "*PanelApplet*"		style "panel-button"
class "PanelApp*"		        style "panel-button"
class "PanelToplevel*"		style "panel-button"
widget_class "*PanelToplevel*"	style "panel-button"
widget_class "*notif*"		        style "panel-button"
widget_class "*Notif*"		        style "panel-button"
widget_class "*Tray*"		        style "panel-button" 
widget_class "*tray*"		        style "panel-button"
widget "*Xfce*Panel*"		        style "panel-button"
class "*Xfce*Panel*"	                style "panel-button"

I took colours from Clearlooks' gtkrc where <<style "button">> is located. Also if you want to use panel.rc, don't forget to put

include panel.rc

anywhere into gtkrc. You can also put it inside gtkrc.

Cheers

Mitt

Last edited by Mitt (2015-12-05 13:21:40)

Offline

Board footer

Powered by FluxBB