suggestion: CSS styles
INTRODUCTION
Hi there! A few days ago, I heard, that JavaFX uses CSS stylesheets for windowed-apps styling.
What about adding such a feature as an extension of giu?
technical aspect
at the moment, there is setTheme method that sets all styles in master window.
we can parse css file's body class and apply it there.
In addition, we can also add CSSWidget and use it e.g.:
CSSTag("mycustomstyle").To(/*some layout*/)
and during master window creation:
wnd := giu.NewMasterWindow(...)
err := wnd.StyleFromCSS([]byte(myStyle))
@AllenDang what do you think about this idea? could it be a part of giu? Or meybe it'd be better idea to write a separated module (like css-giu-widget (IMO it wouldn't be so simple to do, because of privacy of some in-giu stuff) ).
@gucio321 I think we could define a theme dsl rather than use css directly. Because css is very complex.
hmm, but imo, we could try to use https://github.com/napsy/go-css to parse css files. I dont think it'd be really complicated
At present, I am considering designing a QML or HTML CSS to assist in designing styles
Giu's layout code is not so comfortable for me to write. I want to simplify the code that needs to be written and increase readability through the generator
Of course, this is obviously impossible for me at present (I mean I need to fully understand the knowledge related to giu layout, which may take some time)
hmm, but imo, we could try to use https://github.com/napsy/go-css to parse css files. I dont think it'd be really complicated
It won't be very complicated, but I think it may be much better to extend giu than to implement it inside giu Internal implementation means the need to interpret and execute, which will bring some runtime overhead, which is detrimental to Gui programs