Browse Source

Fixed loading screen when click on miniature.

pull/24/head
Roman Sedaikin 4 years ago
parent
commit
f440b6ddee
  1. 2
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/model/ContentState.kt
  2. 6
      examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/view/MainScreen.kt

2
examples/imageviewer/common/src/desktopMain/kotlin/example/imageviewer/model/ContentState.kt

@ -228,6 +228,7 @@ object ContentState {
val fullSizePicture = loadFullImage(picture.source)
fullSizePicture.id = picture.id
wrapPictureIntoMainImage(fullSizePicture)
isAppUIReady.value = true
}
} else {
invokeLater {
@ -235,6 +236,7 @@ object ContentState {
"${ResString.noInternet}\n${ResString.loadImageUnavailable}"
)
wrapPictureIntoMainImage(picture)
isAppUIReady.value = true
}
}
}

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

@ -145,7 +145,8 @@ fun setTitleBar(text: String, content: ContentState) {
onExit = {
refreshButtonHover.value = false
false
})
}
)
.background(color = if (refreshButtonHover.value) TranslucentBlack else Transparent),
onClick = {
if (content.isContentReady()) {
@ -169,7 +170,8 @@ fun setPreviewImageUI(content: ContentState) {
modifier = Modifier.background(color = DarkGray),
onClick = {
AppState.screenState(ScreenType.FullscreenImage)
}) {
}
) {
Card(
backgroundColor = Transparent,
modifier = Modifier.preferredHeight(250.dp),

Loading…
Cancel
Save