summaryrefslogtreecommitdiff
path: root/LibGUI
AgeCommit message (Collapse)Author
2019-04-26LibGUI: Track double-clicking per individual mouse button.Andreas Kling
Clicking two separate buttons in quick succession shouldn't be interpreted as a double click.
2019-04-25GTextEditor: Add very basic automatic indentation.Andreas Kling
This is off by default, but enabled by TextEditor. It simply inserts the same number of leading spaces as the previous line when hitting Enter. :^)
2019-04-25GTableView: Double-click should only activate/edit valid indices.Andreas Kling
2019-04-25GTextEditor: Double-clicking on a word should select that word.Andreas Kling
2019-04-25GTextEditor: Improve cursor positioning accuracy when using a mouse.Andreas Kling
Put the cursor on the left or right side of a glyph when clicking it based on distance to middle of glyphs. This is such an obvious change that makes a small but noticeable difference in feel. :^)
2019-04-25GTextEditor: Go a little past the cursor for Home/End scroll-into-view.Andreas Kling
When jumping to the start of a line, or to the end of a line, scrolling two pixels past the end yields a pleasant effect.
2019-04-25GTextEditor: Always call did_change() before set_cursor().Andreas Kling
This is not very obvious and I need to come up with a better design, but for now just make sure to call did_change() before calling set_cursor(). This is needed because set_cursor() will try to scroll the cursor into view, and for right-aligned text, did_change() may change the content rect which needs to be reflected by the time we call scroll_cursor_into_view().
2019-04-25GTextEditor: Account for the GFrame border in the painting code.Andreas Kling
We were forgetting to translate the painter by the frame_thickness(). With this fixed, we can also do proper vertical centering of lines for single-line editors, and things suddenly look nicer than ever! :^)
2019-04-25GScrollableWidget: The visible_content_rect() should be max content_size().Andreas Kling
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-24GTextEditor: Expand the content "to-fill" for right aligned text.Andreas Kling
When using a right-side text alignment, hook the resize event to make sure that the content width is at least frame_inner_rect().width() wide. This allows us to use content_width() as the anchor point for right aligned text, rather than using the frame inner rect, which was clearly wrong in the overflow case.
2019-04-24GTextEditor: Make the line_widget_rect() span the widget horizontally.Andreas Kling
2019-04-24GTextEditor: Turn off the ruler by default.Andreas Kling
You're usually not gonna want the ruler. TextEditor can enable it manually.
2019-04-24GTextEditor: Fix line_content_rect() behavior with custom alignments.Andreas Kling
2019-04-24GTextEditor: Add support for different text alignments.Andreas Kling
Currently only CenterLeft and CenterRight are supported, but it would be very straightforward to add other alignments as well.
2019-04-23WindowServer+TaskBar: Add a taskbar window button popup menu.Andreas Kling
This patch only hooks up the minimize and unminimize actions.
2019-04-23LibGUI: Don't bother setting a title on tooltip windows.Andreas Kling
2019-04-23GWindow: Don't send InvalidateRect message with 0 rects to WindowServer.Andreas Kling
This could happen if GWindow::hide() was called while a window had pending repaint rects. The deferred_invoke() lambda in GWindow::update() would eventually run, but by then, hide() had cleared all pending rects.
2019-04-23Do a pass of compiler warning fixes.Andreas Kling
This is really making me question not using 64-bit integers more.
2019-04-22WindowServer+LibGUI: Allow arbitrary number of rects in messages.Andreas Kling
To get truly atomic updates, add a mechanism for passing arbitrary amounts of extra data along with WindowServer messages. This allows us to pass all the rects in a single message.
2019-04-21Include Makefile.common in all other Makefiles.Andreas Kling
2019-04-20LibGUI: Allow GActions to be scoped either globally or widget-locally.Andreas Kling
This makes it possible for e.g GTextEditor to create a bunch of actions with popular shortcuts like Ctrl+C, etc, without polluting the global shortcut namespace. Widget-local actions will only activate while their corresponding widget has focus. :^)
2019-04-20LibGUI+Minesweeper: Add GWindow::set_resizable().Andreas Kling
2019-04-20GTableView: Tweak appearance of key column with alternating rows.Andreas Kling
2019-04-20WindowServer+LibGUI: Coalesce multiple client paints into GMultiPaintEvents.Andreas Kling
This allows GWindow to paint up to 32 separate rects before telling the WindowServer to flip the buffers. Quite a bit smoother. :^)
2019-04-20WindowSerer+LibGUI: Send multiple rects in invalidation/flush messages.Andreas Kling
This patch moves to sending up to 32 rects at a time when coordinating the painting between WindowServer and its clients. Rects are also merged into a minimal DisjointRectSet on the server side before painting. Interactive resize looks a lot better after this change, since we can usually do all the repainting needed in one go.
2019-04-20LibGUI: Bundle up update() invalidations and send them on next event loop.Andreas Kling
2019-04-20WindowServer: Introduce a WM event mask so Taskbar can ignore window rects.Andreas Kling
Taskbar was waking up to do nothing every time a window rect changed.
2019-04-20Sprinkle use of AK::Vector in various places.Andreas Kling
Some of these are less helpful than others. Avoiding a bunch of mallocs in the event loop wakeup code is definitely nice.
2019-04-20Get rid of SERENITY macro since the compiler already defines __serenity__Andreas Kling
This makes it a bit easier to use AK templates out-of-tree.
2019-04-19LibGUI: Remove GListBox since it was not kept up-to-date.Andreas Kling
I'll come back and add a GListView eventually, but this is not good enough.
2019-04-19VisualBuilder: Expose GGroupBox name property.Andreas Kling
2019-04-19VisualBuilder: Hook up everything needed for widget property editing.Andreas Kling
It's now possible to edit widget properties inline in the properties window. We're currently relying on the basic GVariant conversion functions to do all the "parsing" but that's not gonna be good enough.
2019-04-19LibGUI: Move editing logic from GTableView up to GAbstractView.Andreas Kling
GAbstractView should be able to manage the high-level editing logic, as long as subclasses implement content_rect(GModelIndex) so we know where to put the editing widgets. :^)
2019-04-18LibGUI: Move the editing widget along with the content when scrolling.Andreas Kling
2019-04-18GWidget: Always update self after a child is removed.Andreas Kling
We could probably tighten the amount of invalidation we do here, but this is definitely more correct than not invalidating at all.
2019-04-18LibGUI: GWindow's focused widget should be a WeakPtr.Andreas Kling
This fixes some very obvious use-after-free accesses.
2019-04-18LibCore+LibGUI: Make CObject child events synchronous.Andreas Kling
...and then make GWidget layout invalidation lazy. This way we coalesce multiple invalidations into a single relayout and we don't have to worry about child widgets not being fully constructed.
2019-04-18LibGUI: Start working on GTableView inline editing.Andreas Kling
This is pretty shaky still, but the basic idea is that you subclass GModel and return true for editable indices. The table view also needs to have its editable flag set.
2019-04-18LibGUI: Give GTextEditor a context menu.Andreas Kling
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and will show a context menu containing them when requested. Apps that want to put a GTextEditor's actions in its menu can get to the actions via public getters. :^)
2019-04-18LibGUI: Refactor context menus to be event-driven instead of declarative.Andreas Kling
The declarative approach had way too many limitations. This patch adds a context menu event that can be hooked to prepare a custom context menu on demand just-in-time. :^)
2019-04-18WindowServer: Generate a separate WM event for window icon changes.Andreas Kling
2019-04-16GWidget: Add move_by() and make set_relative_rect() invalidate parent.Andreas Kling
2019-04-16Make better use of geometry class helpers in some places.Andreas Kling
2019-04-16GWidget: Tidy up the hit-testing code somewhat.Andreas Kling
2019-04-16GWidget: Remove unnecessary extra parent lookup in move_to_{back,front}().Andreas Kling
2019-04-16GWidget: Add some new child z-ordering facilities.Andreas Kling
- child_at(Point) - move_to_front() - move_to_back() - is_frontmost() - is_backmost() This patch also makes it possible to receive the mouse event that triggers a context menu before the context menu is shown. I'm not sure this is the best design for context menus but it works for now.
2019-04-16GTableView: Remove the old-style focus rect.Andreas Kling
2019-04-14GWidget: Add direct setters for x, y, width & height.Andreas Kling
2019-04-14AK: Improve smart pointer ergonomics a bit.Andreas Kling
2019-04-14LibGUI+WindowServer: Add a way to dismiss opened menus from the client.Andreas Kling