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 768529 - Mouse & Touchpad panel doesn't fit low resolution screens
Mouse & Touchpad panel doesn't fit low resolution screens
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Mouse
3.20.x
Other Linux
: Normal major
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-07 18:15 UTC by Georges Basile Stavracas Neto
Modified: 2016-10-24 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mouse: adapt to small screens (1.54 KB, patch)
2016-07-07 18:16 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: set max-content-width on scrolledwindows (1.75 KB, patch)
2016-07-08 03:57 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: center horizontally using halign property (1.25 KB, patch)
2016-07-08 03:57 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: remove arbitrary height request (1.02 KB, patch)
2016-07-08 03:57 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: set max-content-height on scrolledwindows (1.75 KB, patch)
2016-07-08 15:24 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: center horizontally using halign property (1.74 KB, patch)
2016-07-08 15:25 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: remove arbitrary height request (1.02 KB, patch)
2016-07-08 15:25 UTC, Georges Basile Stavracas Neto
none Details | Review
mouse: set max-content-height on scrolledwindows (1.92 KB, patch)
2016-07-08 15:39 UTC, Georges Basile Stavracas Neto
committed Details | Review
mouse: center horizontally using halign property (1.74 KB, patch)
2016-07-08 15:39 UTC, Georges Basile Stavracas Neto
committed Details | Review
mouse: remove arbitrary height request (1.03 KB, patch)
2016-07-08 15:39 UTC, Georges Basile Stavracas Neto
committed Details | Review
screenshow of the new mouse/touchpad panel size (25.38 KB, image/png)
2016-10-24 00:51 UTC, Peter Hutterer
  Details

Description Georges Basile Stavracas Neto 2016-07-07 18:15:36 UTC
As the title says, I can't use this panel in a 720x480 screen. See following patch.
Comment 1 Georges Basile Stavracas Neto 2016-07-07 18:16:39 UTC
Created attachment 331013 [details] [review]
mouse: adapt to small screens

mouse: adapt to small screens

When running on a low resolution screen, the
hardcoded margins seem to be too much and
ends up making the window too big.

Fix that my setting the halign property rather
than margins, and reducing the height request.
Comment 2 Bastien Nocera 2016-07-07 21:24:49 UTC
Before and after screenshots would be useful. And please don't assign yourself to bugs, thanks.
Comment 3 Georges Basile Stavracas Neto 2016-07-07 21:33:34 UTC
There aren't any UI changes, except that the panel is 20px shorter on height.

Sorry about the self-assignment, I didn't notice that when attaching the patch.
Comment 4 Bastien Nocera 2016-07-07 23:15:55 UTC
Review of attachment 331013 [details] [review]:

> When running on a low resolution screen, the
> hardcoded margins seem to be too much and
> ends up making the window too big.
>  
> Fix that my setting the halign property rather
> than margins, and reducing the height request.

Can you split up the 2 changes as well?

::: panels/mouse/gnome-mouse-properties.ui
@@ +22,3 @@
     <property name="shadow_type">none</property>
     <property name="hscrollbar_policy">never</property>
+    <property name="height_request">440</property>

Wouldn't it be easier not to have a height request? It would/should keep the size it has in the main window.
Comment 5 Georges Basile Stavracas Neto 2016-07-08 03:57:29 UTC
Created attachment 331050 [details] [review]
mouse: set max-content-width on scrolledwindows

Instead of using only hardcoded height requests, it's better
if we give more flexibility for the content to grow up to
a certain ammount of pixeld.
Comment 6 Georges Basile Stavracas Neto 2016-07-08 03:57:40 UTC
Created attachment 331051 [details] [review]
mouse: center horizontally using halign property

Instead of relying on hardcoded margins to place the content
in the middle of the panel, it's better and more reliable to
use the horizontal alignment property of GtkWidget.
Comment 7 Georges Basile Stavracas Neto 2016-07-08 03:57:49 UTC
Created attachment 331052 [details] [review]
mouse: remove arbitrary height request

The test frame widget size is better handled by the
scrolled window's max-content-width property introduced
earlier than an arbitrary height request.
Comment 8 Bastien Nocera 2016-07-08 14:43:01 UTC
Review of attachment 331050 [details] [review]:

> a certain ammount of pixeld.

"amount" and "pixels"
Comment 9 Bastien Nocera 2016-07-08 14:43:27 UTC
Review of attachment 331050 [details] [review]:

Subject: [PATCH] mouse: set max-content-width on scrolledwindows

