Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/src/main/resources/defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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=
2 changes: 2 additions & 0 deletions app/src/processing/app/Preferences.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -190,6 +191,7 @@ fun watchFile(file: File): Any? {
if (modified.context() != path.fileName) continue
event = modified
}
delay(10)
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/processing/app/ui/WelcomeSurvey.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -47,6 +48,7 @@ fun SurveyInvitation() {
.pointerHoverIcon(
PointerIcon.Hand
)
.border(1.dp, MaterialTheme.colorScheme.outlineVariant, RoundedCornerShape(12.dp))
) {
Image(
painter = painterResource("bird.svg"),
Expand Down
12 changes: 5 additions & 7 deletions app/src/processing/app/ui/preferences/Interface.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
) {
Expand All @@ -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
Expand Down