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

widgets: algin rect outline radius with inner border radius #614

Merged
merged 4 commits into from
Dec 29, 2024

Conversation

PaideiaDilemma
Copy link
Collaborator

@PaideiaDilemma PaideiaDilemma commented Dec 26, 2024

Closes #611

To verify that the the outline of a box matches with the inner border perfectly,
I used this:

input-field {
  monitor=
  size=25%, 5%
  inner_color=rgba(fff7ed20)
  outer_color=rgba(fff7ed20)
  position=0, -20
  rounding=15
  fade_on_empty = false
  valign=center
}

Because inner and outer color have the same alpha, one can easily spot if they overlap or not.

Previously if the rounding was to big, it used rounding 0.
Now it clamps it to the maximum.

Tested:

  • rouding -1 for shape, image and input-field
  • rouding -1 and border for shape, image and input-field
  • rounding 0 for shape, image and input-field
  • rounding 0 and border for shape, image and input-field

@PaideiaDilemma PaideiaDilemma changed the title core: fix widgets with border rounding core: fix widgets border rounding Dec 26, 2024
@PaideiaDilemma PaideiaDilemma changed the title core: fix widgets border rounding widgets: algin rect outline radius with inner border radius Dec 26, 2024
@PaideiaDilemma
Copy link
Collaborator Author

Wait i don't think this is actually what we want. cause we don't want inner to have different rounding. looks off. we just need to scale the rounding correctly. no need for outerRounding

@PaideiaDilemma
Copy link
Collaborator Author

PaideiaDilemma commented Dec 27, 2024

This is what we want i think.
The inner radius of the border just needed to be scaled properly.

Actually the problem just occurred in edge cases, where the rounding approached minhalf and a thick border was used.

@PaideiaDilemma
Copy link
Collaborator Author

This is what we want i think.
The inner radius of the border just needed to be scaled properly. No need for outerRadius in the shader.

Actually the problem just occurred in edge cases, where the rounding approached minhalf and a thick border was used.

@vaxerski vaxerski merged commit d94cc3a into hyprwm:main Dec 29, 2024
1 check passed
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.

Shape borders don't align with rounded corners
2 participants