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

Add Style CornerLength #771

Closed
wants to merge 1 commit into from
Closed

Add Style CornerLength #771

wants to merge 1 commit into from

Conversation

somiaj
Copy link
Collaborator

@somiaj somiaj commented Nov 22, 2022

Adds a style to set the length of the corners of a window. This style
takes a single numerical argument and sets the length of the corner
in number of pixels beyond the edge of the boundary. If the argument
has a '%' suffix, the number will be treated as a percent of the window
size instead of a pixel length.

@ThomasAdam I can't seem to get the Style * CornerLength 25% to work consistently. Two issues, first is the flag has_corner_percent is just ignored unless you issue a Style * BorderLength 5 command first, afterwards, the flag will be honored (if you issue the command again). But if you change any style such as BorderWidth, HandleWidth, !Handles, the flag is lost, and you need to run Style * CornerLength 25% again. In short I'm having trouble setting the use_corner_percent flag so that it correctly gets used and doesn't get reset, though it does work in some cases just fine.

@somiaj somiaj marked this pull request as draft November 22, 2022 07:44
@ThomasAdam ThomasAdam added the type:enhancement Augmenting an existing feature label Nov 22, 2022
@ThomasAdam ThomasAdam added this to the 1.0.6 milestone Nov 22, 2022
@ThomasAdam ThomasAdam self-assigned this Nov 22, 2022
@ThomasAdam ThomasAdam removed this from the 1.0.6 milestone Jan 14, 2023
@somiaj
Copy link
Collaborator Author

somiaj commented Oct 31, 2023

This is just a rebase of the commit to current main. I haven't tried to fix the issues as I don't understand how the states are saved/restored.

@ThomasAdam ThomasAdam added this to the 1.0.9 milestone Nov 1, 2023
@somiaj somiaj force-pushed the js/handle-length branch 5 times, most recently from c33c9ff to ec3e2e8 Compare November 5, 2023 19:56
  Adds a style to set the length of the corners of a window. This style
  takes a single numerical argument and sets the length of the corner
  in number of pixels beyond the edge of the boundary. If the argument
  has a '%' suffix, the number will be treated as a percent of the window
  size instead of a pixel length.

  Note: Corner percent flag is stored as a negative value, due to
  not being able to get flag states to work correctly.
@somiaj
Copy link
Collaborator Author

somiaj commented Dec 2, 2023

Closing in favor of #928.

@somiaj somiaj closed this Dec 2, 2023
@somiaj somiaj deleted the js/handle-length branch March 26, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Augmenting an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants