Initial ScaleFactor != 1.0 doesn't handle scale factor changed properly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.5k
- Forks
- 240
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 4
Description
On ubuntu I used this command to change scale factor dynamically:
gsettings set org.gnome.desktop.interface text-scaling-factor 1.0
I tested using the masonry to_do_list.rs example.
If I start at scale factor 1 and change to scale factor 1.5 it works fine:
But if I start with scale factor 1.5 and switch to 1.0 I get this (error on bottom image after switching to 1.0):
My expectation would be that the top image (start 1.0) and the bottom image (start 1.5, switch to 1.0) would match.
Note that in a custom rendering widget I noted that something was amiss even in the start 1.5 case, but I will wait to see if a fix for this issue resolves that before creating a test case for it.
Putting prints into event loop (first print on resume, second on scale changed):
[Note: edited to fix reporting issue]:
Scale factor: 1.5
Size: PhysicalSize { width: 800, height: 600 }
Scale factor changed: 1
Size: PhysicalSize { width: 600, height: 600 }
Scale factor changed: 1.5
Size: PhysicalSize { width: 900, height: 900 }
Scale factor changed: 1
Size: PhysicalSize { width: 600, height: 600 }
Versus when starting at 1.0:
Scale factor: 1
Size: PhysicalSize { width: 800, height: 600 }
Scale factor changed: 1.5
Size: PhysicalSize { width: 1200, height: 900 }
Scale factor changed: 1
Size: PhysicalSize { width: 800, height: 600 }
Scale factor changed: 1.5
Size: PhysicalSize { width: 1200, height: 900 }
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the scale changes with the masonry to_do_list.rs example and inspect the event-loop handling of resume and scale-factor-changed events. Compare the reported physical sizes when starting at 1.0 versus 1.5; done means switching between both values produces matching rendering and sizes regardless of the initial scale factor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100