Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
be05f641
Commit
be05f641
authored
Jan 20, 2021
by
Igor Demin
Committed by
Igor Demin
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkContentScale doesn't fire on Linux after we change scale in OS settings
parent
3ee629bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
HardwareLayer.kt
...o/src/jvmMain/kotlin/org/jetbrains/skiko/HardwareLayer.kt
+9
-0
No files found.
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/HardwareLayer.kt
View file @
be05f641
...
@@ -37,7 +37,16 @@ abstract class HardwareLayer : Canvas() {
...
@@ -37,7 +37,16 @@ abstract class HardwareLayer : Canvas() {
protected
open
fun
contentScaleChanged
()
=
Unit
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
)
{
override
fun
paint
(
g
:
Graphics
)
{
checkContentScale
()
}
private
fun
checkContentScale
()
{
val
contentScale
=
getDpiScale
()
val
contentScale
=
getDpiScale
()
if
(
contentScale
!=
_contentScale
)
{
if
(
contentScale
!=
_contentScale
)
{
_contentScale
=
contentScale
_contentScale
=
contentScale
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment