ron
12/26/2016, 10:44 AMedvin
12/26/2016, 10:44 AMlist.get(0)
but you also have list.first()
ron
12/26/2016, 10:45 AMedvin
12/26/2016, 10:45 AMfirst
have special use cases for us humanspermalmberg
12/26/2016, 10:46 AMpermalmberg
12/26/2016, 10:50 AMtackyButton
style sheet where you use this: borderColor += box(topColor,rightColor,bottomColor,leftColor)
Where does `box()`come from, and what other options are there?permalmberg
12/26/2016, 11:05 AMreloadStylesheetsOnFocus()
supposed to work on all stylesheets/components? I've got a circle
with a stylesheet, but it doesn't get applied until I restart the app. Also, is there a dynamic way to load stylesheets so that you don't have to specify them all in the App
-constructor ?edvin
12/26/2016, 11:07 AMedvin
12/26/2016, 11:08 AMreloadStylesheetsOnFocus
will reload all stylesheets, but it will not touch inline styles. To update inline styles you need to use reloadViewsOnFocus
instead. That will also update any changes to components/builders.edvin
12/26/2016, 11:09 AMimportStylesheet(StylesheetClass::class)
edvin
12/26/2016, 11:10 AMbox
is a way to describe top, right, bottom, left
. You can also choose to give it one argument, then it would apply for all edges. Two arguments would mean top and bottom.edvin
12/26/2016, 11:10 AMpermalmberg
12/26/2016, 11:10 AMpermalmberg
12/26/2016, 11:19 AMclass DrawingSurface : Fragment() {
override val root = pane {
this.minWidth = 400.0
this.minHeight = 400.0
}
class MyStyle : Stylesheet() {
companion object {
val circleStyle by cssclass()
}
init {
circleStyle {
//borderColor += box(c("#FFFFFF"), c("#FFFFFF"), c("#FFFFFF"), c("#FFFFFF"))
fill = c("#8F008F")
}
}
}
init {
with(root) {
group {
circle(100.0, 100.0, 50.0) {
addClass(MyStyle.circleStyle)
}
}
}
}
}
That's not an inline stylesheet is it?permalmberg
12/26/2016, 11:21 AMreloadStylesheetsOnFocus()
nor reloadViewsOnFocus()
makes it reload without a restart. Ah well, something to look into later today, got other things to do for a few hours.permalmberg
12/26/2016, 11:42 AMclass CircleStyle : Stylesheet() {
companion object {
val circleStyle by cssclass()
}
init {
circleStyle {
backgroundColor = multi(c("#8F00FF"))
}
}
}
applied to a rectangle runs, but doesn't apply the background color since the rectangle expects a fill
(as does a circle
).permalmberg
12/26/2016, 11:42 AMedvin
12/26/2016, 11:52 AMedvin
12/26/2016, 11:53 AMpermalmberg
12/26/2016, 4:12 PMthomasnield
12/26/2016, 4:22 PMthomasnield
12/26/2016, 4:22 PMedvin
12/26/2016, 4:58 PMthomasnield
12/26/2016, 4:59 PMron
12/26/2016, 5:03 PMron
12/26/2016, 5:03 PMron
12/26/2016, 5:06 PMedvin
12/26/2016, 5:07 PMedvin
12/26/2016, 5:09 PMstage.setOnCloseRequest(WindowEvent::consume)
permalmberg
12/26/2016, 5:33 PMFragment
seems to be the right choice, anyone agree/disagree?