Make scrollbars in trees behave like native GTK scrollbars

NEW
Unassigned

Status

()

Core
XUL
--
enhancement
12 years ago
7 years ago

People

(Reporter: Adam Guthrie, Unassigned)

Tracking

1.8 Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
I made a patch in bug 303048 that made scrollbars act like native GTK scrollbars; e.g. right click scrolled to the top/bottom of a page and middle click scrolled one page length. Apparently, scrollbars in trees aren't acting like this for some reason.

Comment 1

12 years ago
Do listboxes work? Listboxes and trees have their own nsIScrollbarMediator which handles scrollbar positioning.
(Reporter)

Comment 2

12 years ago
Nope. <listbox>es are broken, too. The scrollbar buttons don't seem to be getting set as unactive when I release from a middle or right click, either. :(

Comment 3

12 years ago
So, what happens here is that neither listboxes or trees set an increment on their scrollbar, so they assume that the increment will only be ±1 and calculate the "real" increment based on the sign of the increment.

Alternatively, you could blame listboxes and trees for using weird units for their scroll positioning when they should use lines instead.
(Reporter)

Updated

11 years ago
Assignee: ispiked → jag

Updated

10 years ago
Assignee: jag → nobody

Comment 4

7 years ago
Created attachment 562871 [details] [diff] [review]
Initial attempt: Convert pixels to lines if needed.

If the magnitude of the delta of the indexes (old and new) is greater than a row's height, then convert the delta into lines.  

Will this approach be useful, or will it add complications I'm not seeing?
You need to log in before you can comment on or make changes to this bug.