Age | Commit message (Collapse) | Author |
|
|
|
This could be tail-call-optimized but it's not, so we end up overflowing the
stack space if we recurse too many times. This was causing crashes when
resizing Minesweeper.
|
|
|
|
They show up as checkable GButtons in GToolBar, and with (or without) check
marks in menus.
There are a bunch of places to make use of this. This patch only takes
advantage of it in the FileManager for the view type actions.
|
|
We throw away the backing store if the window rect changes size. Since the
resizing happens asynchronously at the mercy of the WindowServer, we might
end up in set_rect() again before gaining a new backing store. So there are
no guarantees that the back/front bitmaps exist here.
|
|
|
|
|
|
Clicking two separate buttons in quick succession shouldn't be interpreted
as a double click.
|
|
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. :^)
|
|
|
|
|
|
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. :^)
|
|
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.
|
|
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().
|
|
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! :^)
|
|
When computing the visible content rect, constrain the result to the content
size. The content shouldn't feel responsible for painting anything outside.
|
|
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.
|
|
|
|
You're usually not gonna want the ruler. TextEditor can enable it manually.
|
|
|
|
Currently only CenterLeft and CenterRight are supported, but it would be
very straightforward to add other alignments as well.
|
|
This patch only hooks up the minimize and unminimize actions.
|
|
|
|
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.
|
|
This is really making me question not using 64-bit integers more.
|
|
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.
|
|
|
|
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. :^)
|
|
|
|
|
|
This allows GWindow to paint up to 32 separate rects before telling the
WindowServer to flip the buffers. Quite a bit smoother. :^)
|
|
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.
|
|
|
|
Taskbar was waking up to do nothing every time a window rect changed.
|
|
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
|
|
This makes it a bit easier to use AK templates out-of-tree.
|
|
I'll come back and add a GListView eventually, but this is not good enough.
|
|
|
|
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.
|
|
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. :^)
|
|
|
|
We could probably tighten the amount of invalidation we do here, but this is
definitely more correct than not invalidating at all.
|
|
This fixes some very obvious use-after-free accesses.
|
|
...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.
|
|
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.
|
|
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. :^)
|
|
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. :^)
|
|
|
|
|
|
|