problem with new scrollbar in Human theme - GtkRange::trough-border set to 2

Bug #422511 reported by Nikola Kovacs
108
This bug affects 16 people
Affects Status Importance Assigned to Milestone
GTK+
Expired
Medium
Mozilla Firefox
New
Unknown
elementary Stylesheet
Won't Fix
Undecided
Unassigned
human-theme
New
Undecided
Unassigned
gtk+2.0 (Ubuntu)
Triaged
Low
Unassigned
human-theme (Ubuntu)
Confirmed
Low
Unassigned
seamonkey (Ubuntu)
New
Undecided
Unassigned

Bug Description

The new scrollbar in Karmic's Human theme has a usability bug:
To reproduce, open nautilus, maximize the window, then open a directory with enough files to cause the scrollbar to appear (e.g. /lib). Now move your mouse to the right edge of the screen, and left click. Instead of grabbing the scroll bar, the mouse will behave as if you had clicked the scrollbar background, i.e. the bar will jump to that position (in Firefox, nothing happens). The problem is that the bar doesn't extend to the right edge, leaving a two pixel margin, but because of Fitts' law, it's much easier to click on the screen edge than the few pixels to the left of it.

The cause of this is GtkRange::trough-border being set to 2. Setting it to 0 removes the margin around the bar.

Tags: usability
Oren_B (oren.barnea)
Changed in human-theme (Ubuntu):
status: New → Confirmed
Nikola Kovacs (nx)
description: updated
summary: - problem with new scrollbar in Human theme
+ problem with new scrollbar in Human theme - GtkRange::trough-border set
+ to 2
Revision history for this message
James Schriver (dashua) wrote :

That is bug in the murrine engine and the trough-border was increased to elimate a bug in Firefox. I myself, personally, never use the murrine engine for theming my scrollbars, as you are very limited. The only detrimental effect is the loss of system-wide color theming to the scrollbars. Pixmap scrollbars scroll faster and smoother contrary to popular belief that the pixbuf-engine is slow.

The was referenced in an earlier bug report.

https://launchpad.net/bugs/327863

Also you check this thread:

http://ubuntuforums.org/showthread.php?t=1168984&highlight=humanity+theme

tags: added: usability
Revision history for this message
Andrea Cimitan (cimi) wrote :

this is not a bug in the murrine engine, and please dashua don't write false things, like murrine's rendering of scrollbars is slower than the pixbuf engine. Totally untrue.

Revision history for this message
Nikola Kovacs (nx) wrote :

From what I could understand of the murrine source code and the gtk source code, this is a gtk bug. Gtk asks the theme to draw a 14px wide scrollbar thumb and a 16px wide trough. The thumb should extend its click area along the entire width of the trough.
Would it be possible for the murrine engine to draw a 16px wide thumb with 1 px on either side transparent? That way you'd get the same visual effect without the compatibility and usability problems.

Revision history for this message
Nikola Kovacs (nx) wrote :

This patch fixes the problem in gtk apps. It does not fix the bug in Firefox however.

Revision history for this message
Nikola Kovacs (nx) wrote :

Previous patch had some weird tabulation issues, sorry.

Kenneth Wimer (kwwii)
Changed in libgtk:
assignee: nobody → Ubuntu Sponsors for main (ubuntu-main-sponsors)
Revision history for this message
Alexander Sack (asac) wrote :

Cody, could you check the patch attached and let me know?

Changed in gtk+2.0 (Ubuntu):
assignee: nobody → Cody Russell (bratsche)
assignee: Cody Russell (bratsche) → Alexander Sack (asac)
status: New → In Progress
importance: Undecided → Medium
Changed in libgtk:
assignee: Ubuntu Sponsors for main (ubuntu-main-sponsors) → nobody
Revision history for this message
Conn O Griofa (psyke83) wrote :

Alexander,

I've tested the patch, and can confirm it's fixed in all applications *except* Firefox. Let me explain.

All applications *except Firefox*, using theme with trough border set to 2 (Human theme):

a) Behaviour without patch:
1. Click right edge of screen above or below scrollbar - moves the page up/down (expected behaviour).
2. Click right edge of screen beside scrollbar - moves the page up/down (not expected behaviour)

b) a) Behaviour with patch:
1. Click right edge of screen above or below scrollbar will move the page up/down (expected behaviour).
2. Click right edge of screen beside scrollbar - grab the scrollbar (expected behaviour).

In the case of Firefox, edge-clicking above/below or on the scrollbar (all cases above) does not register at all, with or without the proposed patch.

Should I file a new bug or assign to Firefox in this bug?

Note: I am also testing the fix for bug #327863 (tangentially related, trough causing artifacts on text boxes on webpages in Firefox), and it does not help or hinder this issue.

Revision history for this message
In , Eric Appleman (erappleman) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090929 Ubuntu/9.10 (karmic) Firefox/3.5.4pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090929 Ubuntu/9.10 (karmic) Firefox/3.5.4pre

See the following for more information.

https://bugs.launchpad.net/ubuntu/+source/human-theme/+bug/422511
http://bugzilla.mozilla.org/show_bug.cgi?id=486065

