Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make border between window and decorations thinner #127

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

polter-rnd
Copy link
Contributor

It makes border exactly the same size as in GTK3.

Before:
image

After:
image

@grulja
Copy link
Collaborator

grulja commented Jan 2, 2023

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
Copy link
Contributor Author

polter-rnd commented Jan 2, 2023

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 #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
Copy link
Collaborator

grulja commented Jan 2, 2023

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
Copy link
Contributor Author

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

@grulja
Copy link
Collaborator

grulja commented Jan 2, 2023

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
Copy link
Contributor Author

polter-rnd commented Jan 2, 2023

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

@grulja
Copy link
Collaborator

grulja commented Jan 2, 2023

TITLEBAR_SEPARATOR_SIZE sounds good.

@polter-rnd polter-rnd force-pushed the make-border-thinner branch from 6ecb7b6 to 26a7730 Compare January 3, 2023 16:30
@grulja grulja merged commit dff87c2 into FedoraQt:master Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants