Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 06-23-2017, 12:08 PM   #1
Weapon S
Registered: May 2011
Location: Netherlands
Distribution: Debian, Archlinux
Posts: 259
Blog Entries: 2

Rep: Reputation: 49
[XFCE][GTK] Get rid of padding in panel plugin?

Picture of what my problem is.
Going from Debian Jessie to Stretch there seems to be padding added to the datetime-plugin (clock + date shown in taskbar). I like my panel tiny, and the introduced padding pushes the date out of bounds.

I am not familiar with it, but I thought maybe I could get rid of the padding via an override in my gtkrc file? I already use that file to get my desktop icons closer together.
Some resources I have found:

Most sources talk about applying a global theme; that is the opposite of what I want to do. I want to override the style of a single element of a single application. So I need to get a specific GTK path?
I would like to add something like this my gtkrc-2.0:
style "my-clock-is-broken" {
	padding =  0
widget "Datetime.*" style "my-clock-is-broken"
So I would need the name of the "window" the datetime plugin runs in? When I run "xwininfo -root -children" it seems the datetime plugin runs in an anonymous window?
xwininfo: Window id: 0x1dc (the root window) (has no name)

  Root window id: 0x1dc (the root window) (has no name)
  Parent window id: 0x0 (none)
     101 children:
     0x2c059f8 "Firefox": ("Popup" "Firefox-esr")  313x188+369+259  +369+259
     0x2c01eae "Firefox": ("Popup" "Firefox-esr")  1920x312+0+124  +0+124
     0x2c01e84 "Firefox": ("Popup" "Firefox-esr")  266x188+676+334  +676+334
     0x2c01efa "The “padding” child property": ("Popup" "Firefox-esr")  211x44+701+637  +701+637
     0x2c01eec "Close tab": ("Popup" "Firefox-esr")  88x44+1255+91  +1255+91
     0x1a0aa30 "wrapper-2.0": ("wrapper-2.0" "Wrapper-2.0")  131x139+1776+10  +1776+10
     0x2c01e6c "Firefox": ("Popup" "Firefox-esr")  1920x42+0+124  +0+124
     0x36055c0 "SciTE": ("SciTE" "SciTE")  133x211+586+407  +586+407
     0x2c059fc "Wrap [CODE] tags around selected text": ("Popup" "Firefox-esr")  278x44+1092+557  +1092+557
     0x1a11413 "wrapper-2.0": ()  10x10+-100+-100  +-100+-100
     0x1a0aa8f "wrapper-2.0": ("wrapper-2.0" "Wrapper-2.0")  192x138+1563+111  +1563+111
     0x2e00c38 "SciTE": ()  10x10+-100+-100  +-100+-100
     0x2c01ef2 "Open a new tab (Ctrl+T)": ("Popup" "Firefox-esr")  182x44+438+87  +438+87
     0x2c01ee4 "Open a new tab (Ctrl+T)": ("Popup" "Firefox-esr")  182x44+446+92  +446+92
     0x2c01eb6 "Firefox": ("Popup" "Firefox-esr")  200x200+0+0  +0+0
     0x2e00023 (has no name): ()  1x1+-1+-1  +-1+-1
     0x2e00018 "SciTE": ("SciTE" "SciTE")  200x200+0+0  +0+0
     0x2e00010 "SciTE": ("SciTE" "SciTE")  200x200+0+0  +0+0
     0x2e00001 "SciTE": ("SciTE" "SciTE")  10x10+10+10  +10+10
     0x2c01e74 "Firefox": ("Popup" "Firefox-esr")  200x200+0+0  +0+0
     0x3601385 "SciTE": ("SciTE" "SciTE")  276x354+661+152  +661+152
     0x3602f5b "SciTE": ("SciTE" "SciTE")  288x329+600+152  +600+152
     0x3600851 "SciTE": ()  10x10+-100+-100  +-100+-100
     0x360062a "SciTE": ("SciTE" "SciTE")  1x1+-99+-99  +-99+-99
     0x3600023 (has no name): ()  1x1+-1+-1  +-1+-1
     0x3600018 "SciTE": ("SciTE" "SciTE")  200x200+0+0  +0+0
     0x3600010 "SciTE": ("SciTE" "SciTE")  200x200+0+0  +0+0
     0x3600001 "SciTE": ("SciTE" "SciTE")  10x10+10+10  +10+10
     0xc0803c "About xfce4-panel": ("xfce4-panel" "Xfce4-panel")  308x214+803+404  +803+404
     0xc00351 "xfce4-panel": ("xfce4-panel" "Xfce4-panel")  173x393+0+20  +0+20
     0x300ef04 "pcmanfm": ("pcmanfm" "Pcmanfm")  170x35+1921+1081  +1921+1081
     0x3a00310 "Mousepad": ()  10x10+-100+-100  +-100+-100
     0xe004fc "xfdesktop": ()  10x10+-100+-100  +-100+-100
     0x30004a8 "pcmanfm": ("pcmanfm" "Pcmanfm")  170x35+1921+1081  +1921+1081
     0x3a0002e (has no name): ()  1x1+-1+-1  +-1+-1
     0x3a00001 "Mousepad": ("mousepad" "Mousepad")  10x10+10+10  +10+10
     0x30062fa "pcmanfm": ("pcmanfm" "Pcmanfm")  1605x991+278+81  +278+81
     0x3006247 "pcmanfm": ()  10x10+-100+-100  +-100+-100
     0x2c00160 "Firefox": ("firefox-esr" "Firefox-esr")  1x1+-99+-99  +-99+-99
     0x3003a01 "pcmanfm": ("pcmanfm" "Pcmanfm")  1x1+-100+-100  +-100+-100
     0x30039ec "pcmanfm": ("pcmanfm" "Pcmanfm")  1x1+-100+-100  +-100+-100
     0x38000e2 "xscreensaver-demo": ("xscreensaver-demo" "Xscreensaver-demo")  166x107+585+345  +585+345
     0x38000d0 "xscreensaver-demo": ("xscreensaver-demo" "Xscreensaver-demo")  160x42+619+345  +619+345
     0x3800041 (has no name): ()  1x1+-1+-1  +-1+-1
     0x3800003 "xscreensaver-demo": ("xscreensaver-demo" "Xscreensaver-demo")  197x69+0+0  +0+0
     0x3800001 "xscreensaver-demo": ("xscreensaver-demo" "Xscreensaver-demo")  10x10+10+10  +10+10
     0xc020e9 "xfce4-panel": ("xfce4-panel" "Xfce4-panel")  274x621+171+141  +171+141
     0xe00300 "xfdesktop": ("xfdesktop" "Xfdesktop")  1x1+-100+-100  +-100+-100
     0x260011c "xfce4-appfinder": ()  10x10+-100+-100  +-100+-100
     0x2000001 "/usr/lib/firefox-esr/plugin-container": ("/usr/lib/firefox-esr/plugin-container" "/usr/lib/firefox-esr/plugin-container")  10x10+10+10  +10+10
     0x300012d (has no name): ()  1x1+-1+-1  +-1+-1
     0x3000001 "pcmanfm": ("pcmanfm" "Pcmanfm")  10x10+10+10  +10+10
     0x3200001 "/usr/lib/firefox-esr/plugin-container": ("/usr/lib/firefox-esr/plugin-container" "/usr/lib/firefox-esr/plugin-container")  10x10+10+10  +10+10
     0x2c0001e "Firefox": ()  10x10+-100+-100  +-100+-100
     0x2c0001b "Firefox": ()  10x10+-100+-100  +-100+-100
     0x2c00003 (has no name): ("Toplevel" "Firefox-esr")  100x100+0+0  +0+0
     0x2c00001 "Firefox": ("firefox-esr" "Firefox-esr")  10x10+10+10  +10+10
     0x260002c (has no name): ()  1x1+-1+-1  +-1+-1
     0x2600001 "xfce4-appfinder": ("xfce4-appfinder" "Xfce4-appfinder")  10x10+10+10  +10+10
     0xe00019 (has no name): ()  1x1+-1+-1  +-1+-1
     0x1a00008 (has no name): ()  1x1+-1+-1  +-1+-1
     0x1000004 (has no name): ()  10x10+0+0  +0+0
     0x2400021 "wrapper-1.0": ()  10x10+-100+-100  +-100+-100
     0x240001b (has no name): ()  1x1+-1+-1  +-1+-1
     0x1a00001 "wrapper-2.0": ("wrapper-2.0" "Wrapper-2.0")  10x10+10+10  +10+10
     0x2400001 "wrapper-1.0": ("wrapper-1.0" "Wrapper-1.0")  10x10+10+10  +10+10
     0x220001b (has no name): ()  1x1+-1+-1  +-1+-1
     0x1600001 "polkit-gnome-authentication-agent-1": ("polkit-gnome-authentication-agent-1" "Polkit-gnome-authentication-agent-1")  10x10+10+10  +10+10
     0xc0002f (has no name): ()  1x1+-1+-1  +-1+-1
     0x2200001 "wrapper-1.0": ("wrapper-1.0" "Wrapper-1.0")  10x10+10+10  +10+10
     0xc0002a (has no name): ()  10x10+0+0  +0+0
     0x1c00001 "xfce4-volumed": ("xfce4-volumed" "Xfce4-volumed")  10x10+10+10  +10+10
     0x1200001 "xfce4-power-manager": ("xfce4-power-manager" "Xfce4-power-manager")  10x10+10+10  +10+10
     0x8007ad (has no name): ()  1920x1080+0+0  +0+0
     0xe00001 "xfdesktop": ("xfdesktop" "Xfdesktop")  10x10+10+10  +10+10
     0x1000003 (has no name): ()  1x1+-1+-1  +-1+-1
     0x1000001 "xfsettingsd": ("xfsettingsd" "Xfsettingsd")  10x10+10+10  +10+10
     0xc00001 "xfce4-panel": ("xfce4-panel" "Xfce4-panel")  10x10+10+10  +10+10
     0xa00001 "Thunar": ("Thunar" "Thunar")  10x10+10+10  +10+10
     0x800311 (has no name): ()  1x1+-1+-1  +-1+-1
     0x800122 "Xfwm4": ("xfwm4" "Xfwm4")  5x5+-1000+-1000  +-1000+-1000
     0x800121 (has no name): ()  10x10+-100+-100  +-100+-100
     0x800001 "xfwm4": ("xfwm4" "Xfwm4")  10x10+10+10  +10+10
     0x400001 "xfce4-session": ("xfce4-session" "Xfce4-session")  10x10+10+10  +10+10
     0x80013d (has no name): ()  1x1080+-1+0  +-1+0
     0x80013e (has no name): ()  1x1080+1920+0  +1920+0
     0x80013f (has no name): ()  1920x1+0+-1  +0+-1
     0x800140 (has no name): ()  1920x1+0+1080  +0+1080
     0x8007bc (has no name): ()  1920x21+-9999+-9999  +-9999+-9999
     0x800788 (has no name): ()  1920x3+0+0  +0+0
     0x894add (has no name): ()  1920x1080+0+0  +0+0
     0x8e64ab (has no name): ()  1920x1080+0+0  +0+0
     0x8d1a12 (has no name): ()  1920x1080+0+0  +0+0
     0x8d4b7e (has no name): ()  624x772+805+292  +805+292
     0x8b40c0 (has no name): ()  1040x886+660+158  +660+158
     0x807155 (has no name): ()  1820x478+0+538  +0+538
     0x884002 (has no name): ()  1820x478+100+0  +100+0
     0x8a075d (has no name): ()  1820x478+149+166  +149+166
     0x887f22 (has no name): ()  1124x512+637+284  +637+284
     0x85078a (has no name): ()  758x490+581+295  +581+295
     0x800816 (has no name): ()  1920x1080+0+0  +0+0
Here is some relevant source code of the datetime plugin:
 * create the gtk-part of the datetime plugin
static void datetime_create_widget(t_datetime * datetime)
  GtkOrientation orientation;
  orientation = xfce_panel_plugin_get_orientation(datetime->plugin);

  /* create button */
  datetime->button = xfce_create_panel_toggle_button();

  /* create a box which can be easily adapted to the panel orientation */
  datetime->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);

  gtk_container_add(GTK_CONTAINER(datetime->button), datetime->box);

  /* create time and date lines */
  datetime->time_label = gtk_label_new("");
  datetime->date_label = gtk_label_new("");
  gtk_label_set_justify(GTK_LABEL(datetime->time_label), GTK_JUSTIFY_CENTER);
  gtk_label_set_justify(GTK_LABEL(datetime->date_label), GTK_JUSTIFY_CENTER);

  /* add time and date lines to the box */
      datetime->time_label, TRUE, FALSE, 0);
      datetime->date_label, TRUE, FALSE, 0);

  /* connect widget signals to functions */
  g_signal_connect(datetime->button, "button-press-event",
      G_CALLBACK(datetime_clicked), datetime);

  /* set orientation according to the panel orientation */
  datetime_set_mode(datetime->plugin, orientation, datetime);
But I guess my effort ends when there is no window name associated with the plugin? Anybody who wants to chime in is welcome. I guess I could compile an altered version of the plugin... after learning GTK and preparing a build environment for XFCE... I don't think I'm that desperate yet.


gtk, xfce, xfce4-datetime-plugin

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how can I increase the padding on the Cinnamon panel? Brant Linux Mint 7 02-22-2017 08:46 PM
xfce4-quicklauncher plugin not showing in the xfce panel's "add New Items" menu. bgryderclock Slackware 1 07-05-2011 01:24 AM
Firefox toolbars have too much padding in xubuntu 8.04 XFCE mrtwice Linux - Software 0 09-04-2008 04:05 PM
Xfce problems with task bar and xfce-panel aeruzcar Linux - Software 4 06-26-2006 06:29 AM
How to get rid of timer in mplayer firefox plugin? mikketeve Linux - Newbie 0 03-17-2006 06:47 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration