Nico Weber
bf0b5c3c5a
LibGUI: Extract ScrollBar::component_at_position() method
...
...and use it in mousedown_event(), which allows putting in
stricter asserts.
2020-08-25 18:09:56 +02:00
Nico Weber
ecf6cbbd02
LibGUI: Make AutomaticScrollingKind a paramter on set_automatic_scrolling_active
...
Most callers of set_automatic_scrolling_active() also change
m_automatic_scrolling_kind, and it makes it possible to make timer
behavior dependent on the autoscroll kind later.
2020-08-25 16:21:26 +02:00
Nico Weber
129816e056
LibGUI: In ScrollBar, rename AutomaticScrollingDirection to AutomaticScrollingKind
...
Also rename Decrement to DecrementButton and Increment to
IncrementButton.
2020-08-25 16:21:26 +02:00
Nico Weber
c34956839e
LibGUI: Make ScrollBar shift-click use same code path as scrubber click
...
It's slightly less code, and m_scrubber_in_use is now set correctly
when shift-clicking, keeping the mouse button down, and then
dragging the throbber.
The shift-click brings the scrubber under the cursor, and then
the scrubber_rect().contains() condition is true and both scrubber
drags and shift-click-drags are handled the same naturally.
2020-08-25 16:21:26 +02:00
Nico Weber
cdf1282419
ScrollBar: Let clicking the gutter scroll by one page
...
Shift-clicking has the old behavior of jumping to the click position.
This matches scrollbar behavior in macOS and Windows, and in many Linux apps.
2020-08-12 11:02:30 +02:00
Nico Weber
326261094d
ScrollBar: Simplify ScrollBar::scroll_to_position()
2020-08-12 11:02:30 +02:00
Nico Weber
8eee5312c5
GUI: Rename ScrollBar::scrubber_size() to ScrollBar::visibile_scrubber_size()
2020-08-12 11:02:30 +02:00
Nico Weber
eab7712ab0
GUI: Extract a ScrollBar::scroll_to_position method
2020-08-12 11:02:30 +02:00
Tom
fc568ea13a
LibGUI: Make scrollbar thumb size relative to content size
...
In order to calculate a thumb size that is a representation
of the visible portion (page) of the content, that information
needs to be taken into account.
2020-07-09 21:56:45 +02:00
Andreas Kling
116cf92156
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
...
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling
9e74793ce2
LibGUI+LibGfx: Paint scollbar tracks with a dithered pattern
...
Instead of a solid color, we now paint the track/gutter of scrollbars
using a 2-color dither pattern for a pleasant millennium feel. :^)
2020-05-10 01:02:06 +02:00
Andreas Kling
933cf365e8
LibGUI: Tweak default ScrollBar size to make arrow icons centered :^)
2020-04-23 20:01:55 +02:00
Andreas Kling
8260cbf7bd
LibGUI: Tweak colorization of ScrollBar gutter
2020-04-23 17:54:59 +02:00
Andreas Kling
c5d913970a
LibGUI: Remove parent parameter to GUI::Widget constructor
2020-02-23 12:27:53 +01:00
Andreas Kling
45c25ffecd
LibGUI: Use Core::Object::add() a whole bunch
2020-02-23 11:10:52 +01:00
Andreas Kling
2143da6434
LibGUI: Add forwarding header
...
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
2020-02-16 09:41:56 +01:00
Tibor Nagy
9041e95e79
LibGUI: Render ScrollBar buttons as pressed when they are being pressed
2020-02-16 09:41:40 +01:00
Andreas Kling
3bbf4610d2
AK: Add a forward declaration header
...
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.
Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
2020-02-14 23:31:18 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00