tsujan / BreezeEnhanced

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

Button size: medium is blurred buttons compared to regular Breeze decorations #6

Closed MirceaMx closed 5 years ago

MirceaMx commented 5 years ago

Compared to the regular Breeze decorations the buttons look blurred (no MacOS style) when chosen. Selecting the small size is OK but they are...well to small. See here for screenshots: https://imgur.com/a/xCnQjAh

tsujan commented 5 years ago

Here, the buttons are quite sharp:

clear

It always depends on the button size you choose. That should be the case with Breeze too but it can't be seen with diagonal lines Breeze draws. For example, in your screenshot, the close buttons and question marks are the same in Breeze and BreezeEnhanced because they have no horizontal/vertical line.

If you make a 22-px sharp image with horizontal and vertical lines, it won't be sharp when its size is 16px because the grids are different for those sizes.

That being said, I'll see if they can be made sharp with all sizes. It means different drawings for different sizes and more code.

MirceaMx commented 5 years ago

I understand. Thank you.

tsujan commented 5 years ago

I looked into it. It's possible to have super sharp horizontal and vertical lines. However, since the button size may not be an integer, the shape may need to have an offset by less than 1 px to remain sharp. That may be seen only when it's inside the hover circle, like this:

sharp

I think it's acceptable; what do you think?

MirceaMx commented 5 years ago

The X button still seems to look blurry. Overall it's better.

tsujan commented 5 years ago

The x button is exactly that of Breeze and can't be made better because it has no horizontal or vertical line. The same is true for all shapes with diagonal or curved lines; they should be anti-aliased and that means some pixels should be neither black nor white.

MirceaMx commented 5 years ago

Ok. GREAT job. Closing issue now.

tsujan commented 5 years ago

Thanks!

I haven't added a commit yet (should do more tests). When a commit is added, the issue will be closed automatically. So I reopen it for now.

tsujan commented 5 years ago

I'm afraid I had to reverse the commit about sharp lines because max and min buttons looked unnatural compared to other buttons, especially with large sizes.

Lesson learned: Breeze devs are right; anti-aliasing is always needed and, when there are also diagonal lines, all lines should be a little blurry to look natural beside each other.