Skip to content

Commit

Permalink
some fixes for UI
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonAsmirko committed Mar 27, 2021
1 parent 96730f0 commit 68e18bf
Show file tree
Hide file tree
Showing 73 changed files with 38 additions and 43 deletions.
Binary file modified .gradle/6.7.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/6.7.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/6.7.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/6.7.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/6.7.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/6.7.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified .gradle/6.7.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified .gradle/6.7.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified .gradle/6.7.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified build/classes/kotlin/main/META-INF/HelloWorld.kotlin_module
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$1$1$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$10.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$11$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$12$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$13.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$14$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$15$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$2$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$3$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$4$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$5$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$6.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$7$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$8.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$1$9$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$2$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$3$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$4$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1$1$5.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1$1.class
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt$main$1.class
Binary file not shown.
Binary file not shown.
Binary file modified build/classes/kotlin/main/MainKt.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/build-history.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
��������������������������
������������������������������������
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
т ккксхчђђђђЬ ячъУ ќсњи и и Ш Ф ї
β ΪΪΪαεηςςςςΜ οηκΓ όαϊΨ Ψ Ψ Θ Δ χοφϋςςςςςςς
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
챘쑖쑖쁖셕핔���화
챘쑖쑖쁖셕핔���화s쉔�텒텒
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
72
59
83
71
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
έςΙ.α6Γ)Ϋ'Ρ$ΰ'Ο(ά Ϊ$εΣ"γβΛθΗΟοοΩΩάΩχΗΥΚωψθαβφΦχΘΙΕ'π�Α*ψ%ψ$π"χύ"ςΐΔΪοΦαπθΓΡ%ω#ΦχέύυΜΧ%ρϊ$Ο,Ω,Η,ΛΚό!άΑ(ά*ΐΪΘ(δχΤΒθν
ЭтЙ.б6Г)Ы'С$а'П(Ь Ъ$еУ"гвЛиЗПппЩЩЬЩчЗХКщшибвцЦчИЙЕ'ряБ*ш%ш$р"чэ"тАДЪпЦбриГС%щ#ЦчЭэхМЧ%съ$П,Щ,З,ЛКь!ЬБ(Ь*АЪИ(дчФВин Ф"ГчЦи б$ЕШЭБсютЮбЛбдЬМЫ нЧЖИЩ
жкэ Иэя ЮЯф ЭюФ
мЯВ ЙХТ
зЩщ ДрУГьт ьЦъ
Expand Down
Binary file modified build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i
Binary file not shown.
Binary file modified build/kotlin/compileKotlin/last-build.bin
Binary file not shown.
22 changes: 0 additions & 22 deletions src/main/kotlin/composables/TextCentredComposable.kt

This file was deleted.

44 changes: 29 additions & 15 deletions src/main/kotlin/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.compose.ui.unit.dp
import composables.buttonInBox
import composables.fieldSpacer
import composables.plotView
import composables.textCentred
import firstLab.*
import model.PlotData
import model.interpolators.FunctionInterpolator
Expand Down Expand Up @@ -45,12 +44,12 @@ fun main() = Window(
) {
var leftViewType by remember { mutableStateOf(LeftViewType.METHOD) }
var func by remember { mutableStateOf(Constants.NONE_FUNC) }
var numBlobs by remember { mutableStateOf("") }
var numBlobs by remember { mutableStateOf("1000") }
var lBound by remember { mutableStateOf("") }
var rBound by remember { mutableStateOf("") }
val functionInterpolator by remember { mutableStateOf(FunctionInterpolator()) }
var functionDrawingPermitted by remember { mutableStateOf(false) }
var stepSize by remember { mutableStateOf("") }
var stepSize by remember { mutableStateOf("1") }
var currentOptimizerStep by remember { mutableStateOf(0) }
var message: String? = null
var points: List<Offset>?
Expand Down Expand Up @@ -106,6 +105,7 @@ fun main() = Window(
func = pair.key
funcChanged = true
leftViewType = LeftViewType.FUNCTION_INPUT
optimizer?.array?.clear()
}
}
}
Expand All @@ -117,9 +117,11 @@ fun main() = Window(
leftViewType = LeftViewType.FUNCTION
func = Constants.NONE_FUNC
functionDrawingPermitted = false
numBlobs = ""
numBlobs = "1000"
lBound = ""
rBound = ""
currentOptimizerStep = 0

}
fieldSpacer()
Text(
Expand Down Expand Up @@ -172,7 +174,13 @@ fun main() = Window(
}
if (functionDrawingPermitted) {
fieldSpacer()
Text(text = "Step (num iterations)")
Text(
modifier = Modifier
.padding(30.dp)
.align(Alignment.CenterHorizontally),
text = "Step (num iterations)",
color = MaterialTheme.colors.onPrimary
)
fieldSpacer()
OutlinedTextField(
value = stepSize,
Expand Down Expand Up @@ -266,33 +274,39 @@ fun main() = Window(
val xFlt = p.first.toFloat()
Optimizer.Pair<Float>(
p.first.toFloat(),
functionsButtonsText[func]!!.invoke(xFlt)
p.second.toFloat()
)
}
},
currentOptimizerStep
)
} ?: textCentred(
} ?: Text(
modifier = Modifier
.align(alignment = Alignment.CenterVertically)
.weight(0.8f),
Constants.MESSAGE_TROUBLES_WITH_OPTIMIZER
.weight(0.8f)
.padding(30.dp),
text = Constants.MESSAGE_TROUBLES_WITH_OPTIMIZER,
color = MaterialTheme.colors.onPrimary
)
} else {
textCentred(
Text(
modifier = Modifier
.align(alignment = Alignment.CenterVertically)
.weight(0.8f),
message!!
.weight(0.8f)
.padding(30.dp),
text = message!!,
color = MaterialTheme.colors.onPrimary
)
}
}
} else {
textCentred(
Modifier
Text(
modifier = Modifier
.padding(30.dp)
.align(alignment = Alignment.CenterVertically)
.weight(0.8f),
Constants.HINT_CHOOSE_FUNCTION
text = Constants.HINT_CHOOSE_FUNCTION,
color = MaterialTheme.colors.onPrimary
)
}
}
Expand Down

0 comments on commit 68e18bf

Please sign in to comment.