mirror of https://github.com/anoshenko/rui.git
Bug fixing
This commit is contained in:
parent
27ebaf1bfe
commit
d1d8c2af37
3
view.go
3
view.go
|
@ -790,6 +790,7 @@ func (view *viewData) addToCSSStyle(addCSS map[string]string) {
|
||||||
|
|
||||||
func (view *viewData) cssStyle(self View, builder cssBuilder) {
|
func (view *viewData) cssStyle(self View, builder cssBuilder) {
|
||||||
view.viewStyle.cssViewStyle(builder, view.session)
|
view.viewStyle.cssViewStyle(builder, view.session)
|
||||||
|
/*
|
||||||
switch GetVisibility(view) {
|
switch GetVisibility(view) {
|
||||||
case Invisible:
|
case Invisible:
|
||||||
builder.add(`visibility`, `hidden`)
|
builder.add(`visibility`, `hidden`)
|
||||||
|
@ -797,7 +798,7 @@ func (view *viewData) cssStyle(self View, builder cssBuilder) {
|
||||||
case Gone:
|
case Gone:
|
||||||
builder.add(`display`, `none`)
|
builder.add(`display`, `none`)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if view.addCSS != nil {
|
if view.addCSS != nil {
|
||||||
for tag, value := range view.addCSS {
|
for tag, value := range view.addCSS {
|
||||||
builder.add(tag, value)
|
builder.add(tag, value)
|
||||||
|
|
10
viewStyle.go
10
viewStyle.go
|
@ -174,6 +174,16 @@ func (style *viewStyle) backgroundCSS(session Session) string {
|
||||||
|
|
||||||
func (style *viewStyle) cssViewStyle(builder cssBuilder, session Session) {
|
func (style *viewStyle) cssViewStyle(builder cssBuilder, session Session) {
|
||||||
|
|
||||||
|
if visibility, ok := enumProperty(style, Visibility, session, Visible); ok {
|
||||||
|
switch visibility {
|
||||||
|
case Invisible:
|
||||||
|
builder.add(`visibility`, `hidden`)
|
||||||
|
|
||||||
|
case Gone:
|
||||||
|
builder.add(`display`, `none`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if margin, ok := boundsProperty(style, Margin, session); ok {
|
if margin, ok := boundsProperty(style, Margin, session); ok {
|
||||||
margin.cssValue(Margin, builder, session)
|
margin.cssValue(Margin, builder, session)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue