Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-04-15 16:55:56

Case
Member
Registered: 2017-04-15
Posts: 12

[solved] Dark panel background - border around systray doesn't go away

I recently switched from using just dockbarx and no panel to a Xfce panel using the dockbarx panel plugin. Switching the panel to a dark background color had all kinds of unexpected side effects (ugly light background when hovering over buttons, foreground color of the digital clock), but I managed to fix these by adding some snippets I found on the net to .gtkrc -2.0 (see below).

I couldn't find a solution for my final problem though: In the properties of the systray plugin, "Show frame" is disabled, yet there's still a light frame around the systray (see screenshot below, systray is at the bottom of the screenshot).

Can I fix this using gtkrc? I couldn't find any widget/class names yet referring to this particular item.

panel.png

For completeness' sake, here's what I added to gtkrc so far:

style "mypanel" 
{
	fg[NORMAL] = "#FFFFFF"
	fg[PRELIGHT] = "#FFFFFF"
	fg[ACTIVE] = "#FFFFFF"
	engine "pixmap"
	{
		image
		{
			function	= BOX
			recolorable	= TRUE
			state		= PRELIGHT
			file		= "panel-button-hover.png"
			border		= { 1, 1, 0, 0 }
			stretch		= TRUE
		}
		image
		{
			function	= BOX
			recolorable	= TRUE
			state		= ACTIVE
			file		= "panel-button-hover.png"
			border		= { 1, 1, 0, 0 }
			stretch		= TRUE
		}
	}
}

widget "*Xfce*Panel*"			style "mypanel"
class "*Xfce*Panel*"			style "mypanel"
widget "*PanelWidget*"			style "mypanel"
widget "*PanelApplet*"			style "mypanel"
widget "*fast-user-switch*"		style "mypanel"
widget "*CPUFreq*Applet*"		style "mypanel"
widget "*indicator-applet*"		style "mypanel"
class "PanelApp*"			style "mypanel"
class "PanelToplevel*"			style "mypanel"
widget_class "*PanelToplevel*"		style "mypanel"
widget_class "*notif*"			style "mypanel"
widget_class "*Notif*"			style "mypanel"
widget_class "*Tray*"			style "mypanel"
widget_class "*tray*"			style "mypanel"
widget_class "*computertemp*"		style "mypanel"
widget_class "*Applet*Tomboy*"		style "mypanel"
widget_class "*Applet*Netstatus*"	style "mypanel"

Last edited by Case (2017-04-16 19:28:16)

Offline

#2 2017-04-15 18:03:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [solved] Dark panel background - border around systray doesn't go away

Hello and welcome.

Can you confirm a few things?

1. What version of xfce4-panel are you using? Is it the new gtk3 build?

2. Which appearance theme are you using?

3. If you remove the gtk hacks that you have in place and restart the panel (xfce4-panel -r), does the frame disappear?

4. Does it help if you set the border lines to "{0, 0, 0, 0}"?

And finally, what is the result of:

xfconf-query -c xfce4-panel -lv | grep show-frame

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 2017-04-15 18:35:30

Case
Member
Registered: 2017-04-15
Posts: 12

Re: [solved] Dark panel background - border around systray doesn't go away

ToZ wrote:

1. What version of xfce4-panel are you using? Is it the new gtk3 build?

No, 4.12.1 on Debian Testing.

2. Which appearance theme are you using?

Adwaita. I only changed the panel's background to a (dark) color in the properties dialog.

3. If you remove the gtk hacks that you have in place and restart the panel (xfce4-panel -r), does the frame disappear?

No. It's been there from the beginning, it's just the last problem I'm tackling. I just reconfirmed by removing the hacks and restarting - systray looked the same.

4. Does it help if you set the border lines to "{0, 0, 0, 0}"?

No visible change. While switching to Adwaita-Dark and back to Adwaita (which is what I usually do to force a reread of gtkrc), I just noticed that the frame turns from light grey to black when using Adwaita-Dark, so it's definetely something that can be affected by the theme. I'll sift through the text files to see if anything stands out.

And finally, what is the result of:

xfconf-query -c xfce4-panel -lv | grep show-frame
/plugins/plugin-3/show-frame          false

Activating the tray's frame in the properties dialog does add some border (I think - it's hard to tell, because the newly added border seems to use the same color as my panel background, but the tray moves around a pixel or two when I activate/deactivate the frame), so whatever is displayed here is apparently not the standard frame.

Thanks a lot for your help.

Last edited by Case (2017-04-15 18:38:51)

Offline

#4 2017-04-15 23:57:22

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [solved] Dark panel background - border around systray doesn't go away

Everything looks right. I can't replicate this on any of my systems, though I don't have debian sid installed anywhere.

Does changing the "Maximum Icon Size" setting in the Notification Area properties make a difference?


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 2017-04-16 14:26:50

Case
Member
Registered: 2017-04-15
Posts: 12

Re: [solved] Dark panel background - border around systray doesn't go away

ToZ wrote:

Does changing the "Maximum Icon Size" setting in the Notification Area properties make a difference?

