Merge lp:~cimi/overlay-scrollbar/fix-771450 into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Andrea Cimitan
Proposed branch: lp:~cimi/overlay-scrollbar/fix-771450
Merge into: lp:overlay-scrollbar
Diff against target: 107 lines (+26/-8)
1 file modified
os/os-scrollbar.c (+26/-8)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/fix-771450
Reviewer Review Type Date Requested Status
Ted Gould (community) Needs Information
Review via email: mp+64040@code.launchpad.net

Description of the change

Following design specifications, don't show the thumb if size is <= 69 pixels

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

It's part of the design, but I'm a little worried about it. For instance, even if there was a very small window (bad design, but it could happen) there'd be no way to scroll in it.

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote :

there's no way also now... because the thumb is bigger, so you can't scroll by moving it (it's clamped within the dimensions)

Revision history for this message
Ted Gould (ted) wrote :

But you could click on it. If it's not shown, you can't click on it. Thus there's no way to move in the window without a scrollwheel or two finger scrolling.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

I think the thumb should be shown, too, and draggable. It would go outside the window, but I don't think that's a problem.

Revision history for this message
Christian Giordano (nuthinking) wrote :

Hi Mark, I don't think this is a particularly elegant solution. What has been implemented here comes also after a competitor analysis to understand if the problem really exists, since we don't have much data on our own. I would probably wait to get more data before proceeding with implementing a less elegant solution.

Revision history for this message
Ted Gould (ted) wrote :

The problem Christian is that we can create a situation where it would be impossible to scroll the window. While I could see that you believe that it is a result poorly design application, it comes do to ensuring that it is possible.

I don't think that what Mark has proposed is less elegant. I think that restricting the thumbs to the vertical area of the window was perhaps a premature optimization of the design. I think that we could end up with an overall more usable design if we started to "think outside the box" there :-)

Revision history for this message
Christian Giordano (nuthinking) wrote :

@ted, sure it's good to think outside the box ;) And surely the new design allows some flexibility here (thumb not limited by the scrollable panel size, when external). While elegance opinion is subjective, it remains to define:

1) what happens when the thumb is not external?
2) shouldn't we promote good UX placing some limits? Scrolling content in a tiny area is likely to be a very unpleasant (far from usable) experience. Maybe we can take into consideration how much scroll is available, and show the thumb only when it is manageable (small difference from visible area and all scrollable area)?

Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2011-06-10 at 15:29 +0000, Christian Giordano wrote:
> 1) what happens when the thumb is not external?

Then it will overlap content above and below. I don't see an issue
there that is worse than the thumb being not external in the first
place. If it's not external it's going to obscure content, it's just a
matter of what content.

> 2) shouldn't we promote good UX placing some limits? Scrolling
> content in a tiny area is likely to be a very unpleasant (far
> from usable) experience. Maybe we can take into consideration
> how much scroll is available, and show the thumb only when it
> is manageable (small difference from visible area and all
> scrollable area)?

I think we should, but we can't get to the point where it's *impossible*
to have it work in those situations. We can't make the data
unavailable. We can make it look ugly, not ideal, and generally
discourage people from doing it. But, making it so that the data is
unavailable breaks the program, perhaps in a significant way.

In my experience many of the times this happens isn't because of the
primary design of the application. Usually one or two entries is
enough. But someone makes a plugin or extension that adds a bunch of
entries, and that creates the issue.

Unmerged revisions

247. By Andrea Cimitan

Don't show the thumb if it's between 0 and 69

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2011-06-08 15:31:21 +0000
3+++ os/os-scrollbar.c 2011-06-09 15:47:38 +0000
4@@ -36,6 +36,9 @@
5 /* Default thumb allocation shift in pixels. */
6 #define THUMB_ALLOCATION_SHIFT -3
7
8+/* Minimum size to show the thumb in pixels. */
9+#define MIN_SIZE_THUMB_SHOW 70
10+
11 /* Width of the proximity effect in pixels. */
12 #define PROXIMITY_WIDTH 30
13
14@@ -471,6 +474,21 @@
15 swap_thumb (scrollbar, os_thumb_new (priv->orientation));
16 }
17
18+/* show the thumb if it's the case */
19+static void
20+show_thumb (OsScrollbar *scrollbar)
21+{
22+ OsScrollbarPrivate *priv;
23+
24+ priv = scrollbar->priv;
25+
26+ if ((priv->orientation == GTK_ORIENTATION_VERTICAL &&
27+ priv->trough.height >= MIN_SIZE_THUMB_SHOW) ||
28+ (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
29+ priv->trough.width >= MIN_SIZE_THUMB_SHOW))
30+ gtk_widget_show (GTK_WIDGET (priv->thumb));
31+}
32+
33 /* swap adjustment pointer */
34 static void
35 swap_adjustment (OsScrollbar *scrollbar,
36@@ -1525,7 +1543,7 @@
37 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
38 }
39
40- gtk_widget_show (GTK_WIDGET (priv->thumb));
41+ show_thumb (scrollbar);
42 }
43 }
44 else
45@@ -1558,7 +1576,7 @@
46 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
47 }
48
49- gtk_widget_show (GTK_WIDGET (priv->thumb));
50+ show_thumb (scrollbar);
51 }
52 }
53 }
54@@ -1650,7 +1668,7 @@
55
56 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
57 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
58- gtk_widget_show (GTK_WIDGET (priv->thumb));
59+ show_thumb (scrollbar);
60 }
61 else
62 {
63@@ -1691,7 +1709,7 @@
64
65 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
66 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
67- gtk_widget_show (GTK_WIDGET (priv->thumb));
68+ show_thumb (scrollbar);
69 }
70 else
71 {
72@@ -1769,7 +1787,7 @@
73 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
74 }
75
76- gtk_widget_show (GTK_WIDGET (priv->thumb));
77+ show_thumb (scrollbar);
78 }
79 }
80 else
81@@ -1802,7 +1820,7 @@
82 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
83 }
84
85- gtk_widget_show (GTK_WIDGET (priv->thumb));
86+ show_thumb (scrollbar);
87 }
88 }
89 }
90@@ -1890,7 +1908,7 @@
91
92 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
93 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
94- gtk_widget_show (GTK_WIDGET (priv->thumb));
95+ show_thumb (scrollbar);
96 }
97 else
98 {
99@@ -1931,7 +1949,7 @@
100
101 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
102 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
103- gtk_widget_show (GTK_WIDGET (priv->thumb));
104+ show_thumb (scrollbar);
105 }
106 else
107 {

Subscribers

People subscribed via source and target branches