After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786922 - 3.25.91: [scaling] odd scaling percentages offered (174%, 176%)
3.25.91: [scaling] odd scaling percentages offered (174%, 176%)
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-28 15:13 UTC by Jeremy Bicha
Modified: 2017-08-28 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
display: Round the displayed scale values logically (1.32 KB, patch)
2017-08-28 16:46 UTC, Rui Matos
committed Details | Review

Description Jeremy Bicha 2017-08-28 15:13:31 UTC
Ubuntu 17.10 Beta
with GNOME3 Staging PPA
GNOME 3.25.91
Ubuntu session

I set gsettings org.gnome.mutter experimental-features ['scale-monitor-framebuffer'] and logged out and logged back in.

I have a regular HD display (1920x1080) on my laptop with Intel graphics. GNOME Settings>Displays shows these scaling options:
100%, 125%, 150%, 174%

In bug 786919 with a 2560x1440px screen, the user sees these:
100%, 150%, 176%, 200% and 225%

What I expect
=============
175% instead of 174% or 176%
Comment 1 Rui Matos 2017-08-28 16:46:55 UTC
Created attachment 358610 [details] [review]
display: Round the displayed scale values logically

Mutter currently generates 4 scales per integer scale. Knowing that,
we can nicely "round" the values we display to what the ideal scales
are even though the real values might be skewed since mutter creates
scale values close to the ideal ones that yield integer logical sizes.
Comment 2 Rui Matos 2017-08-28 17:00:03 UTC
Attachment 358610 [details] pushed as 23d5ea2 - display: Round the displayed scale values logically
Comment 3 Piotr Drąg 2017-08-28 18:38:41 UTC
-  gchar *text = g_strdup_printf (" %d%% ", (int) round (scale*100));
+  gchar *text = g_strdup_printf (" %d %% ", (int) (round_scale_for_ui (scale)*100));

Not all languages put a space before %, could we get this string translatable?
Comment 4 Jeremy Bicha 2017-08-28 19:11:48 UTC
(In reply to Piotr Drąg from comment #3)
> Not all languages put a space before %, could we get this string
> translatable?

There should not be a space between the number and % in English.
Comment 5 Rui Matos 2017-08-28 20:00:28 UTC
I just added the space because it seemed to look a bit better. Maybe I'll take it out again if more people tell me they don't like it.

While I appreciate your input, I won't make this string translatable though. The reason is that this UI is going to be changed again for the next cycle. What's in 3.26 is just what I could get done without too much late and potentially destabilizing changes. In fact, as this bug report attests, we shouldn't even be showing numbers at all for this kind of UI because the technical details mean that we can't provide "simple" and easily understandable numbers here.