No, I have tried all kinds of settings changes in the meantime, including position, orientation, # of columns, icon size for panel and tray etc.

Actually, I'm thinking 'bug' now. I didn't notice at first, but that frame around the tray is always there, even in a plain standard dock. I created a new one leaving all panel settings on default and then added the tray. This is what the result looks like...

...with "Show frame" option in the systray properties turned on:

tray_with_border.png

...with "Show frame" option in the systray properties turned off:

tray_without_border.png

If you watch both pictures in a picture viewer and jump back and forth between them, you'll notice that the frame around systray is slightly wider in the first picture, that's the only difference between the two.

Since you can't reproduce that, it's probably something on my system. I'll ask on a Debian forum if anybody can reproduce it. What components would be of interest here, apart from xfce4-panel? I can only think of gtk2:

user@desktop:~$ pkg-config --modversion gtk+-2.0
2.24.31

Thanks again for your efforts.

Last edited by Case (2017-04-16 14:27:07)

Offline

#6 2017-04-16 14:36:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [solved] Dark panel background - border around systray doesn't go away

Just to be absolutely sure, what does the following return:

ldd /usr/bin/xfce4-panel | grep gtk

Can you try a different icon theme? Maybe the network manager icon itself has some sort of border?

What happens if you add a second icon to the notification area by starting an app that adds an icon to the systray?

Also, can you try creating a second user on your system to see if the problem persists? Try to rule out some sort of profile issue.

The only components would be xfce4-panel, the notification area plugin (that is part of xfce4-panel) and the network manager applet. And the Adwaita theme as well. Does this happen with other appearance themes as well?


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 2017-04-16 16:26:22

Case
Member
Registered: 2017-04-15
Posts: 12

Re: [solved] Dark panel background - border around systray doesn't go away

ToZ wrote:

And the Adwaita theme as well. Does this happen with other appearance themes as well?

Ouch, now I feel really stupid. I was sure I had checked other themes already, so that was the one thing I didn't try again. I just did, to be on the safe side - and with the Xfce* themes, the frame is gone.

So it is a problem with the adwaita theme, sorry about that.

I spent quite some time now staring at the gtkrc file of the Xfce theme, and randomly copying bits to my gtkrc file - to see what part of the theme affected the systray - but I couldn't find anything. Maybe it's something in the Adwaita theme that's missing in the Xfce theme, I'll have another look at that next.

It would help if I know what widget the tray was using, and how to target just that particular widget if possible. Is there any documentation on that? the plugin's docs don't mention anything.

Offline

#8 2017-04-16 17:19:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [solved] Dark panel background - border around systray doesn't go away

Just looking at the Adwaita gtk2 theme files. It looks like it has a frame.png file for the GtkFrame widget. Lets try overriding the border width specified by the theme by using the following snippet in ~/.gtkrc-2.0?

style "my-frame" {

  engine "pixmap" {

    image {
      function = SHADOW
      file     = "assets/frame.png"
      border   = {0, 0, 0, 0}
      stretch  = TRUE
    }

    image {
      function       = SHADOW_GAP
      file           = "assets/frame.png"
      border         = {0, 0, 0, 0}
      stretch        = TRUE
      gap_start_file = "assets/border.png"
      gap_end_file   = "assets/border.png"
    }

  }

}
class "GtkFrame" style "my-frame"

Also create ~/assets/frame.png and ~/assets/border.png files that are fully transparent. (There might be an easier way of doing this, but I'm not sure how).

If this works, it will affect all of the GtkFrame widgets within the theme. You can try limiting it's effect on only the systray by replacing the last line in that snippet with:

widget_class "*XfcePanel*Systray*" style "my-frame"

Unfortunately, I can't replicate this on my system to test so I'm just guessing.

It would help if I know what widget the tray was using, and how to target just that particular widget if possible. Is there any documentation on that? the plugin's docs don't mention anything.

Here is the 4.12 glade file that shows all of the GTK Widgets that are being used. I believe it is GtkFrame that is the issue here.

Last edited by ToZ (2017-04-16 19:56:09)


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 2017-04-16 19:27:44

Case
Member
Registered: 2017-04-15
Posts: 12

Re: [solved] Dark panel background - border around systray doesn't go away

ToZ wrote:

If this works, it will affect all of the GtkFrame widgets within the theme. You can try limiting it's effect on only the systray by replacing the last line in that snippet with:

widget_class "*XfcePanel*Systray*" style "my-frame"

This (and making sure both the style and the style invocation use the same name) worked perfectly fine!

Thanks a lot for all the help. I sure hope they're paying you enough for that kind of end user support, LOL.

Offline

#10 2017-04-16 19:57:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: [solved] Dark panel background - border around systray doesn't go away

Case wrote:

This (and making sure both the style and the style invocation use the same name) worked perfectly fine!

Oops. I fixed the typo in my post.

Thanks a lot for all the help. I sure hope they're paying you enough for that kind of end user support, LOL.

All the virtual cookies I can eat smile


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