File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
composeApp/src/jvmMain/kotlin/ua/valeriishymchuk/lobmapeditor Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ data class CreateProjectData(
2121
2222 CreateProjectData ::widthPx {
2323 minimum(992 )
24- maximum(3200 )
24+ maximum(3200 * 10 )
2525 }
2626
2727 CreateProjectData ::heightPx {
2828 minimum(896 )
29- maximum(2512 )
29+ maximum(2512 * 10 )
3030 }
3131 }
3232
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ fun WindowScope.CreateProjectWindow() {
3333 var form by remember { mutableStateOf(CreateProjectData ()) }
3434 val uiScope = rememberCoroutineScope()
3535
36+
37+ var isCreating by remember { mutableStateOf(false ) }
38+
3639 var errors: List <String > by remember { mutableStateOf(emptyList()) }
3740
3841 fun create () {
@@ -119,7 +122,8 @@ fun WindowScope.CreateProjectWindow() {
119122 form = form.copy(dir = pickResult.file)
120123 folderDirState = TextFieldState (form.dir?.absolutePath!! )
121124 }
122- }
125+ },
126+ enabled = ! isCreating
123127 )
124128 },
125129 modifier = Modifier .fillMaxWidth(),
@@ -134,7 +138,10 @@ fun WindowScope.CreateProjectWindow() {
134138 }
135139
136140 Row (Modifier .fillMaxWidth(), horizontalArrangement = Arrangement .End ) {
137- DefaultButton (onClick = { create() }) { Text (" Create" ) }
141+ DefaultButton (onClick = {
142+ isCreating = true
143+ create()
144+ }, enabled = ! isCreating) { Text (" Create" ) }
138145 }
139146
140147
You can’t perform that action at this time.
0 commit comments