diff --git a/app/src/main/resources/defaults.txt b/app/src/main/resources/defaults.txt index 6e3e00f0d..c979747bd 100644 --- a/app/src/main/resources/defaults.txt +++ b/app/src/main/resources/defaults.txt @@ -307,3 +307,6 @@ pdex.completion.trigger = false pdex.suggest.imports = true # Set to false to disable ctrl/cmd-click jump to definition pdex.inspectMode.hotkey = true + +# Set default theme to automatic based on the users system +preferences.editor.theme= \ No newline at end of file diff --git a/app/src/processing/app/Preferences.kt b/app/src/processing/app/Preferences.kt index 48416a8d3..bd75896af 100644 --- a/app/src/processing/app/Preferences.kt +++ b/app/src/processing/app/Preferences.kt @@ -3,6 +3,7 @@ package processing.app import androidx.compose.runtime.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.FlowPreview +import kotlinx.coroutines.delay import kotlinx.coroutines.flow.debounce import kotlinx.coroutines.flow.dropWhile import kotlinx.coroutines.launch @@ -190,6 +191,7 @@ fun watchFile(file: File): Any? { if (modified.context() != path.fileName) continue event = modified } + delay(10) } } } diff --git a/app/src/processing/app/ui/WelcomeSurvey.kt b/app/src/processing/app/ui/WelcomeSurvey.kt index c7a110a87..c0ebb23ac 100644 --- a/app/src/processing/app/ui/WelcomeSurvey.kt +++ b/app/src/processing/app/ui/WelcomeSurvey.kt @@ -2,6 +2,7 @@ package processing.app.ui import androidx.compose.foundation.Image import androidx.compose.foundation.background +import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape @@ -47,6 +48,7 @@ fun SurveyInvitation() { .pointerHoverIcon( PointerIcon.Hand ) + .border(1.dp, MaterialTheme.colorScheme.outlineVariant, RoundedCornerShape(12.dp)) ) { Image( painter = painterResource("bird.svg"), diff --git a/app/src/processing/app/ui/preferences/Interface.kt b/app/src/processing/app/ui/preferences/Interface.kt index be0ee833c..6a07b83f1 100644 --- a/app/src/processing/app/ui/preferences/Interface.kt +++ b/app/src/processing/app/ui/preferences/Interface.kt @@ -126,8 +126,8 @@ class Interface { ?: range.start ) } - val automatic = currentZoom == range.start - val zoomPerc = "${currentZoom.toInt()}%" + val automatic = { currentZoom == range.start } + val zoomPerc = { "${currentZoom.toInt()}%" } Row( horizontalArrangement = Arrangement.spacedBy(16.dp) ) { @@ -136,16 +136,14 @@ class Interface { .widthIn(max = 200.dp) ) { Text( - text = if (automatic) "Auto" else zoomPerc, + text = if (automatic()) "Auto" else zoomPerc(), ) Slider( value = currentZoom, onValueChange = { currentZoom = it - }, - onValueChangeFinished = { - prefs["editor.zoom.auto"] = automatic - updatePreference(zoomPerc) + prefs["editor.zoom.auto"] = automatic() + updatePreference(zoomPerc()) }, valueRange = range, steps = 3