Unverified Commit 75f88a97 authored by Pavel's avatar Pavel Committed by GitHub

`syncSize` should be called when window is visible to take into effect (#632)

parent cf38e7e6
...@@ -130,6 +130,7 @@ actual open class SkiaLayer internal constructor( ...@@ -130,6 +130,7 @@ actual open class SkiaLayer internal constructor(
val window = SwingUtilities.getRoot(this) as Window val window = SwingUtilities.getRoot(this) as Window
window.addComponentListener(fullscreenAdapter) window.addComponentListener(fullscreenAdapter)
backedLayer.defineContentScale() backedLayer.defineContentScale()
checkContentScale()
checkShowing() checkShowing()
init(isInited) init(isInited)
} }
...@@ -145,6 +146,7 @@ actual open class SkiaLayer internal constructor( ...@@ -145,6 +146,7 @@ actual open class SkiaLayer internal constructor(
private fun checkShowing() { private fun checkShowing() {
isShowingCached = super.isShowing() isShowingCached = super.isShowing()
if (isShowing) { if (isShowing) {
redrawer?.syncSize()
repaint() repaint()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment