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

Implemented preliminary styling for native widgets. #102

Closed
wants to merge 5 commits into from

Conversation

Maldela
Copy link
Contributor

@Maldela Maldela commented Dec 2, 2019

I was playing around with styling the different iced examples and this is what I came up with.
To make this work I had to extend some of the widgets and change the view function of the Application and Sandbox traits to supply an ApplicationStyle object which can be used to construct widgets. This work is by far not finished yet. My next steps would be adding the possibility to load platform specific plugins to have a native look across different platforms and splitting the ApplicationStyle object into some sort of color palette to theme custom widgets and a set of styles for the built in widgets.
Consider this more a RFC then a PR. I just wanted to get some feedback about my approach so far.

@hecrj
Copy link
Member

hecrj commented Dec 2, 2019

Hey @Maldela, thank you for exploring this! I really appreciate the effort here!

That said, I do not think we are yet ready to write code to implement this feature. There is a lot to consider, discuss, and design. As the contributing guide states, please get in touch! I'd love it if you joined our Zulip server and we started a conversation there. I really think code will be the easy part here.

Your current approach is a very direct way of implementing support for styling, but it ties style properties to each particular widget in iced_native, which is meant to be renderer-agnostic. I am aware that the current iced_native implementation has the same issue, but a well-designed styling solution should try to address this issue.

@Maldela Maldela force-pushed the styling branch 7 times, most recently from 228cbf5 to 634f13d Compare December 4, 2019 20:41
@hecrj hecrj mentioned this pull request Jan 7, 2020
2 tasks
@hecrj hecrj closed this in #146 Jan 9, 2020
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