** Changed in: unity-control-center (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity-control-center in Ubuntu.
https://bugs.launchpad.net/bugs/1294578

Title:
  [ffe/uife] "Match the display settings" checkbox

Status in “unity-control-center” package in Ubuntu:
  New

Bug description:
  Here are some notes on the
  
https://code.launchpad.net/~hikiko/unity-control-center/u-c-c.checkbox-for-app-scaling/+merge/211681
 MP:

  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://code.launchpad.net/~hikiko
  /gsettings-ubuntu-touch-schemas/gsettings-ubuntu-touch-schemas
  .selected-monitor/+merge/211680.

  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://wiki.ubuntu.com/BrightnessAndDisplays#Displays (credits
  Matthew Paul Thomas)

  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-scaling factor to match 
the integer part of maximum scaling factor of the
  > 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-factor: 2.25 / 2 = 1.125
  (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-ubuntu-schemas.

  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-factor)
  for this monitor.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-control-center/+bug/1294578/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to