tsujan / BreezeEnhanced

A fork of KDE Breeze decoration with additional options
GNU General Public License v3.0
162 stars 13 forks source link

Please make titlebar height adjustable #43

Closed aatolstoy closed 1 year ago

aatolstoy commented 1 year ago

Hello & thanks for your great work! There's one suggestion though: I noticed that the latest Breeze decoration theme has been made taller than it used to be. Not sure what exact version of 5.2x it was, but I don't like it being that tall, at least I would prefer the height of the titlebar to be adjustable. Breeze Enhanced has adopted the upstream Breeze changes and hence it is also taller now. As a workaround I replaced/downgraded the breezedecoration.{h,cpp} files with the older ones and restored that thinner titlebar. Of course, the best way could be to provide a configurable setting for the height value in the decoration settings dialog. It would be great if you managed to implement it.

regards.

tsujan commented 1 year ago

Breeze Enhanced has adopted the upstream Breeze changes

Yes, I do so with every upgrade, because more than 90% of BreezeEnhanced's code is that of Breeze.

As a workaround I replaced/downgraded the breezedecoration.{h,cpp} files with the older ones

Would you please tell me from which version you took that file? If I know that, I could find why the height was increased — I didn't notice the change here.

Of course, the best way could be to provide a configurable setting for the height value

Such a setting is possible, but (1) it would be only useful for increasing the height (which you don't want), and (2) as I've mentioned in several places, my limited time doesn't allow me to make the code more distant from that of Breeze.

tsujan commented 1 year ago

OK, I found a window screenshot that was taken with a very old version of BreezeEnhanced. There was no difference in the title-bar height.

What you see may be related to a KDE setting. I use KWin+BreezeEnhanced under LXQt and so, I'm free from KDE settings.

BTW, by replacing breezedecoration.cpp with an older file, you'll encounter bugs that don't exist in BreezeEnhanced . Particularly, the older versions didn't have resetBlurRegion().

EDIT: The screenshots are attached here. The old one:

old

The new one (in which I've used another color to distinguish the title-bar):

new

aatolstoy commented 1 year ago

Hi and thanks for the extensive reply! I borrowed the older decoration sources from this repository, which supposedly refers to Kwin 5.18-5.19. I figured out that I don't actually need to downgrade breezedecoration files entirely; instead I just can fix the titlebar height statement there. Thus, the blurregion and other new things in Breeze are retained. However, now I have issues with button animations: the buttons are clipped when I hover them. You can check it yourself- I've made a small patch that make titlebar fixed in 22 pixels. If you know how to fix the clipping issue, please let me know. titlebar_height_22.tar.gz

tsujan commented 1 year ago

I borrowed the older decoration sources from this repository

It's not mine. Its owner should rename it to prevent confusions. Of course, any problem in that source is its owner's responsibility.

However, now I have issues...

That's expected. You've made the height static, while the original height is correctly calculated based on the total size of its contents.

If you still insist on reducing the height, you could try to change these variables: https://github.com/tsujan/BreezeEnhanced/blob/68e1e761d63c598142544c63be8c42f4af073c38/breeze.h#L43-L45

I won't change them in the code because I want to keep the current compatibility with Breeze's code (due to lack of time, as I mentioned before).

aatolstoy commented 1 year ago

If you still insist on reducing the height, you could try to change these variables:

That's exactly what I wanted. Thanks!