Andreas Kling
e74f32ae40
LibGUI: Always invalidate layout on GWidget child removal.
...
This code can get a bit confused when the child is destroyed before we
handle the ChildRemoved event. In those cases, the GChildEvent::child()
getter will return nullptr as it's backed by a WeakPtr.
To work around this issue, just always invalidate the layout for now.
This can be made a lot tighter in the future.
2019-04-06 21:15:13 +02:00
Andreas Kling
6306cf5c27
GScrollBar: Add the same hover highlight effect as GButton.
2019-04-06 13:55:56 +02:00
Andreas Kling
ef9fbef4c6
Taskbar: Show minimized window titles in [brackets].
...
Had to plumb the minimization state from WindowServer to Toolbar in order
to implement this.
2019-04-06 00:58:30 +02:00
Andreas Kling
74142d78c1
LibGUI: GButton's caption should be drawn in the foreground color.
2019-04-06 00:57:31 +02:00
Andreas Kling
99b98dc653
WindowServer: Merge WM_WindowAdded and WM_WindowStateChanged.
...
These events are identical, so it's silly to send both. Just broadcast
window state changes everywhere instead, it doesn't matter when it was
added as clients are learning about this asynchronously anyway.
2019-04-05 15:01:28 +02:00
Andreas Kling
bcc00857a4
AK: Revert Eternal<T> for now since it doesn't work as intended.
2019-04-05 05:14:20 +02:00
Andreas Kling
64a5abf8db
Taskbar: Only include "Normal" windows in the taskbar window list.
2019-04-04 16:23:23 +02:00
Andreas Kling
82b02ed82b
LibGUI: Use TextElision::Right for GButton captions.
2019-04-04 15:20:02 +02:00
Andreas Kling
89c544d97b
LibGUI: Allow specifying GButton text alignment.
2019-04-04 14:15:57 +02:00
Andreas Kling
7b1384c4ef
Taskbar: Plumb window active state from the WindowServer to the taskbar.
2019-04-04 13:19:26 +02:00
Andreas Kling
19eb814850
LibGUI: Make it possible for GButton to be checkable.
2019-04-04 13:18:27 +02:00
Andreas Kling
96104b5524
Taskbar: More bringup work. We now see a basic window list.
2019-04-04 01:44:35 +02:00
Andreas Kling
aa03a07e61
Taskbar+LibGUI: More work on bringup.
2019-04-03 21:04:16 +02:00
Andreas Kling
a22774ee3f
Taskbar: Start working on a taskbar app.
...
I originally thought I would do this inside WindowServer, but let's try to
make it as a standalone app that communicates with WindowServer instead.
That will allow us to use LibGUI. :^)
2019-04-03 19:38:44 +02:00
Andreas Kling
318db1e48e
WindowServer: Broadcast screen rect changes to all clients.
...
GUI clients can now obtain the screen rect via GDesktop::rect().
2019-04-03 17:22:14 +02:00
Andreas Kling
c02c9880b6
AK: Add Eternal<T> and use it in various places.
...
This is useful for static locals that never need to be destroyed:
Thing& Thing::the()
{
static Eternal<Thing> the;
return the;
}
The object will be allocated in data segment memory and will never have
its destructor invoked.
2019-04-03 16:52:25 +02:00
Andreas Kling
528054d192
GWindow: Don't ignore update(), it should repaint the whole window.
...
This was causing some apps to have an empty window on startup since the
call to update() in show() was effectively a no-op.
2019-04-03 15:54:16 +02:00
Andreas Kling
401d3662c6
GInputBox: Make the input text box a bit taller.
2019-04-02 20:48:37 +02:00
Andreas Kling
76ce68ac48
GSocket: Add a connect() overload that takes a hostname instead of an IP.
2019-04-02 20:40:10 +02:00
Andreas Kling
17e02e7450
Move NetworkOrdered.h to AK/ since it's used in both kernel and userspace.
2019-04-02 20:04:54 +02:00
Andreas Kling
b797458962
GTreeView: Support navigating the tree with the up/down keys.
2019-04-02 03:18:26 +02:00
Andreas Kling
6673284b06
LibGUI: Switch to a resizing cursor when hovering or using a GSplitter.
...
Also expose the various standard cursors on WSWindowManager so they can
be reused by the override mechanism.
2019-04-02 02:34:09 +02:00
Andreas Kling
c9b0d87927
LibGUI: Fix broken doubleclick detection due to uninitialized GElapsedTimer.
2019-04-01 22:03:32 +02:00
Andreas Kling
dcf6726487
WindowServer: Add support for per-window override cursors.
...
Use this to implement automatic switching to an I-beam cursor when hovering
over a GTextEditor. :^)
2019-03-31 23:52:02 +02:00
Andreas Kling
25f28a54a1
Terminal+LibGUI: Make the terminal cursor blink.
...
Added a GTimer class to help with this. It's just a simple GObject subclass
that sets up an event loop timer and invokes a callback on timeout.
2019-03-30 21:40:57 +01: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
9ac5909394
LibGUI: Highlight the GSplitter when hovering over it.
2019-03-30 14:04:53 +01:00
Andreas Kling
9538c06a45
LibGUI: Add a simple GSplitter container widget.
...
This allows you to put multiple widgets in a container and makes the space
in between them draggable to resize the two adjacent widgets.
2019-03-30 13:53:30 +01:00
Andreas Kling
f242d6e559
FileManager: Tweak look of thumbnailing progress bar.
...
Since it's inside a status bar, it looks a bit better when using a panel
shape with sunken shadow.
2019-03-30 13:12:59 +01:00
Andreas Kling
de57628a46
GTreeView: Notify the GScrollableWidget about content size changes.
...
This makes the tree view scrollable at last.
2019-03-30 04:58:31 +01:00
Andreas Kling
6ab55801e2
GFileSystemModel: Don't reload icons every time they are requested.
...
This was really slugging up the interactive resizing. :^)
2019-03-30 04:20:28 +01:00
Andreas Kling
4506e3a085
GTreeView: Remove test model I was using during bringup.
2019-03-30 03:49:39 +01:00
Andreas Kling
a92710ce3f
GTreeView: Handle the item expand/collapse toggles separately.
2019-03-30 03:44:08 +01:00
Andreas Kling
a535c7453f
GTreeView: On model selection change, open the selected index.
2019-03-30 03:30:50 +01:00
Andreas Kling
2c6a597d77
FileManager: Make the tree view follow the directory view navigations.
2019-03-30 03:27:25 +01:00
Andreas Kling
f10e0d0546
FileManager: Make the directory view follow the tree view selection.
2019-03-30 02:22:38 +01:00
Andreas Kling
c3bc0eeb86
GFileSystemModel: Add a special icon for the selected folder.
...
I don't know if this will always make sense but it does make sense within
the only current client (FileManager) so let's go with it for now.
2019-03-30 02:04:03 +01:00
Andreas Kling
025a50d9cb
GTreeView: Tweak line tree back and forth a bit.
2019-03-30 01:42:16 +01:00
Andreas Kling
1963391ca6
GTreeView: Add basic selection support.
2019-03-29 20:36:15 +01:00
Andreas Kling
967eec1e52
GTreeView: Add expand/collapse buttons to items with children.
2019-03-29 20:18:15 +01:00
Andreas Kling
eb182bcafc
LibGUI: Draw a 1px line tree alongside the GTreeView icons.
2019-03-29 19:48:15 +01:00
Andreas Kling
f6b48ecd47
GTreeView: More implementation work.
2019-03-29 18:10:58 +01:00
Andreas Kling
b181263b9f
GTreeView: Factor paint traversal into a shared function.
...
This way it can be used by hit testing as well, guaranteeing that everything
stays consistent.
2019-03-29 17:30:27 +01:00
Andreas Kling
6b72c62c5f
GFileSystemModel: Add a "DirectoriesOnly" mode.
2019-03-29 17:14:03 +01:00
Andreas Kling
4d3c5fd83e
LibGUI: Start working on a GFileSystemModel and hook that up in FileManager.
...
This is a read-only model for the tree view, at least initially. We'll see
where we take it from there once it's more polished.
2019-03-29 17:03:30 +01:00
Andreas Kling
f249c40aaa
Rename Painter::set_clip_rect() to add_clip_rect().
...
It was confusing to see multiple calls to set_foo() in a row. Since this is
an intersecting operation, let's call it add_clip_rect() instead.
2019-03-29 15:01:54 +01:00
Andreas Kling
474340b9cd
GTreeView: A bunch of work on the tree view.
2019-03-29 14:46:53 +01:00
Andreas Kling
d02238af48
LibGUI: Expand GModelIndex a bit, adding internal data and model pointers.
...
This will be useful for implementing more complicated models.
2019-03-29 04:58:15 +01:00
Andreas Kling
12ec55ee74
LibGUI: Start working on a GTreeView class.
2019-03-29 04:00:07 +01:00
Andreas Kling
add38b3981
GModel: Add GModelIndex argument to row_count() and column_count().
...
This is in preparation for supporting hierarchical models.
2019-03-29 03:27:03 +01:00