FedoraQt / QGnomePlatform

QPlatformTheme for a better Qt application inclusion in GNOME
GNU Lesser General Public License v2.1
262 stars 38 forks source link

Make border between window and decorations thinner #127

Closed polter-rnd closed 1 year ago

polter-rnd commented 1 year ago

It makes border exactly the same size as in GTK3.

Before: image

After: image

grulja commented 1 year ago

Isn't this because of scaling? We have WINDOW_BORDER_WIDTH set to 1px, which I guess when scaling is applied in GNOME results into 2px?

polter-rnd commented 1 year ago

No, that's not related to scaling, the thing is that border between the window and title bar should not be equal to WINDOW_BORDER_WIDTH. In this PR https://github.com/FedoraQt/QGnomePlatform/pull/116 he also notices this and sets it to 0, that makes it thinner but not pixel-perfect equal to GTK rendering, because their size is not equal to 1px, but like antialiased 0.5px. With my fix (using antialised 0.5 px width) it is equal to GTK on all scales.

grulja commented 1 year ago

I see. Maybe in that case add another constant instead of using WINDOW_BORDER_SIZE / 2.0? Which essentially is just 0.5.

polter-rnd commented 1 year ago

Indeed, I can do it tomorrow, didn't make it initially because couldn't figure out how to name it

grulja commented 1 year ago

Indeed, I can do it tomorrow, didn't make it initially because couldn't figure out how to name it

Yeah, I'm also unsure how to name it. Maybe WINDOW_TITLEBAR_SEPARATOR or WINDOW_TITLEBAR_BORDER?

polter-rnd commented 1 year ago

Or TITLEBAR_BOTTOM_BORDER_SIZE or TITLEBAR_SEPARATOR_SIZE, the latter sounds well as for me

grulja commented 1 year ago

TITLEBAR_SEPARATOR_SIZE sounds good.