Andreas Kling
508007f1dd
GRadioButton: Draw a focus rect when focused.
2019-05-24 17:41:22 +02:00
Andreas Kling
677794f30d
LibGUI: Make GCheckBox inherit from GAbstractButton.
2019-05-24 17:11:42 +02:00
Andreas Kling
21c56477b0
LibGUI: Add a GAbstractButton base class for button widgets.
...
This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
2019-05-24 16:32:20 +02:00
Christopher Dumas
9823354754
LibGUI: Don't crash when updating menu item that's not in the window server ( #83 )
...
Don't crash when updating menu item that's not in the window server. Menu Items begin with an invalid ID of -1, and only get a valid ID if the menu they are attached to is added to the window server. They don't send updates to the server unless they have a valid ID.
Fixes #82
2019-05-24 04:31:00 +02:00
Andreas Kling
36d8b9e89b
LibGUI: Add a GRadioButton widget.
...
Radio buttons are automagically exclusive with other radio button children
of the same parent. :^)
2019-05-24 02:29:16 +02:00
Andreas Kling
08228f34b9
GWindow: Only flip the window backing stores once per paint event.
2019-05-21 21:05:10 +02:00
Andreas Kling
dc03b50f41
GEventLoop: Make the WindowServer connection use a blocking socket.
2019-05-20 03:47:50 +02:00
Robin Burchell
a8864dc590
Kernel: Report EAGAIN from read() on a non-blocking socket if the buffer is empty
...
This is not EOF, and never should have been so -- can trip up other code
when porting.
Also updates LibGUI and WindowServer which both relied on the old
behaviour (and didn't work without changes). There may be others, but I
didn't run into them with a quick inspection.
2019-05-20 01:31:28 +02:00
Andreas Kling
33d0916d29
WindowServer: Add support for fullscreen windows.
...
Fullscreen windows are rendered alone and above everything else when they
are active, and as part of the regular window stack order when something
else is active.
Currently windows cannot be made fullscreen after-the-fact, but must have
the fullscreen flag included in their CreateWindow message.
It should not possible to interact with the menu, taskbar or window frame
while the active window is fullscreened. :^)
2019-05-17 22:33:19 +02:00
Robin Burchell
5babcac289
Build: Install most headers to Root (and libcore.a/libgui.a)
...
This makes out-of-tree linking possible. And at the same time, add a
CMakeToolchain.txt file that can be used to build arbitrary cmake-using
applications on Serenity by pointing to the CMAKE_TOOLCHAIN_FILE when
running cmake:
-DCMAKE_TOOLCHAIN_FILE=~/code/serenity/Toolchain/CMakeToolchain.txt
2019-05-17 21:59:48 +02:00
Robin Burchell
20e55c0120
GInputBox: Use whichever is greater: the approximate size of the title, or the label's text
...
Might be an idea to add a minimum size constrain in window server
instead, since it knows the exact dimensions? But this is a simple fix
that seems to do the job.
2019-05-17 15:54:16 +02:00
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