Skip to content

Commit

Permalink
#940 Restyle dashboard tiles to get more text visible - store state i…
Browse files Browse the repository at this point in the history
…n user-prefs
  • Loading branch information
luechtdiode committed Aug 17, 2024
1 parent b9e309c commit 01971e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/ch/seidel/kutu/AppNavigationModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import scalafx.scene.input.{KeyEvent, MouseEvent}
import scalafx.scene.layout.{Priority, Region, TilePane}

import java.io.IOException
import java.util.prefs.Preferences
import scala.collection.immutable.TreeMap

object AppNavigationModel {
Expand All @@ -37,7 +38,10 @@ case class KuTuAppThumbNail(context: Any, button: Button, item: TreeItem[String]

object KuTuAppTree {
val showThumbnails = new BooleanProperty()
showThumbnails.value = true
showThumbnails.value = Preferences.userRoot().getBoolean("showThumbnails", true)
showThumbnails.onChange {
Preferences.userRoot().putBoolean("showThumbnails", showThumbnails.value)
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/ch/seidel/kutu/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import java.nio.file.{Files, LinkOption, StandardOpenOption}
import java.security.{NoSuchAlgorithmException, SecureRandom}
import java.util.Collections.emptyList
import java.util.UUID
import java.util.prefs.Preferences
import javax.crypto.KeyGenerator
import scala.collection.mutable
import scala.jdk.CollectionConverters.CollectionHasAsScala
Expand Down

0 comments on commit 01971e4

Please sign in to comment.