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

Fix rounded corner rendering #410

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

Long0x0
Copy link
Contributor

@Long0x0 Long0x0 commented Apr 4, 2024

test case:

use floem::{peniko::Color, view::View, views::Decorators, widgets::button};

fn app_view() -> impl View {
    button(|| "text").style(|s| {
        s.border_radius(15.0)
            .border(20.0)
            .width(200.0)
            .height(100.0)
            .margin(100.0)
            .background(Color::RED)
            .border_color(Color::BLUE)
    })
}

fn main() {
    floem::launch(app_view);
}

before:
image

after:
image

It still won't work if border_radius < border_width / 2, since the radius is limited by the stroke width.

still won't work if border_radius < border_width / 2,
since the radius is limited by the stroke width
@dzhou121 dzhou121 merged commit ab125b7 into lapce:main Apr 4, 2024
7 checks passed
Narref95 pushed a commit to Narref95/floem that referenced this pull request Apr 16, 2024
still won't work if border_radius < border_width / 2,
since the radius is limited by the stroke width
dzhou121 pushed a commit that referenced this pull request May 8, 2024
* Fix tooltip behaviour

* Fix formatting issues

* Fix tooltip shown while dragging

* Fix rounded corner rendering (#410)

still won't work if border_radius < border_width / 2,
since the radius is limited by the stroke width

* Simplify boolean expression

* Remove tooltip on pointer wheel

* Replace add/remove tooltip functions to the possibility to listen keyboard without the view being focused

* Add keyboard listenable example

* Add keyboard listenable documentation

* Revert tooltip field

---------

Co-authored-by: Long0x0 <[email protected]>
Co-authored-by: Ferran Alcaina <[email protected]>
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