Skip to content

Added the ability to change Checkbox icon#1707

Merged
hecrj merged 1 commit into
iced-rs:masterfrom
casperstorm:feat/checkbox-icon
Feb 17, 2023
Merged

Added the ability to change Checkbox icon#1707
hecrj merged 1 commit into
iced-rs:masterfrom
casperstorm:feat/checkbox-icon

Conversation

@casperstorm

Copy link
Copy Markdown
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

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

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