Andreas Kling
7ad8790d80
LibGUI: Run clang-format on everything.
2019-06-07 11:46:02 +02:00
Andreas Kling
dab9901235
WindowServer+LibGUI: Handle mouse wheel deltas in the mouse event stream.
...
The wheel events will end up in GWidget::mousewheel_event(GMouseEvent&)
on the client-side. This patch also implements basic wheel scrolling in
GScrollableWidget via this mechanism. :^)
2019-05-13 19:52:57 +02:00
Andreas Kling
3543236e8f
GScrollableWidget: The visible_content_rect() should be max content_size().
...
When computing the visible content rect, constrain the result to the content
size. The content shouldn't feel responsible for painting anything outside.
2019-04-25 00:05:48 +02:00
Andreas Kling
9cab7a0707
LibGUI: Move the editing widget along with the content when scrolling.
2019-04-18 23:57:07 +02:00
Andreas Kling
6d9fa1026b
LibGUI: Fix bad initial layout of GScrollableWidget's scrollbars.
...
If it's the first time we're laying these out, we can't rely on the width()
or height() to be set, so instead use preferred_size().
2019-03-30 20:42:41 +01:00
Andreas Kling
4454392929
GScrollableWidget: Make sure the corner widget is positioned correctly.
2019-03-29 03:02:31 +01:00
Andreas Kling
1fc03a7644
LibGUI: Make GScrollableWidget a GFrame and fix up GTextEditor for it.
2019-03-28 16:14:26 +01:00
Andreas Kling
4d3478aa71
GItemView: Hide the horizontal scrollbar since we never need it.
...
This view always relayouts the content to fit the available width, so we
don't need a horizontal scrollbar. :^)
2019-03-25 13:58:47 +01:00
Andreas Kling
19fa70c821
LibGUI: Add a GItemView class.
...
This is a GAbstractView subclass that implements a icon-based view onto
a GModel. It still need a bunch of work, but it's in basic usable shape.
2019-03-23 03:54:45 +01:00
Andreas Kling
9551e2e4b5
LibGUI: Add GScrollableWidget::scroll_to_bottom/top().
2019-03-19 03:09:21 +01:00
Andreas Kling
ec8bffb06d
LibGUI: Let GTextEditor deal with its horizontal padding internally.
...
I originally wanted to have the padding concept in GScrollableWidget
but it's really finicky with the ruler and everything.
2019-03-16 23:16:37 +01:00
Andreas Kling
3854e752cb
LibGUI: Make GTextEditor inherit from GScrollableWidget.
...
This is quite nice, now we can share a ton of logic. :^)
2019-03-16 16:54:51 +01:00
Andreas Kling
6fbabac460
LibGUI: Factor out scrolling logic from GTableView into a GScrollableWidget.
...
This then becomes the base class for GTableView. I'd like to share as much
code as possible with GTextEditor and any other scrollable widgets.
2019-03-16 16:03:31 +01:00