Commit be05f641 authored by Igor Demin's avatar Igor Demin Committed by Igor Demin

checkContentScale doesn't fire on Linux after we change scale in OS settings

parent 3ee629bd
......@@ -37,7 +37,16 @@ abstract class HardwareLayer : Canvas() {
protected open fun contentScaleChanged() = Unit
override fun setBounds(x: Int, y: Int, width: Int, height: Int) {
super.setBounds(x, y, width, height)
checkContentScale()
}
override fun paint(g: Graphics) {
checkContentScale()
}
private fun checkContentScale() {
val contentScale = getDpiScale()
if (contentScale != _contentScale) {
_contentScale = contentScale
......
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