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

Vector button is drawn incorrectly #1065

Closed
rc-pl opened this issue Oct 10, 2024 · 2 comments
Closed

Vector button is drawn incorrectly #1065

rc-pl opened this issue Oct 10, 2024 · 2 comments
Assignees
Labels
type:bug Something's broken!

Comments

@rc-pl
Copy link

rc-pl commented Oct 10, 2024

Default config for fvwm3 has this code for drawing "x" (close button)

AddButtonStyle 2 Active Vector 4 35x35@3 65x65@3 65x35@4 35x65@3

it draws "x" with top right arm shorter

image

changing this code to

AddButtonStyle 2 Active Vector 4 35x35@3 65x65@3 35x65@4 65x35@3

somehow fixes it

image

@rc-pl rc-pl added the type:bug Something's broken! label Oct 10, 2024
@somiaj
Copy link
Collaborator

somiaj commented Oct 11, 2024

This is a rounding issue, since vectors always use coordinates between 0 and 100, and then scale to size of the vector button. It might just be that in the logic of the vector drawing, the rounding issue isn't seen if you draw the line the other direction.

I have noticed this before, and have also noticed that it depends on the size of the title bar, on some of my machines it is one pixel short and on others it is not.

I will update the default config as you suggest, though it might just be that for some users that didn't get the rounding error before will now get it.

somiaj added a commit that referenced this issue Oct 12, 2024
Tweak the close vector button so rounding issues don't cause one
pixel in the top right corner 'X' to be missing in some cases.
Unsure why this works, but in some cases it does.

This is the suggestion in #1065.
ThomasAdam pushed a commit that referenced this issue Oct 12, 2024
Tweak the close vector button so rounding issues don't cause one
pixel in the top right corner 'X' to be missing in some cases.
Unsure why this works, but in some cases it does.

This is the suggestion in #1065.
@somiaj
Copy link
Collaborator

somiaj commented Oct 12, 2024

default-config updated in #1066 to the suggestion here.

@somiaj somiaj closed this as completed Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
None yet
Development

No branches or pull requests

2 participants