Minor improvements

This commit is contained in:
Rohan Sircar 2020-12-20 16:27:13 +05:30
parent 7aa80f54f7
commit f721768098
3 changed files with 12 additions and 13 deletions

View File

@ -42,7 +42,7 @@ class MainApp(
startTime: Long
)(implicit logger: Logger[Task]) {
lazy val _scene = new Scene {
private lazy val _scene = new Scene {
root = new HBox {
padding = Insets(20)
}
@ -78,7 +78,7 @@ class MainAppDelegate(schedulers: Schedulers)(implicit logger: Logger[Task]) {
| -fx-pref-width: 200;
| -fx-text-fill: WHITE; """.stripMargin
def init =
val init =
for {
router <- Task.pure(new FXRouter[Page])
routerStore <- router.store(Page.Home, logger)

View File

@ -135,7 +135,7 @@ object JavaFXMonixObservables {
def -->(sub: Observer[A]) =
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)
}

View File

@ -21,8 +21,8 @@ class HomeScreen(
val myObs = myButton.observableAction
// myObs.foreachL(_ => ())
private lazy val root = Task.deferAction { implicit s =>
Task {
private lazy val root = Task {
new HBox {
children = List(
new Text {
@ -32,7 +32,6 @@ class HomeScreen(
)
}
}
}
def render = root