Ubuntu – Window Title Bars Differ in Height

cssthemestitlebar

I am delving a little into theming and css styling.

It mostly works well, but I am having trouble with the styling of the title bars. They all accept well gradient, background color and such, but not all applications adopt the title bar height.

I tried to code

.titlebar and 

.headerbar 

in all forms I can imagine, but still the height of the title bars remains incoherent. Some applications adopt the title bar height, others totally ignore it.

This apparently happens all across themes.

I wonder what the reason for this is, and how I can achieve equal height of all title/ header bars.

My question is not a duplicate, since my issue is not that of slimming the bar down, but that of making a too NARROW bar (on the right) BIGGER, to match the height of the bars on the left. I understand that the bar on the left is huge, but I intentionally exaggerated on the height to show my point.

I am using Ubuntu Budgie 19.04, on a Dell laptop.

enter image description here

Best Answer

You are dealing with two different kinds of programs.

  • The left program in your screenshot is an application that uses GTK3 Client Side Decorations (CSD). This means that the application itself draws its title bar and includes controls in it.
  • The right programs you show use window manager provided window decorations (some call this 'legacy decorations'. The window manager controls the decoration, and these are the applications that obey your settings.

For applications using CSD, padding still can be controlled through the GTK3 theme. However, a minimum height is needed to accomodate the controls. You would therefore need to set unpleasantly wide "legacy" titlebars to accommodate the minimal width of a CSD title bar.

CSD cannot easily be avoided. Linux Mint adopts the approach of eliminating all CSD and has forked core gnome applications to revert to a traditional header bar and menu. Also the Mate desktop adopts that approach. To eliminate CSD on standard Ubuntu is less obvious. In short, there is no satisfactory solution, but options are:

  • There used (and still is) is a way to return "legacy" window decorations to CSD programs (note that for more recent Ubuntu versions, gtk3-nocsd is included in the standard software repositories, so no need to add a PPA). This worked better in older days, where traditional menus would neatly be restored. Currently, the effect is that you add a traditional title bar, but the CSD area beneath remains, leading to a less than pleasant appearance.
  • Alternatively, one can consider avoiding CSD applications, and for example move to the alternative applications of Linux Mint or Mate.
Related Question