Skip to content

Customize Checkbox#192

Merged
hecrj merged 2 commits into
iced-rs:masterfrom
clarkmoody:checkbox-settings
Feb 18, 2020
Merged

Customize Checkbox#192
hecrj merged 2 commits into
iced-rs:masterfrom
clarkmoody:checkbox-settings

Conversation

@clarkmoody
Copy link
Copy Markdown
Contributor

Add size, spacing, and text_size properties to Checkbox.

Comment thread native/src/widget/checkbox.rs Outdated
Comment on lines +59 to +62
size: 20,
width: Length::Shrink,
spacing: 15,
text_size: 20,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would be really nice to pull these from an underlying renderer.

Copy link
Copy Markdown
Member

@hecrj hecrj Feb 18, 2020

Choose a reason for hiding this comment

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

Yes, I think we can add these to the Renderer trait using associated constants.

@hecrj hecrj added the feature New feature or request label Feb 18, 2020
@hecrj hecrj added this to the 0.1.0 milestone Feb 18, 2020
Copy link
Copy Markdown
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.

Thanks for the PR!

I have moved the constants to checkbox::Renderer and did something similar with text::Renderer so we can reuse the default text size instead of redefining it.

I think we can merge this. Let me know.

@clarkmoody
Copy link
Copy Markdown
Contributor Author

clarkmoody commented Feb 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants