7

example

How do I decrease height of the title bar of apps without switching theme?

8

The above did not work for me... but I got good results with the following in my file ~/.config/gtk-3.0/gtk.css :

 /*
 * Reduce height of window header (title?) bars.
 * Seems enough to specify padding, no need to repeat
 *   padding-left padding-right padding-top padding-bottom
 * nor it seems necessary to even mention
 *   margin-top margin-bottom
 */

.default-decoration {
    min-height: 0px;
    padding: 3px;
}

.default-decoration .titlebutton {
    min-height: 0px;
    padding: 0px;
}
7

Assuming you are using Gnome 3 -

  1. Open or Create the file : ~/.config/gtk-3.0/gtk.css (~ is the home location for your current user. For example, if your user is demo, then ~ would represent \home\demo)
  2. Add the following CSS to the file

    headerbar entry,    
    headerbar spinbutton,    
    headerbar button,    
    headerbar separator {    
        margin-top: 0px; /* same as headerbar side padding for nicer proportions */    
        margin-bottom: 0px;    
    }    
    
    headerbar {    
        min-height: 24px;    
        padding-left: 2px; /* same as childrens vertical margins for nicer proportions */    
        padding-right: 2px;    
        margin: 0px; /* same as headerbar side padding for nicer proportions */    
        padding: 0px;    
    }    
    
  3. Run ALT+F2 and provide the letter 'r' in the dialog box that appears that and hit enter to refresh the style

For more info, refer the original solution from Unix Stackexchange : https://unix.stackexchange.com/questions/276951/how-to-change-the-titlebar-height-in-standard-gtk-apps-and-those-with-headerbars?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

1
  • I combined the recommendations of R.S and of Paul Szabo, and this appears to have given me a few additional pixels. – user127094 Jan 6 '20 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.