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

Fixed window borders #69

Closed
wants to merge 1 commit into from
Closed

Conversation

bertini97
Copy link
Contributor

Currently, the window border routine draws border of 1px and ignores the ceWindowBorderWidth variable (which is indeed set to 1). The border should look wrong, because it shouldn't be drawn in the left part of the window, as the routine doesn't account for it.

To my surprise, however, windows had a border on the left part. After a while I figured it only looks right because the antialiasing makes all 1px lines as 2px. I noticed this while triying to fix the titlebar border being noticeably 2px thick. Here is a comparison with no shadow and a highlighted border:

Schermata del 2024-06-04 18-10-55

Notice how the titlebar border "leaks" onto the window border for a few pixels, and how all the borders except the title bar are transparent. Also the titlebar separator cuts the window border. Here is the window with my patch, removing antialiasing and accounting for a window border.

Schermata del 2024-06-04 18-13-38

The borders aren't transparent anymore, the titlebar border is the same thickness as the rest, and the title bar stops where it should. One thing that is missing is the fact that the border is 1px regardless of the ceWindowBorderSize because the pen is not set.

@grulja grulja mentioned this pull request Jun 18, 2024
@grulja
Copy link
Contributor

grulja commented Jun 18, 2024

Hi, thank you for this change.

I've tried to play with this a bit. I don't think we should disable antialising as seen on your second image, you can see the rounded corners are not looking good. Here is an alternative fix for this #70. Can you please look into it? I think it's more understandable. I also removed the separator part completely, because it's already painted and it made it to be painted twice.

@bertini97
Copy link
Contributor Author

Indeed the rounded corners aren't great. But this is exacerbated by a dark border tone and a dark shadow (darker than GTK's). To me, having antialiasing for a border isn't the way to go in general, but especially here since in Qt it makes 1px lines semitransparent and 2px wide.

If you feel like keeping it, go for it and feel free to close this PR. It's a cosmetic thing after all :)

BTW, all these problems are very noticeable to me, but maybe you're using an HDPI screen?

@grulja
Copy link
Contributor

grulja commented Jun 18, 2024

Can this be closed now?

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