mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 02:59:19 +01:00
Merge branch 'develop'
This commit is contained in:
commit
9db2416d23
@ -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("."))
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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 = {
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user