-
Notifications
You must be signed in to change notification settings - Fork 37
/
DemoVerticalLayout01.kt
41 lines (39 loc) · 1.18 KB
/
DemoVerticalLayout01.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extensions.SingleScreenshot
import org.openrndr.panel.controlManager
import org.openrndr.panel.elements.div
import org.openrndr.panel.elements.slider
import org.openrndr.panel.style.*
fun main() = application {
program {
val cm = controlManager {
styleSheet(has class_ "side-bar") {
this.height = 100.percent
this.width = 200.px
this.display = Display.FLEX
this.flexDirection = FlexDirection.Column
this.paddingLeft = 10.px
this.paddingRight = 10.px
this.background = Color.RGBa(ColorRGBa.GRAY)
}
styleSheet(has type "slider") {
this.marginTop = 25.px
this.marginBottom = 25.px
}
layout {
div("side-bar") {
slider {
label = "Slider 1"
}
slider {
label = "Slider 2"
}
}
}
}
extend(cm)
extend {
}
}
}