Reproducible: Always

Revision history for this message
In , Eric Appleman (erappleman) wrote :
Micah Gersten (micahg)
Changed in firefox:
importance: Undecided → Unknown
status: New → Unknown
Changed in firefox:
status: Unknown → New
Revision history for this message
Nikola Kovacs (nx) wrote :

I think this is a nicer solution than my previous patch. I removed trough-border from calculations for the slider rectangle (which is used for mouse detection) and instead add/subtract the correct values when drawing the slider.

For Firefox, I wanted to do something similar, modifying moz_gtk_scrollbar_thumb_paint() to draw a smaller slider, but otherwise using 0 for trough_border. I'm having problems implementing the latter, because even if I explicitly set metrics->trough_border to 0 in moz_gtk_get_scrollbar_metrics(), I can't see any difference.

Revision history for this message
Nikola Kovacs (nx) wrote :

I decided to try out my idea from comment #3. This is patch uses a hardcoded value of 2, but that can easily be made configurable, as a murrine specific option. With GtkRange::slider-width set to 18, it gives the same effect for the scrollbars, with none of the bugs.
Yes, it's a hack, but it works, and it's better than using a pixmap engine just for the scrollbars (like Dust does).

Revision history for this message
®om (rom1v) wrote :

Same problem here, I have the bug in firefox maximized while it works fine with "Human clearlooks".

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

This issue is reproducible using a fully updated Karmic.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 422511] Re: problem with new scrollbar in Human theme - GtkRange::trough-border set to 2

On Mon, Oct 19, 2009 at 10:23:50PM -0000, Ricardo Pérez López wrote:
> This issue is reproducible using a fully updated Karmic.

yes, we are waiting for upstream to apply and then let it sink in through a stable
release update.

 - Alexander

Revision history for this message
Nikola Kovacs (nx) wrote :

This patch is a follow up on my previous murrine patch. It implements an engine parameter instead of the hardcoded value.

Package is here:
https://launchpad.net/~nx/+archive/ppa

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Alexander, when you say "upstream", are you talking about GTK+ or Mozilla? I ask this question because the bug is reproducible using any GTK application, not only Firefox.

Thanks in advance.

Revision history for this message
Conn O Griofa (psyke83) wrote :

Ricardo,

Firefox does exhibit a slightly different problem to other applications.

If you click on the right-most point of the screen in the scrollbar area, while a maximized application is open and scrollbar present, the following occurs:

Firefox: no clicks register at all (very bad).
Other applications (e.g., Nautilus): the page will scroll (good), but if the cursor is positioned on the scrollbar, it is impossible to grab the scrollbar (bad).

Revision history for this message
Alexey Kotlyarov (koterpillar) wrote :

Nikola Kovacs's patch fixes everything in both Firefox and other applications.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I confirm too that it's fixed for me after installing gtk2-engines-murrine 0.90.3-1ubuntu2~ppa4 and human-theme 0.37-ubuntu1~ppa1 from Nikola Kovac's PPA (https://launchpad.net/~nx/+archive/ppa). Great job!

Revision history for this message
Alexey Kotlyarov (koterpillar) wrote :

Hi, I've installed human-theme from Nikola Kovac's PPA, and now Skype and Eclipse are both un-(=ugly-)themed. When running, e.g. Skype in command line, I get:
/usr/share/themes/Human/gtk-2.0/gtkrc:105: error: unexpected identifier `trough_border', expected character `}'
Same output seen from Eclipse.

Revision history for this message
Nikola Kovacs (nx) wrote :

Restart your computer.

Revision history for this message
Alexey Kotlyarov (koterpillar) wrote :

> Restart your computer.
This does not help. Actually, the problem is there for some days, it's
just now I saw the error message.

Revision history for this message
Kenneth Wimer (kwwii) wrote :

You have installed something from a PPA. It is not the version which was included in the release and therefor inappropriate for this bug. In any case, your problem is a separate bug and not part of this

Revision history for this message
Nikola Kovacs (nx) wrote :

Eclipse works for me, but Skype is indeed broken. Qtconfig works perfectly, so I have no idea why...

Revision history for this message
Nikola Kovacs (nx) wrote :

It's because skype is 32 bit, and the 32 bit murrine engine is in ia32libs and hasn't been updated to support trough-border. I'll upload an ia32libs package to my PPA

Revision history for this message
Alexey Kotlyarov (koterpillar) wrote :

> You have installed something from a PPA. It is not the version which was
> included in the release and therefor inappropriate for this bug. In any
> case, your problem is a separate bug and not part of this
I know, but I am testing the proposed solution for this bug, so I feel
it appropriate to point out a problem with it.

> It's because skype is 32 bit, and the 32 bit murrine engine is in
> ia32libs and hasn't been updated to support trough-border. I'll upload
> an ia32libs package to my PPA
My bad, I forgot to mention that my Eclipse is 32-bit too.

Revision history for this message
In , Shovas (shovas) wrote :

*** Bug 525224 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Shovas (shovas) wrote :