And you're setting the height, not the width.
Comment 10 Bastien Nocera 2016-07-08 14:44:45 UTC
Review of attachment 331051 [details] [review]:

What's stopping the widget from taking the whole width available without margins?
Would be good to explain in the commit message.
Comment 11 Bastien Nocera 2016-07-08 14:45:30 UTC
Review of attachment 331052 [details] [review]:

Sure.
Comment 12 Georges Basile Stavracas Neto 2016-07-08 15:24:16 UTC
Created attachment 331091 [details] [review]
mouse: set max-content-height on scrolledwindows

(In reply to Bastien Nocera from comment #8)
> Review of attachment 331050 [details] [review] [review]:
>
> "amount" and "pixels"

Done.
Comment 13 Georges Basile Stavracas Neto 2016-07-08 15:25:20 UTC
Created attachment 331092 [details] [review]
mouse: center horizontally using halign property

(In reply to Bastien Nocera from comment #10)
> Review of attachment 331051 [details] [review] [review]:
> 
> What's stopping the widget from taking the whole width available without
> margins?
> Would be good to explain in the commit message.

I rewrote the entire commit message. See below:

The Mouse & Touchpad panel has a horizontally centered
list, which is centered pixel-counting the list width and
hardcoded margins.

This approach has various issues. It resizes the window
needlessly when e.g. the font changes the size, dpi or
family. This is specially visible when dealing with low
resolution screens, where the hardcoded margins are too
much to fit a 720x480 screen with the Large Font accessibility
setting on.

Fix that by removing the margins and setting the horizontal
alignment of the list to center. Since the list itself doesn't
expand to fill the available space, there won't be any user-
visible changes except that the panel is now able to scale
down.
Comment 14 Georges Basile Stavracas Neto 2016-07-08 15:25:41 UTC
Created attachment 331093 [details] [review]
mouse: remove arbitrary height request

No changes, just to keep patch ordering in Bugzilla.
Comment 15 Bastien Nocera 2016-07-08 15:33:25 UTC
Review of attachment 331091 [details] [review]:

Also mention that you're changing the maximum content height for the panel in the commit message.

Looks fine other than that.
Comment 16 Bastien Nocera 2016-07-08 15:34:36 UTC
Review of attachment 331092 [details] [review]:

Great commit message :)
Comment 17 Bastien Nocera 2016-07-08 15:35:23 UTC
Review of attachment 331093 [details] [review]:

Replace "earlier" with the commit ID before pushing please.
Comment 18 Georges Basile Stavracas Neto 2016-07-08 15:39:04 UTC
Created attachment 331095 [details] [review]
mouse: set max-content-height on scrolledwindows

Done.
Comment 19 Georges Basile Stavracas Neto 2016-07-08 15:39:31 UTC
Created attachment 331096 [details] [review]
mouse: center horizontally using halign property

Thanks.
Comment 20 Georges Basile Stavracas Neto 2016-07-08 15:39:55 UTC
Created attachment 331097 [details] [review]
mouse: remove arbitrary height request

Done.
Comment 21 Georges Basile Stavracas Neto 2016-07-08 15:41:30 UTC
Thanks for the reviews.

Attachment 331095 [details] pushed as 62f1f6b - mouse: set max-content-height on scrolledwindows
Attachment 331096 [details] pushed as 6c677bb - mouse: center horizontally using halign property
Attachment 331097 [details] pushed as a58f9dd - mouse: remove arbitrary height request
Comment 22 Peter Hutterer 2016-10-24 00:51:20 UTC
Created attachment 338313 [details]
screenshow of the new mouse/touchpad panel size

(In reply to Georges Basile Stavracas Neto from comment #21)
> Attachment 331097 [details] pushed as a58f9dd - mouse: remove arbitrary
> height request

this one introduced what is IMO an UI regression. On my laptop, the panel now cuts off just below the mouse panel. I spent about an hour trying to debug why the touchpad panel doesn't show up anymore, wondering why the GTK debugger shows it as visible, etc. until I accidentally realised I could scroll down and it's there. There are no scroll bars on the side to hint at that, touch I eventually noticed that the dotted line on the bottom is supposed to signal this.

Either way, the cutoff is at the worst point (see attachment). If parts of the touchpad frame would be visible then the scrolling would be more obvious.

The commit I marked above is part of a series, but just reverting the last one is enough to restore the old size (which obviously goes against this bug, but I'll just handwave around that :)
Comment 23 Bastien Nocera 2016-10-24 08:43:13 UTC
We already have other bugs to look into that.