Fix style display

This commit is contained in:
Alexander Nozik 2021-05-09 15:56:15 +03:00
parent e615fcc2bc
commit b8fadb06b5
2 changed files with 17 additions and 23 deletions

View File

@ -28,6 +28,9 @@ public fun RBuilder.ringIsland(handler: RHandler<IslandProps>) {
public fun RBuilder.ringIsland(header: String, handler: RHandler<IslandContentProps>) { public fun RBuilder.ringIsland(header: String, handler: RHandler<IslandContentProps>) {
ringIsland { ringIsland {
ringIslandHeader { ringIslandHeader {
attrs{
border = true
}
+header +header
} }
ringIslandContent(handler) ringIslandContent(handler)

View File

@ -20,22 +20,14 @@ public fun RBuilder.ringPropertyEditor(
key: Any? = null, key: Any? = null,
) { ) {
ringIsland { ringIsland("Properties") {
ringIslandHeader { propertyEditor(
attrs { ownProperties = vision.ownProperties,
border = true allProperties = vision.allProperties(),
} updateFlow = vision.propertyChanges,
+"Properties" descriptor = descriptor,
} key = key
ringIslandContent { )
propertyEditor(
ownProperties = vision.ownProperties,
allProperties = vision.allProperties(),
updateFlow = vision.propertyChanges,
descriptor = descriptor,
key = key
)
}
} }
val styles = if (vision is SolidReference) { val styles = if (vision is SolidReference) {
(vision.styles + vision.prototype.styles).distinct() (vision.styles + vision.prototype.styles).distinct()
@ -52,13 +44,12 @@ public fun RBuilder.ringPropertyEditor(
} }
ringIslandContent { ringIslandContent {
ringSmartTabs { ringSmartTabs {
styles.forEach { styleName ->
} val style = vision.getStyle(styleName)
styles.forEach { styleName -> if (style != null) {
val style = vision.getStyle(styleName) ringTab(styleName) {
if (style != null) { metaViewer(style)
ringTab(styleName) { }
metaViewer(style)
} }
} }
} }