Please see my comments in bug 525224.

I'll quote the important usability comment:

"There's a reason the Back button doesn't have an unclickable area to the left.
It allows you to hammer your mouse over to the left of the screen and be sure
you're hitting the Back button.

The same usability principles apply everywhere. If you take a look at various
themes (charamel, [silvermel]) you'll notice the vertical scroll bar does not has an unclickable/unscrollable border to it. You can hammer your mouse over to the right and be sure you're able to scroll. Who would want to target their mouse to a specific ~20px region?"

(linux, x86_64, firefox 3.5.4, stock theme)

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 422511] Re: problem with new scrollbar in Human theme - GtkRange::trough-border set to 2

On Thu, Oct 29, 2009 at 04:13:54PM -0000, Nikola Kovacs wrote:
> It's because skype is 32 bit, and the 32 bit murrine engine is in
> ia32libs and hasn't been updated to support trough-border. I'll upload
> an ia32libs package to my PPA

afaik, there was a final ia32libs update close to release ... that should
have that trough-border feature, no? can you check?

 - Alexander

Revision history for this message
Nikola Kovacs (nx) wrote :

Sorry my wording might've been confusing.
My patch is not in the ubuntu murrine package, so it's not in ia32libs either. My PPA didn't have ia32libs so 32bit apps on 64bit systems had an unpatched murrine.

Revision history for this message
Alexey Kotlyarov (koterpillar) wrote :

New ia32libs fixed everything for both 32-bit programs I am using.

Revision history for this message
fubarbundy (launchpad-mailtic) wrote :

Why has Nikola's fix not been committed?

Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug is a bit confusing there, could somebody summarize what changes are needed in lucid and if those have been sent to the corresponding upstreams for review or not?

Revision history for this message
Sebastien Bacher (seb128) wrote :

should the sponsor stay subscribed there, not sure if the changes are for testing purpose or waiting for sponsoring to the Ubuntu too

Revision history for this message
Nikola Kovacs (nx) wrote :

The way gtk is handling trough-border is technically correct, but it is incorrect from a usability viewpoint. One way to fix it is to change gtk's handling of trough-border. I did that, but Firefox needs to be fixed separately because it does its own UI drawing and handling.
The other way is to fake the effect, and set the gtk trough-border to 0. Some themes do this by using the pixbuf engine for the scrollbars (e.g. Dust). I patched murrine to simply draw a thinner scrollbar handle (configurable using a murrine engine parameter) to get the same effect. All the while gtk thinks the trough-border is set to 0, so it avoids all the problems (and it doesn't affect sliders). This fix is a bit of a hack, but I've been using it and didn't have any problems.
This is the murrine patch: http://launchpadlibrarian.net/34046350/murrine_trough_border_proper.patch.
I've also attached the changes to gtkrc that are needed to get the same effect with the murrine patch.
IMHO the murrine patch is better than reworking the way gtk handles trough border.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the detailed comment. Could you open an upstream bug on gtk if you think that one should be changed? Or open an upstream bug about murrine with your changes for review there?

Changed in gtk+2.0 (Ubuntu):
importance: Medium → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

lowering the gtk setting meanwhile it's not really a medium bug but rather a cosmetic one

Revision history for this message
In , Kevin Brosnan (kbrosnan) wrote :

*** Bug 540092 has been marked as a duplicate of this bug. ***

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

Still not done.
bug https://bugs.launchpad.net/ubuntu/+source/firefox-3.5/+bug/530034 marked as dublicate and still exists.

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

This also affects Abiword Slider.

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

NEW interesting update..
Liferea has different problem with slider. On far Right side it responds wrong but at least responds.
When clicked and selected far right side its acting as clicked in slider empty space.
Heres video http://videobin.org/+y4/13s.html maybe dl video if cant see where the mouse pointer is.

This bug is about no activity in far right slider side but heres bug report about strange slider activity in Liferea
https://bugs.launchpad.net/ubuntu/+source/liferea/+bug/533429

Revision history for this message
Iakov Davydov (iakov-davydov) wrote :

This isn't fixed in Lucid Lynx.

Vish (vish)
Changed in human-theme (Ubuntu):
importance: Undecided → Low
Changed in gtk:
status: Unknown → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

could somebody open a murrine bug on bugzilla.gnome.org with the suggested change?

Changed in gtk:
importance: Unknown → Medium
Changed in firefox:
importance: Unknown → Medium
Revision history for this message
In , David (david.regev) wrote :

Are there any CSS workarounds for this? None of my attempts so far have yielded a viable solution.

Martin Pitt (pitti)
Changed in gtk+2.0 (Ubuntu):
assignee: Alexander Sack (asac) → nobody
status: In Progress → Fix Committed
status: Fix Committed → Triaged
Changed in egtk:
status: New → Won't Fix
Changed in gtk:
status: New → Expired
Changed in firefox:
status: New → Unknown
Changed in firefox:
status: Unknown → New
Revision history for this message
In , Bug-husbandry-bot (bug-husbandry-bot) wrote :
Changed in firefox:
importance: Medium → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.