[ffe/uife] "Match the display settings" checkbox
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-control-center (Ubuntu) |
Invalid
|
High
|
Eleni Maria Stea |
Bug Description
Here are some notes on the
https:/
After we introduced the HiDPI changes and the per-monitor Unity scaling factor (ui-scale gsetting) there was the following problem, discussed at UDS:
The Qt and Gnome applications would use the scaling-factor and text-scaling-factor for scaling and not our ui-scale, so their window contents would have a different size than their decorations, the menus and the launcher. Another problem was that the Gnome text-scaling-factor and scaling-factor are settings for the whole desktop whereas ui-scale is per monitor and there would be some inconsistency anyway when multiple monitors are plugged in.
So, as a quick partial solution to the problem, we promised to add a checkbox in each monitor's settings that sets the scaling-factor and text-scaling factor values in accordance with the ui-scale for that monitor when it's checked.
This way, the user will see the same size in Unity and the Gtk/Qt applications in 1 monitor if he checks the checkbox of a monitor.
To allow this, we had to introduce a new gsetting that stores the selected monitor name here: https:/
Of course this whole feature could be better designed so that the user receives more visual feedback. We discussed it with the designers team and they gave us a much better design that will be used in the future: https:/
For the moment we will just use the checkbox to meet the deadline which is in a few days, as we promised at UDS.
-------
Some notes in the logic:
-------
First of all, here is the way we set the scaling-factor and text-scaling factor to be in accordance with the ui-scale. The idea is Marco Trevisan's and I paste his algorithm as it was in our Unity team document:
> Scaling the World…
> So, after scaling unity we should care also about the apps… There are still some troubles to get the best experience:
> Applications doesn’t care about the per-monitor scaling
> Gtk2 and Qt (using a gtk2 rendering style) apps only care about scaling factor, so there’s not much we can do with them
> Gtk3 apps support integer UI scaling only
> [...]
> When that option is true we set the gdk-interface-
> attached display, while we set the text-scaling-factor to a value that multiplied for the interface scaling factor will result our
> scaling factor (this will apply to both Gtk and Qt applications)
> [...]
> So, our monitor has the scaling factor of 2.25, we set:
> - scaling-factor: 2
> - text-scaling-
(In the above example 2.25 is the ui-scale, the Unity scaling factor that is per monitor)
How the checkbox works:
-------
The first time the user runs the u-c-c (which is after a fresh installation) the checkbox appears to be checked in the primary monitor and we set the scaling-factor, text-scaling-factor (Gnome) to match the ui-scale (Unity), so that the user can have a good visual experience in his primary monitor. We also store the primary monitor as "selected-display" in our gsetting to remember this choice.
Every other time:
Unless if the scaling factors have been changed from a non u-c-c application (see below for this case), the checkbox appears unchecked for every monitor except of the selected that is checked. When the user selects a new monitor, u-c-c "remembers" his choice and the new selection appears checked whereas all the others are unchecked. The selected monitor is stored in the selected-display gsetting in gsettings-
What if the scaling factors change from outside u-c-c?
-------
Every time we update the checkbox status (checked or unchecked) we not only check the selected-monitor's value but the consistency of the 3 scaling factors.
In other words, if:
scaling-factor * text-scaling-factor != ui-scale +- small_ERROR for the ui-scale of the selected monitor,
and
the selected-display setting matches the selected monitor,
it means that either the text-scaling-factor or the scaling-factor have been changed by some external program or the user himself.
We should respect the user's choice, so instead of overriding it we just set the button status to unchecked and we set the selected-display gsetting to "none". If the user wasnt aware of the change he will just check the unchecked button to fix his setting, if he was he will keep his settings having some sort of visual feedback that they don't match the unity settings in the current monitor from the button status: unchecked button means mismatch between the unity (ui-scale) and the applications settings (scaling-factor, text-scaling-
Related branches
- Sebastien Bacher: Needs Information
- PS Jenkins bot (community): Approve (continuous-integration)
- Marco Trevisan (Treviño): Pending requested
- Unity Team: Pending requested
-
Diff: 237 lines (+130/-2)2 files modifiedpanels/display/cc-display-panel.c (+93/-1)
panels/display/display-capplet.ui (+37/-1)
Changed in unity-control-center: | |
assignee: | nobody → Eleni Maria Stea (hikiko) |
affects: | unity-control-center → unity-control-center (Ubuntu) |
summary: |
- "Match the display settings" checkbox + [ffe/uife] "Match the display settings" checkbox |
description: | updated |
Changed in unity-control-center (Ubuntu): | |
importance: | Undecided → High |
Changed in unity-control-center (Ubuntu): | |
status: | New → Invalid |
I think the algorithm is okay, but the rest of the solution seems overly complicated to me.
The design has a slider and a 'Match Display' button. I can't launch the MP because it crashes for me so I'm not able to tell what it looks like currently, but it seems to me like we could as an interim solution have this button only instead of a checkbox. When you click it it applies the algorithm for the selected display. Thus the automagic detection goes away and you don't even need to watch the settings.
Would that work?