Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-04-11 11:04:58

nathanz600
Member
Registered: 2021-04-11
Posts: 8

How can I change the line height in the Xfce4 interface

I have been looking for ways to change(reduce) the line height or padding top/bottom on all lines in the X interface. Xubuntu 18.04 LTS

After many searches, I have found that I have to edit the ~/.config/gtk-3.0/gtk.css file. However, the file does not exist by default, and I do not know what elements/widgets to add/enter. Or is there a more direct way in Xfce to modify this?
example
Any help will be appreciated.

Offline

#2 2021-04-11 13:39:25

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

Re: How can I change the line height in the Xfce4 interface

Hello and welcome.

Is that thunar that you are looking to change? If so, it appears that Xubuntu 18.04 ships the older gtk2 version of thunar. In which case, you need to edit gtk2 override files (~/.gtkrc-2.0). Have a read through this related thread for more information.


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 2021-04-11 13:56:04

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

That is indeed Thunar. (Didn't know how to caption the image)

I was hoping for a more general setting that affects everywhere a list is shown, if possible. This would include menu lists, drop-down lists, etc.

However, if each one has to be changed individually, it's not a problem.

My general gripe with the UI is gaps or top/bottom padding of lines or rows in an xfce window.

Offline

#4 2021-04-11 14:37:29

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

Re: How can I change the line height in the Xfce4 interface

nathanz600 wrote:

I was hoping for a more general setting that affects everywhere a list is shown, if possible. This would include menu lists, drop-down lists, etc.

Each one of those elements will have its own properties that would need to be adjusted. It's not a simple thing. The best way to handle this would be to find another theme that has these compressed properties, The next best is to create a copy of your current theme in ~/.themes and edit the files by hand. Keep in mind that some of the applications are gtk2 based and some are gtk3 based, so you will be editing both sets.


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 2021-04-13 13:01:49

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

ToZ

The theme I have applied only has a bunch of image files in an xfwm4 folder and a themerc file containing:

show_app_icon=true
button_offset=2
button_spacing=0
maximized_offset=1
full_width_title=true
active_text_color=#FFFF00
inactive_text_color=#FFFFFF

I don't think (this) theme defines anything else. This is why I thought the gtk css files would be the place to look.
But, what elements to look for? The gtk online help just lists the millions of possible elements/widgets.

i don't mind doing the edits in both gtk2 and 3 (I know some css), if I knew WHAT elements to target.

Offline

#6 2021-04-26 20:17:20

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

Should I go and post this on a GTK forum somewhere?

Offline

#7 2021-04-26 20:32:26

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

Re: How can I change the line height in the Xfce4 interface

Sorry, I missed your reply. The xfwm4 theme file properties only affect the window decorations, not the contents of the window.

Since you are using the gtk2 version of thunar, any overrides need to go into ~/.gtkrc-2.0. The gtk.css file is used for gtk3-based thunar versions. The link I specified in the second post above have some information on making a tweak to affect the row sizing. Does that work for you?


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 2021-04-26 22:41:57

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

It appears I had some confusion about what themes are. What were previously called 'themes' in earlier Xfce versions, is now called 'Appearance Styles'. The 'theme' I applied was only a window decoration.

That said, I went through all the appearance styles to see if anything came close to what I need.

The style called 'Xfce' is a little closer to what I want, although not 100%. Looking at the file usr/share/themes/Xfce/gtk-2.0, one of the differences it had is a line saying:

GtkTreeView::vertical-separator    = 0

This seemed to reduce the space between rows on a grid.
Better!

Now to find the Gtk class that defines the padding around the text on any grid line, or which defines the actual line's height.

Thanks

Offline

#9 2021-04-26 23:26:09

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

Re: How can I change the line height in the Xfce4 interface

nathanz600 wrote:

Now to find the Gtk class that defines the padding around the text on any grid line, or which defines the actual line's height.

Thanks

It might depend on the widget you are looking for. Check all the settings related to xthickness or ythickness. These resources might also help:
- The GTK2 Reference Manual - lists all the widget types and their properties
- GtkParasite - an inspector tool for looking into guts of a GTK2 application including the widgets and their properties.


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

#10 2021-05-23 21:59:25

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

I have tried every conceivable widget as found Gtk Inspector, and not one of it gets me what I want.

I have come to the conclusion that it is either in some global Gtk/Xfce4 setting/property, or it is inherent to X11 itself.

Offline

#11 2021-07-03 05:45:32

Compositoron
Member
Registered: 2020-07-24
Posts: 17

Re: How can I change the line height in the Xfce4 interface

If it is for thunar, using GTK_DEBUG=interactive thunar, try this css;

Content panel:

.thunar treeview
    {
        padding: 4px;
    }


Or with four
.thunar treeview
    {
                padding: 0px 0px 2px 0px;
    }



Sidebar:

.thunar    .sidebar .view
        {   
            padding: 0px 0px 5px 5px;
        /*  font-size:0.91em; */
          }


You can add those to your theme /usr/share/themes/my-cool-xfce-theme/gtk-3.20/gtk.css.
Or ~/.local/themes/my-cool-xfce-theme/gtk-3.20/gtk.css.

Last edited by Compositoron (2021-07-03 05:46:06)

Offline

#12 2021-07-10 12:26:19

nathanz600
Member
Registered: 2021-04-11
Posts: 8

Re: How can I change the line height in the Xfce4 interface

I have tried creating this file, /usr/share/themes/my-cool-xfce-theme/gtk-3.20/gtk.css,
and swapping to and from other "Appearence > Styles".

Does not appear to have any effect.

Offline

Board footer

Powered by FluxBB