Closed polter-rnd closed 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?
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.
I see. Maybe in that case add another constant instead of using WINDOW_BORDER_SIZE / 2.0
? Which essentially is just 0.5
.
Indeed, I can do it tomorrow, didn't make it initially because couldn't figure out how to name it
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
?
Or TITLEBAR_BOTTOM_BORDER_SIZE
or TITLEBAR_SEPARATOR_SIZE
, the latter sounds well as for me
TITLEBAR_SEPARATOR_SIZE
sounds good.
It makes border exactly the same size as in GTK3.
Before:
After: