Commit Graph

521 Commits

Author SHA1 Message Date
Andreas Kling
07df2fa7ec GFilePicker: Remove the frame around the little toolbar. 2019-05-16 14:06:55 +02:00
Andreas Kling
ee363faf10 GButton: Only draw focus rect if there is a caption text. 2019-05-16 14:05:28 +02:00
Robin Burchell
23c90da26c GFilePicker: Make the path selected accessible externally 2019-05-16 13:31:19 +02:00
Robin Burchell
8aecebe8f3 GTextEditor: Introduce triple click to select all 2019-05-16 01:24:34 +02:00
Robin Burchell
966c5d10b1 GTextEditor: Minor cleanup
Remove an unnecessary layer of nesting
2019-05-16 01:24:34 +02:00
Robin Burchell
f55965b5e8 WindowServer/GMenu: Adjust the popup position to fit the window inside the screen
Rather than passing a "top_anchored" bool. Fixes #22.
2019-05-16 01:22:54 +02:00
Robin Burchell
a4b0dfff43 Move double click events from LibGUI to the window server 2019-05-15 22:45:28 +02:00
Andreas Kling
65e56eb72b GButton: Allow triggering a "click" by pressing Return when focused. 2019-05-15 04:25:53 +02:00
Andreas Kling
ad731cc08f LibGUI: Support cycling through focusable widgets with Tab and Shift-Tab. 2019-05-15 02:39:58 +02:00
Andreas Kling
2e0d8ee98f GEventLoop: Rename s_event_fd => s_windowserver_fd. 2019-05-14 17:12:09 +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
dddf45f563 Change String&& arguments to const String& in a couple of places.
String&& is more nuisance than anything, and the codegen improvement is
basically negligible since the underlying type is already retainable.
2019-05-12 14:57:15 +02:00
Andreas Kling
3c62534ae6 GTableView: Update content size immediately on column show/hide. 2019-05-11 00:19:34 +02:00
Andreas Kling
dd7406ce3f GTableView: Don't include hidden columns in content width. 2019-05-11 00:16:34 +02:00
Andreas Kling
e2e07b9405 GLayout: Default to 4 pixels of spacing(). 2019-05-10 22:59:22 +02:00
Andreas Kling
db5341e11d GToolBar: Make the framed appearance optional. 2019-05-10 22:58:52 +02:00
Andreas Kling
d8ae6c31ce LibGUI+WindowServer: Improve checkmark appearance. 2019-05-10 22:50:42 +02:00
Andreas Kling
9d2b46f396 GDialog: If no parent window is provided, center dialog on screen. 2019-05-10 22:22:03 +02:00
Andreas Kling
d643daebb2 GTableView: Headers were not usable when the view was scrolled. 2019-05-10 20:56:00 +02:00
Andreas Kling
613c7b9856 GTableView: Make it possible to hide/show columns from a context menu.
Show a context menu when right clicking the headers of a GTableView, and
allow the user to hide/show individual columns.
2019-05-10 20:26:55 +02:00
Andreas Kling
99aead4857 Kernel: Add a writev() syscall for writing multiple buffers in one go.
We then use this immediately in the WindowServer/LibGUI communication in
order to send both message + optional "extra data" with a single syscall.
2019-05-10 03:19:25 +02:00
Andreas Kling
e6443649cb GFilePicker: Add a "new directory" button. 2019-05-09 18:45:33 +02:00
Andreas Kling
7c6784f50c GFilePicker: More work on the file picker, adding a location textbox. 2019-05-09 16:47:45 +02:00
Andreas Kling
e569ef6412 GFilePicker: Add a button for moving up to parent directory. 2019-05-09 15:51:57 +02:00
Andreas Kling
fa232ac180 LibGUI: Remove GModel activations to GAbstractView.
Now you can hook activation via GAbstractView::on_activation.
The design still isn't quite right, we should eventually move the selection
away from the model somehow.
2019-05-09 04:56:52 +02:00
Andreas Kling
bffaa5ece6 GLayout: Add a simple spacer concept; dummy item that expands-to-fit.
A spacer can be inserted anywhere in a layout and will simply expand to fill
the available space. This is useful for pushing widgets into place. :^)
2019-05-09 03:06:20 +02:00
Andreas Kling
bd5c79aff2 LibGUI: Start working on a file picker dialog (GFilePicker).
Have LibGUI adopt GDirectoryModel from FileManager since it fits perfectly
for the needs of a file picker.
2019-05-09 01:24:37 +02:00
Andreas Kling
364769c11c LibGUI: Add some missing class_name() overrides to GDialog and subclasses. 2019-05-08 22:10:00 +02:00
Andreas Kling
de98b2770b GMessageBox: Add icons to message boxes with 3 standard ones to choose from. 2019-05-08 20:13:39 +02:00
Andreas Kling
758e926b99 GGroupBox: Rename "name" property to "title" 2019-05-08 14:32:46 +02:00
Andreas Kling
6b40b081b2 GTextEditor: Add a readonly mode. 2019-05-08 05:00:28 +02:00
Andreas Kling
b719bf7fde GEventLoop: Calm down with the Vector inline capacity for messages.
Using nested event loops like this would cause the stack to grow huge.
2019-05-08 03:35:05 +02:00
Andreas Kling
b227b57508 GWindow: Mirror the correct number of pixels to newly created back bitmaps. 2019-05-08 03:34:36 +02:00
Andreas Kling
2848a96d66 GTableView: Fix crash on mousemove when no model is assigned. 2019-05-08 03:33:13 +02:00
Andreas Kling
1930d48a38 GApplication: quit() should have a default exit code of 0. 2019-05-08 01:15:41 +02:00
Andreas Kling
5b0c0847ef GSpinBox: Add class_name() override. 2019-05-07 23:28:22 +02:00
Andreas Kling
4f77b4e5bc GTabWidget: Fill the entire tab widget instead of just the bar.
There's no guarantee that child widgets will paint everything, so let's have
GTabWidget fill itself.
2019-05-07 17:00:56 +02:00
Andreas Kling
11b99dd89a GTabWidget: Tweak appearance. 2019-05-07 14:13:20 +02:00
Andreas Kling
5c4b421d56 GTabWidget: Highlight tab buttons when hovered.
The active tab's button doesn't get highlighted, since the highlight is
supposed to indicate that the widget can be interacted with.
2019-05-07 14:01:20 +02:00
Andreas Kling
e66f88ed60 GTableView: Make column resizing work when view is scrolled horizontally. 2019-05-06 23:38:35 +02:00
Andreas Kling
26110f7753 GTextEditor: set_cursor() should gracefully handle old cursor being invalid.
Since set_cursor() may be called after arbitrary document changes, it can't
rely on the old cursor being valid. To make things simple, if the old cursor
is on a line no longer in the document, just repaint the whole editor.
2019-05-06 22:04:53 +02:00
Andreas Kling
cec16105cc Make sure all GraphicsBitmap scanlines are 16-byte aligned.
This is a prerequisite for some optimizations.
2019-05-06 14:04:54 +02:00
Andreas Kling
3bdb95e128 ProcessManager+LibGUI: Tweak things to improve ProcessManager look. 2019-05-05 20:53:04 +02:00
Andreas Kling
9e5ad25188 GTabWidget: Paint a frame around the container part of the widget.
Then make the active tab stand out by punching a hole in the frame below
its button.
2019-05-05 15:03:34 +02:00
Andreas Kling
4e1b36ddf2 GTabWidget: Make a custom look for tab buttons. 2019-05-05 14:39:37 +02:00
Andreas Kling
62e7b26406 LibGUI: Start working on a tabbed widget container: GTabWidget. 2019-05-05 01:31:02 +02:00
Andreas Kling
b7cd6dea13 GTableView: Fix crash when clicking at random places. 2019-05-05 00:58:42 +02:00
Andreas Kling
48e3ea9e5c GTableView: Make it possible to resize the columns with the mouse.
The GModel now merely provides an initial width for the columns. Once that
has been queried, the table view manages width from then on.
2019-05-04 23:45:31 +02:00
Andreas Kling
a8c856ed3d GTableView: Improve look of column headers, and add sort order indicators. 2019-05-04 21:16:41 +02:00
Andreas Kling
6a5d92f0ad WindowServer+LibGUI: Allow changing whether windows have alpha channels.
Use this in Terminal to tell the window server to not bother with the alpha
channel in the backing store if we're running without transparency.
Semi-transparent terminals look neat but they slow everything down, so this
keeps things fast while making it easy to switch to the flashy mode. :^)
2019-05-03 21:07:16 +02:00