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

Added the ability to change Checkbox icon #1707

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

casperstorm
Copy link
Member

This PR extends Checkbox so its now possible to customize the icon.
The Icon is defined by the following.

pub struct Icon<Font> {
    pub font: Font,
    pub code_point: char,
    pub size: Option<u16>,
}

I renamed checkmark_color to icon_color inside checkbox::Appearance since it feels more fitting with a custom icon that might not be a checkmark.

To test run cargo run --package checkbox

Screenshot 2023-02-16 at 2 13 23 PM

@hecrj hecrj added feature New feature or request widget styling labels Feb 17, 2023
@hecrj hecrj added this to the 0.8.0 milestone Feb 17, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! Thanks! 🎉

@hecrj hecrj merged commit 32745f4 into iced-rs:master Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request styling widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants