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 695536 - Fix format and language chooser check marks being cleared
Fix format and language chooser check marks being cleared
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-10 03:17 UTC by Rui Matos
Modified: 2013-03-18 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common: Fix language chooser check marks being cleared (991 bytes, patch)
2013-03-10 03:17 UTC, Rui Matos
committed Details | Review
region: Fix format chooser check marks being cleared (915 bytes, patch)
2013-03-10 03:17 UTC, Rui Matos
committed Details | Review
region: Keep format chooser labels centered (2.55 KB, patch)
2013-03-15 18:00 UTC, Rui Matos
committed Details | Review
common: Keep language chooser labels centered (2.96 KB, patch)
2013-03-15 18:02 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2013-03-10 03:17:07 UTC
Fallout from the "keeping things centered" patches.
Comment 1 Rui Matos 2013-03-10 03:17:10 UTC
Created attachment 238496 [details] [review]
common: Fix language chooser check marks being cleared
Comment 2 Rui Matos 2013-03-10 03:17:15 UTC
Created attachment 238497 [details] [review]
region: Fix format chooser check marks being cleared
Comment 3 Matthias Clasen 2013-03-11 03:28:30 UTC
Review of attachment 238496 [details] [review]:

This code was a clever trick that I learned while working on this code: By clearing the image and setting its size, we can get the checkmark to disappear, but still reserve space for it, which keeps things from jumping around as we check and uncheck them. Now, with the centering, we probably need the opposite: make the checkmark appear without taking up any extra space that would disturb the centering.
Comment 4 Bastien Nocera 2013-03-11 09:36:13 UTC
Review of attachment 238496 [details] [review]:

I'd rather the code didn't rely on clever tricks to be fair...
Comment 5 Bastien Nocera 2013-03-12 17:00:31 UTC
Review of attachment 238496 [details] [review]:

The patch itself is correct though.
Comment 6 Bastien Nocera 2013-03-12 17:01:44 UTC
Review of attachment 238497 [details] [review]:

Fine.
Comment 7 Bastien Nocera 2013-03-12 17:02:28 UTC
You'll need to check that this doesn't break the centering of the labels though.
Comment 8 Rui Matos 2013-03-15 15:04:35 UTC
(In reply to comment #7)
> You'll need to check that this doesn't break the centering of the labels
> though.

It doesn't break the centering but it has the problem Matthias outlined above: it makes things jump sideways as you select them.
Comment 9 Rui Matos 2013-03-15 18:00:18 UTC
Created attachment 239000 [details] [review]
region: Keep format chooser labels centered

In order to prevent the labels from moving around when hiding and
showing the check mark we need to keep the check mark always visible
and instead tweak its opacity.

We also add an always transparent widget the same size as the check
mark on the other side of the label to make sure that the label is
globally centered.
Comment 10 Rui Matos 2013-03-15 18:02:09 UTC
Created attachment 239001 [details] [review]
common: Keep language chooser labels centered

--

Took me a while to figure out a way to keep the labels
centered. Finally came up with these dummy transparent check marks
which isn't very elegant but works.
Comment 11 Rui Matos 2013-03-18 12:11:48 UTC
Attachment 238496 [details] pushed as 81e70ef - common: Fix language chooser check marks being cleared
Attachment 238497 [details] pushed as 077dcf4 - region: Fix format chooser check marks being cleared
Attachment 239000 [details] pushed as 1748a89 - region: Keep format chooser labels centered
Attachment 239001 [details] pushed as fbc9e05 - common: Keep language chooser labels centered