Skip to content

Commit

Permalink
refactor(upgrade): upgrade kotlin and compose and fix related issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Hoefer committed Feb 4, 2021
1 parent d652016 commit 0404595
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ buildscript {
}

plugins {
kotlin("jvm") version "1.4.21"
kotlin("jvm") version "1.4.21-2"
kotlin("plugin.serialization") version "1.4.21"
id("org.jetbrains.compose") version "0.3.0-build138"
id("org.jetbrains.compose") version "0.3.0-build142"
id("org.jlleitschuh.gradle.ktlint") version "9.4.1"
id("io.gitlab.arturbosch.detekt") version "1.15.0"
id("com.palantir.git-version") version "0.12.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.github.xetra11.ck3workbench.app.project.Project
import com.github.xetra11.ck3workbench.app.project.ProjectManager
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import java.io.File
import java.nio.file.Paths

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object WorkbenchPanel {
boxModifier,
contentAlignment = Alignment.Center,
) {
Image(squareImage, alpha = 0.2F)
Image(bitmap = squareImage, "", alpha = 0.2F)
}
}

Expand All @@ -62,8 +62,8 @@ object WorkbenchPanel {
boxModifier.clickable(onClick = { ViewManager.changeView(ViewManager.View.DYNASTY_VIEW) }),
contentAlignment = Alignment.Center,
) {
Image(squareImage)
Image(bloodImage, modifier = Modifier.fillMaxSize(0.7F))
Image(squareImage, "Background Square")
Image(bloodImage, "Blood Icon", modifier = Modifier.fillMaxSize(0.7F))
}
}

Expand All @@ -73,9 +73,9 @@ object WorkbenchPanel {
boxModifier.clickable(onClick = { ViewManager.changeView(ViewManager.View.CHARACTER_CREATE_VIEW) }),
contentAlignment = Alignment.Center,
) {
Image(squareImage)
Image(crownImage, modifier = Modifier.fillMaxSize(0.7F))
Image(plusIconImage, modifier = Modifier.fillMaxSize(0.4F).align(Alignment.BottomEnd))
Image(squareImage, "")
Image(crownImage, "", modifier = Modifier.fillMaxSize(0.7F))
Image(plusIconImage, "", modifier = Modifier.fillMaxSize(0.4F).align(Alignment.BottomEnd))
}
}

Expand All @@ -85,8 +85,8 @@ object WorkbenchPanel {
boxModifier.clickable(onClick = { ViewManager.changeView(ViewManager.View.CHARACTER_VIEW) }),
contentAlignment = Alignment.Center,
) {
Image(squareImage)
Image(crownImage, modifier = Modifier.fillMaxSize(0.7F))
Image(squareImage, "")
Image(crownImage, "", modifier = Modifier.fillMaxSize(0.7F))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SkillSelection {
horizontalAlignment = Alignment.CenterHorizontally
) {
Box(contentAlignment = Alignment.Center) {
Image(modifier = Modifier.size(60.dp), bitmap = skillImage(skill))
Image(contentDescription = "", modifier = Modifier.size(60.dp), bitmap = skillImage(skill))
}
Row {
Text(modifier = Modifier.clickable { counter = if (counter <= 1) 0 else counter.minus(1) }, text = "<")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,9 @@ class TraitSelection {
contentAlignment = Alignment.Center,
) {
Image(
contentDescription = "",
modifier = selectionModifier.size(70.dp, 70.dp),
bitmap = traitImage(leveledTrait, level)
bitmap = traitImage(leveledTrait, level),
)
}
}
Expand Down Expand Up @@ -387,6 +388,7 @@ class TraitSelection {
trait: Trait
) {
Image(
contentDescription = "",
modifier = selectionModifier,
bitmap = traitImage(trait)
)
Expand Down

0 comments on commit 0404595

Please sign in to comment.