Minor appearance adjustments

added scaling with 1.1f(lesson indexes & "Pause") / 0.8f(times)
This commit is contained in:
matthias
2024-06-09 13:22:00 +02:00
parent 41b54f15ea
commit 15cadb76c6

View File

@@ -39,6 +39,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.scale
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat.startActivity
@@ -212,7 +213,7 @@ fun StundenplanContent(activity: ComponentActivity, loadedLessons: List<List<Les
)
}
//Else creation of a Box containing all the information from the LessonData object
else if (dailyLessons != emptyList<LessonData>()) {
else if (dailyLessons != emptyList<LessonData>() && dailyLessons.size != extraIndex) {
LessonBox(subject = dailyLessons[extraIndex].subject, teacher = dailyLessons[extraIndex].teacher, room = dailyLessons[extraIndex].room)
//ExtraIndex counted up only here as it does only index the lessons and NOT the breaks
extraIndex++
@@ -371,7 +372,9 @@ fun InfoColumn(loadedLessons: List<List<LessonData>>, breakAmnt: Int, breaksStar
) {
//"Pause" String instead of indexing
Text(
modifier = Modifier.align(Alignment.Center),
modifier = Modifier
.align(Alignment.Center)
.scale(1.1f),
text = "Pause",
textDecoration = TextDecoration.Underline,
style = MaterialTheme.typography.labelLarge
@@ -380,7 +383,8 @@ fun InfoColumn(loadedLessons: List<List<LessonData>>, breakAmnt: Int, breaksStar
Text(
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(3.dp),
.padding(3.dp)
.scale(0.8f),
text = formattedBreakTime,
style = MaterialTheme.typography.labelMedium
)
@@ -407,7 +411,9 @@ fun InfoColumn(loadedLessons: List<List<LessonData>>, breakAmnt: Int, breaksStar
) {
//String with the indexing of the lessons
Text(
modifier = Modifier.align(Alignment.Center),
modifier = Modifier
.align(Alignment.Center)
.scale(1.1f),
text = "${i + 1 - lessonNegIncrement}:",
textDecoration = TextDecoration.Underline,
style = MaterialTheme.typography.labelLarge
@@ -416,7 +422,8 @@ fun InfoColumn(loadedLessons: List<List<LessonData>>, breakAmnt: Int, breaksStar
Text(
modifier = Modifier
.align(Alignment.BottomCenter)
.padding(3.dp),
.padding(3.dp)
.scale(0.8f),
text = substringHelper(extraIndex, firstLesson, lessonLength, lessonTimeIncrement),
style = MaterialTheme.typography.labelMedium
)