Robin Burchell
0dc9af5f7e
Add clang-format file
...
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling
ca4d65ba59
LibGUI: Add a GListView widget.
...
GListView displays a single column of data from a GModel.
2019-05-27 21:44:39 +02:00
Christopher Dumas
e3f81bce49
IRC client setttings, Terminal settings, more WM settings
2019-05-27 21:40:53 +02:00
Robin Burchell
9d2b08e06e
LibCore: Add CDirIterator, and use it in everything rather than readdir
2019-05-27 15:27:23 +02:00
Andreas Kling
3873c51781
LibCore: Add CObject::for_each_child_of_type<T>()
...
Use this to iterate over all the GRadioButtons in a group.
2019-05-27 04:18:24 +02:00
Andreas Kling
0c85d3dba9
LibCore+LibGUI: Add is<T>(CObject&) and to<T>(CObject&) helpers.
2019-05-27 04:06:01 +02:00
Andreas Kling
723ba91f74
LibGUI: Add GWidget::for_each_child_widget(callback).
2019-05-27 03:52:33 +02:00
Andreas Kling
3654c33c56
GFilePicker: Add a preview pane on the right-hand side for image previews.
...
Currently the preview pane is always open, but maybe it should be something
you can configure, or something that happens automagically.
2019-05-27 01:55:04 +02:00
faissaloo
6ac8aab941
GFilePicker: Return paths as FileSystemPath rather than String
2019-05-26 22:52:09 +02:00
Faissal Bensefia
411cdf067b
AK: Implement String::to_int ( #99 )
2019-05-26 04:08:36 +02:00
Robin Burchell
9b2fb47136
GTextEditor: Take frame size into account when setting clip rect
...
The ruler right does not include the (already translated) frame size.
Take that into account too, otherwise we overdraw the ruler.
Fixes #23 .
2019-05-26 02:46:26 +02:00
Andreas Kling
90dbf689c0
LibGUI: Unbreak popup menus, now that invalid menus have ID -1.
2019-05-26 01:07:56 +02:00
Andreas Kling
cca510162e
GButton: Align the button text according to text_alignment().
...
Added a Rect::align_within(other_rect, alignment) helper that seemed useful.
2019-05-25 20:15:52 +02:00
Andreas Kling
83aa785c57
GSlider: Oops, fix typo in previous commit.
2019-05-25 13:44:37 +02:00
Andreas Kling
d12857fc36
LibGUI: Notify widgets when their enabled state changes.
...
This is done by dispatching a (synchronous) "EnabledChange" event that can
be picked up in change_event(). Use this event to kick widgets out of their
"being pressed"-type modes if the user is interacting with them while the
state is programmatically changed.
2019-05-25 13:40:57 +02:00
Andreas Kling
817ac9c22b
LibGUI: Elide the text in GCheckBox and GRadioButton when low on space.
2019-05-25 04:01:22 +02:00
Christopher Dumas
957f8b84f2
WindowServer: Make it possible to turn off window title bars ( #88 )
...
Also, Launcher now does not use titlebars.
Only check if titlebar should be shown if the window type works with that.
2019-05-24 23:37:23 +02:00
Andreas Kling
cb9134a2ca
GSlider: Ignore mouse events when disabled.
2019-05-24 23:03:11 +02:00
Andreas Kling
ac7e02d984
GLabel: Paint the text with a disabled look when appropriate.
...
Also turn on right-side text elision in all cases by default.
2019-05-24 23:00:36 +02:00
Andreas Kling
b0ccd04a9c
LibGUI: When tabbing between focusable widgets, skip over disabled ones.
2019-05-24 22:57:05 +02:00
Andreas Kling
c62be7bb2b
LibGUI: Share code for text painting in GAbstractButton.
...
This gives all the GAbstractButton a consistent disabled appearance.
2019-05-24 22:54:37 +02:00
Andreas Kling
149b7f92a7
Demos: Start working on a simple WidgetGallery app.
...
It's good to have a place where we can try out all the different widgets.
This needs some more work on a nice layout, and should also include more
of the widgets. :^)
2019-05-24 22:47:41 +02:00
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