From 97e05f28953105a50c11ac7a238130899df1b04e Mon Sep 17 00:00:00 2001 From: Fingercomp Date: Tue, 19 Aug 2025 16:32:32 +0300 Subject: [PATCH 1/4] Fix the node selector always spawning in the same place --- src/main/scala/ocelot/desktop/ui/widget/ScrollView.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/scala/ocelot/desktop/ui/widget/ScrollView.scala b/src/main/scala/ocelot/desktop/ui/widget/ScrollView.scala index 3fe45e1..8001b43 100644 --- a/src/main/scala/ocelot/desktop/ui/widget/ScrollView.scala +++ b/src/main/scala/ocelot/desktop/ui/widget/ScrollView.scala @@ -14,6 +14,11 @@ import ocelot.desktop.util.Logging class ScrollView(val inner: Widget) extends Widget with Logging with HoverHandler { override protected val layout: Layout = new Layout(this) { + override def recalculateBounds(): Unit = { + super.recalculateBounds() + maximumSize = inner.maximumSize + } + override def relayout(): Unit = { inner.rawSetPosition(position - Vector2D(xOffset, yOffset)) inner.relayout() From fd31074d0dbd6a4a143ad86424f60f974d53ad31 Mon Sep 17 00:00:00 2001 From: UnicornFreedom Date: Tue, 19 Aug 2025 19:38:51 +0200 Subject: [PATCH 2/4] Fix default config resource loading --- src/main/scala/ocelot/desktop/Settings.scala | 6 ++++-- src/main/scala/ocelot/desktop/util/Keymap.scala | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/scala/ocelot/desktop/Settings.scala b/src/main/scala/ocelot/desktop/Settings.scala index 931a5aa..a4dbc3b 100644 --- a/src/main/scala/ocelot/desktop/Settings.scala +++ b/src/main/scala/ocelot/desktop/Settings.scala @@ -42,7 +42,9 @@ class Settings(val config: Config) extends SettingsData { windowSize.y -= 16 } - keymap.load(config.getConfig("ocelot.keymap")) + if (config.hasPath("ocelot.keymap")) { + keymap.load(config.getConfig("ocelot.keymap")) + } recentWorkspace = config.getOptionalString("ocelot.workspace.recent") pinNewWindows = config.getBooleanOrElse("ocelot.workspace.pinNewWindows", default = true) @@ -147,7 +149,7 @@ object Settings extends Logging { } logger.info(s"Using default Ocelot Desktop configuration...") - settings = new Settings(ConfigFactory.parseResources("/ocelot/desktop/ocelot.conf")) + settings = new Settings(ConfigFactory.parseResources(OcelotDesktop.getClass, "/ocelot/desktop/ocelot.conf")) } def save(path: Path): Unit = { diff --git a/src/main/scala/ocelot/desktop/util/Keymap.scala b/src/main/scala/ocelot/desktop/util/Keymap.scala index 51d91cd..0e90302 100644 --- a/src/main/scala/ocelot/desktop/util/Keymap.scala +++ b/src/main/scala/ocelot/desktop/util/Keymap.scala @@ -11,7 +11,7 @@ import scala.collection.mutable import scala.jdk.CollectionConverters._ -class Keymap { +class Keymap extends Logging { // default mappings val map: mutable.Map[Keybind.Value, Int] = mutable.Map( // OpenComputers @@ -84,7 +84,11 @@ class Keymap { Keybind.values.foreach(keybind => { val path = keybind.toString.toLowerCase if (config.hasPath(path)) { - set(keybind, config.getInt(path)) + try { + set(keybind, config.getInt(path)) + } catch { + case e: Throwable => logger.error(s"Skipping keymap config for '$path'...", e) + } } }) } From 25cabf1d0a446ec2bcb7201f81cd292313de66cd Mon Sep 17 00:00:00 2001 From: Fingercomp Date: Tue, 19 Aug 2025 20:57:24 +0300 Subject: [PATCH 3/4] Fix a typo in doc/releases.md --- doc/releases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/releases.md b/doc/releases.md index fd4db02..0fd60fb 100644 --- a/doc/releases.md +++ b/doc/releases.md @@ -9,7 +9,7 @@ Let's assume you want to release a new version, say, `1.33.7`. 3. Update the version of Ocelot Desktop in `build.sbt`; commit the changes. The commit message should just say "Version 1.33.7". 4. Switch to `master` and merge `develop` into it. -5. Create an annotated tag: `git -a v1.33.7`. +5. Create an annotated tag: `git tag -a v1.33.7`. On the first line, write "Version 1.33.7", followed by a blank line. Then describe the changes in Markdown. Make sure not to use `#` in the text, since git will treat it as a comment. From 3ada4c684548b90d0ac38e9cf489e438543e47c1 Mon Sep 17 00:00:00 2001 From: Fingercomp Date: Tue, 19 Aug 2025 21:01:18 +0300 Subject: [PATCH 4/4] Version 1.14.1 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 50dd457..e724ab9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ name := "ocelot-desktop" -version := "1.14.0" +version := "1.14.1" scalaVersion := "2.13.10" lazy val root = project.in(file("."))