Commit 5c55265
committed
gtk4: Fix Cairo backend on HiDPI screens
With GTK4, the Cairo context we get is always in logical pixels, and is
automatically scaled to the right size, without any worry about
blurriness. So in that case, we can ignore all scale factor changes, and
assume it's always 1.
The remaining effect of tracking scale factor changes is to trigger a
re-draw, but GTK will send a resize event to go along with it, which
will do that for us.
Fixes matplotlib#25847
Replaces matplotlib#258611 parent d7d1bba commit 5c55265
File tree
2 files changed
+6
-13
lines changed- lib/matplotlib/backends
2 files changed
+6
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 230 | + | |
| 231 | + | |
238 | 232 | | |
239 | 233 | | |
240 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
0 commit comments