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

Master issue for theming and styling #313

Open
andlabs opened this issue Mar 24, 2018 · 8 comments
Open

Master issue for theming and styling #313

andlabs opened this issue Mar 24, 2018 · 8 comments
Milestone

Comments

@andlabs
Copy link
Owner

andlabs commented Mar 24, 2018

Very common request, in particular on the Go side.

Not sure if I want to support full theming, especially since every OS has a different way to do it, and I'm personally not sure how I feel about that.

Overriding some aspects of appearance for individual controls might be a different story, but IDK.

@mischnic
Copy link
Contributor

Also came up often with proton-native:
kusti8/proton-native#11
kusti8/proton-native#51
kusti8/proton-native#64

@adamierymenko
Copy link

adamierymenko commented Apr 6, 2018

I think it would be okay to offer a convenient way to expose each OS's theming / styling settings and then say "you're going to have to style this per-platform if you want styling." Just styling per platform is a lot less work than implementing 100% of UI logic per platform.

This way you can develop once and then style many times vs. developing many times using different UI programming paradigms.

With libs like Qt that try to abstract styling you still usually end up having per-platform style sheets.

@andlabs
Copy link
Owner Author

andlabs commented May 22, 2018

For the record, CSS theming would require implementing a CSS parser on Windows and macOS, and CSS layout would also require a CSS layout parser on GTK+, as layout is still done outside of CSS there. Having one CSS provide both themes and layout in that case would be an interesting problem.

@phpfs
Copy link

phpfs commented May 26, 2018

Am I right in the assumption that there's currently no way to change a label's text size?
If this is the case, simple styling would be absolutely needed to even create the most basic UIs...
I personally really like this library as it can be compiled to a simple .exe on windows or to an .app on macOS without complicated build enviroments :)

So thank you for this :)

@mischnic
Copy link
Contributor

Am I right in the assumption that there's currently no way to change a label's text size?

You could create an area and use the attributed string api, but the main problem for label usage is that you cannot define a minimum size for the area.

@teratorn
Copy link

Possible to use the Servo CSS style engine from Mozilla?

that's rust code... maybe that involves depending on too many moving parts for humble C developers - i wouldn't want to depend on some huge CSS style engine in C or C++ personally, and doing it /all/ yourself doesn't sound too fun.

@andlabs andlabs added this to the Post-Alpha 5 milestone Dec 31, 2018
@Merlinstail
Copy link

Merlinstail commented Nov 2, 2019

I oppose theming a simple reason. The native controls already have theming provided by their respective systems.

libui fits neatly into a long unoccupied space where a simple lightweight library with native controls is the goal. It would be a shame to spoil it with bloat, especially at the expense of progress and stability. Perhaps this should be made clear in the Readme.md.

It should be for a developer to choose a UI library that suits their needs instead of forcing the library to bend to their design aspirations. Accordingly if custom look is required they should choose a library that is designed for that purpose, there are many available.

@rubyFeedback
Copy link

libui fits neatly into a long unoccupied space where a simple lightweight library with native controls is the goal.

I do not disagree on libui's use case being small. I disagree that being unable to easily choose e. g. font size is a good thing. I need larger fonts for an elderly relative. The easier it is to customize things here the better.

CSS support may not be necessary, neither theming. But being able to change such basic aspects should be possible. Even Java Swing allows for that and barely anyone uses it these days.

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

No branches or pull requests

7 participants