Browse Source

Move to unmerged30.

pull/4/head
Nikolay Igotti 4 years ago
parent
commit
a61dbff798
  1. 1
      examples/imageviewer/.idea/vcs.xml
  2. 2
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt
  3. 6
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt
  4. 2
      examples/imageviewer/settings.gradle.kts
  5. 2
      examples/issues/settings.gradle.kts

1
examples/imageviewer/.idea/vcs.xml

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

2
examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/FullImageScreen.kt

@ -196,7 +196,7 @@ fun imageByGesture(
drag: DragHandler
): Image {
val bitmap = cropBitmapByScale(content.getSelectedImage(), scale.factor.value, drag)
val image = Image.makeFromEncoded(toByteArray(bitmap), IRect(0, 0, bitmap.width, bitmap.height))
val image = Image.makeFromEncoded(toByteArray(bitmap))
if (scale.factor.value > 1f)
return image

6
examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt

@ -153,8 +153,7 @@ fun setPreviewImageUI(content: ContentState) {
if (content.isMainImageEmpty())
icEmpty()
else Image.makeFromEncoded(
toByteArray(content.getSelectedImage()),
IRect(0, 0, content.getSelectedImage().width, content.getSelectedImage().height)
toByteArray(content.getSelectedImage())
).asImageAsset(),
modifier = Modifier
.fillMaxWidth().padding(start = 1.dp, top = 1.dp, end = 1.dp, bottom = 5.dp),
@ -189,8 +188,7 @@ fun setMiniatureUI(
) {
Image(
Image.makeFromEncoded(
toByteArray(picture.image),
IRect(0, 0, picture.image.width, picture.image.height)
toByteArray(picture.image)
).asImageAsset(),
modifier = Modifier.preferredHeight(70.dp)
.preferredWidth(90.dp)

2
examples/imageviewer/settings.gradle.kts

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-build53")
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-unmerged30")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}

2
examples/issues/settings.gradle.kts

@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-build53")
classpath("org.jetbrains.compose:compose-gradle-plugin:0.1.0-unmerged30")
classpath("com.android.tools.build:gradle:4.0.1")
classpath(kotlin("gradle-plugin", version = "1.4.0"))
}

Loading…
Cancel
Save