Minor improvements
This commit is contained in:
parent
7aa80f54f7
commit
f721768098
@ -42,7 +42,7 @@ class MainApp(
|
|||||||
startTime: Long
|
startTime: Long
|
||||||
)(implicit logger: Logger[Task]) {
|
)(implicit logger: Logger[Task]) {
|
||||||
|
|
||||||
lazy val _scene = new Scene {
|
private lazy val _scene = new Scene {
|
||||||
root = new HBox {
|
root = new HBox {
|
||||||
padding = Insets(20)
|
padding = Insets(20)
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ class MainAppDelegate(schedulers: Schedulers)(implicit logger: Logger[Task]) {
|
|||||||
| -fx-pref-width: 200;
|
| -fx-pref-width: 200;
|
||||||
| -fx-text-fill: WHITE; """.stripMargin
|
| -fx-text-fill: WHITE; """.stripMargin
|
||||||
|
|
||||||
def init =
|
val init =
|
||||||
for {
|
for {
|
||||||
router <- Task.pure(new FXRouter[Page])
|
router <- Task.pure(new FXRouter[Page])
|
||||||
routerStore <- router.store(Page.Home, logger)
|
routerStore <- router.store(Page.Home, logger)
|
||||||
|
@ -135,7 +135,7 @@ object JavaFXMonixObservables {
|
|||||||
def -->(sub: Observer[A]) =
|
def -->(sub: Observer[A]) =
|
||||||
prop.onChange((a, b, c) => if (c != null) sub.onNext(c))
|
prop.onChange((a, b, c) => if (c != null) sub.onNext(c))
|
||||||
|
|
||||||
def -->(op: Property[A, A]) = {
|
def ==>(op: Property[A, A]) = {
|
||||||
prop.onChange((a, b, c) => if (c != null) op() = c)
|
prop.onChange((a, b, c) => if (c != null) op() = c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,16 +21,15 @@ class HomeScreen(
|
|||||||
|
|
||||||
val myObs = myButton.observableAction
|
val myObs = myButton.observableAction
|
||||||
// myObs.foreachL(_ => ())
|
// myObs.foreachL(_ => ())
|
||||||
private lazy val root = Task.deferAction { implicit s =>
|
private lazy val root = Task {
|
||||||
Task {
|
|
||||||
new HBox {
|
new HBox {
|
||||||
children = List(
|
children = List(
|
||||||
new Text {
|
new Text {
|
||||||
text = "hello"
|
text = "hello"
|
||||||
},
|
},
|
||||||
myButton
|
myButton
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user