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
=== modified file 'os/os-scrollbar.c'
--- os/os-scrollbar.c 2011-06-08 15:31:21 +0000
+++ os/os-scrollbar.c 2011-06-09 15:47:38 +0000
@@ -36,6 +36,9 @@
36/* Default thumb allocation shift in pixels. */36/* Default thumb allocation shift in pixels. */
37#define THUMB_ALLOCATION_SHIFT -337#define THUMB_ALLOCATION_SHIFT -3
3838
39/* Minimum size to show the thumb in pixels. */
40#define MIN_SIZE_THUMB_SHOW 70
41
39/* Width of the proximity effect in pixels. */42/* Width of the proximity effect in pixels. */
40#define PROXIMITY_WIDTH 3043#define PROXIMITY_WIDTH 30
4144
@@ -471,6 +474,21 @@
471 swap_thumb (scrollbar, os_thumb_new (priv->orientation));474 swap_thumb (scrollbar, os_thumb_new (priv->orientation));
472}475}
473476
477/* show the thumb if it's the case */
478static void
479show_thumb (OsScrollbar *scrollbar)
480{
481 OsScrollbarPrivate *priv;
482
483 priv = scrollbar->priv;
484
485 if ((priv->orientation == GTK_ORIENTATION_VERTICAL &&
486 priv->trough.height >= MIN_SIZE_THUMB_SHOW) ||
487 (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
488 priv->trough.width >= MIN_SIZE_THUMB_SHOW))
489 gtk_widget_show (GTK_WIDGET (priv->thumb));
490}
491
474/* swap adjustment pointer */492/* swap adjustment pointer */
475static void493static void
476swap_adjustment (OsScrollbar *scrollbar,494swap_adjustment (OsScrollbar *scrollbar,
@@ -1525,7 +1543,7 @@
1525 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);1543 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
1526 }1544 }
15271545
1528 gtk_widget_show (GTK_WIDGET (priv->thumb));1546 show_thumb (scrollbar);
1529 }1547 }
1530 }1548 }
1531 else1549 else
@@ -1558,7 +1576,7 @@
1558 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);1576 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
1559 }1577 }
15601578
1561 gtk_widget_show (GTK_WIDGET (priv->thumb));1579 show_thumb (scrollbar);
1562 }1580 }
1563 }1581 }
1564 }1582 }
@@ -1650,7 +1668,7 @@
16501668
1651 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);1669 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
1652 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);1670 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
1653 gtk_widget_show (GTK_WIDGET (priv->thumb));1671 show_thumb (scrollbar);
1654 }1672 }
1655 else1673 else
1656 {1674 {
@@ -1691,7 +1709,7 @@
16911709
1692 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);1710 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
1693 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);1711 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
1694 gtk_widget_show (GTK_WIDGET (priv->thumb));1712 show_thumb (scrollbar);
1695 }1713 }
1696 else1714 else
1697 {1715 {
@@ -1769,7 +1787,7 @@
1769 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);1787 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
1770 }1788 }
17711789
1772 gtk_widget_show (GTK_WIDGET (priv->thumb));1790 show_thumb (scrollbar);
1773 }1791 }
1774 }1792 }
1775 else1793 else
@@ -1802,7 +1820,7 @@
1802 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);1820 move_thumb (scrollbar, priv->win_x, priv->win_y + priv->slider.y);
1803 }1821 }
18041822
1805 gtk_widget_show (GTK_WIDGET (priv->thumb));1823 show_thumb (scrollbar);
1806 }1824 }
1807 }1825 }
1808 }1826 }
@@ -1890,7 +1908,7 @@
18901908
1891 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);1909 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
1892 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);1910 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
1893 gtk_widget_show (GTK_WIDGET (priv->thumb));1911 show_thumb (scrollbar);
1894 }1912 }
1895 else1913 else
1896 {1914 {
@@ -1931,7 +1949,7 @@
19311949
1932 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);1950 os_pager_set_detached (OS_PAGER (priv->pager), FALSE);
1933 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);1951 os_thumb_set_detached (OS_THUMB (priv->thumb), FALSE);
1934 gtk_widget_show (GTK_WIDGET (priv->thumb));1952 show_thumb (scrollbar);
1935 }1953 }
1936 else1954 else
1937 {1955 {

Subscribers

People subscribed via source and target branches