Andreas Kling
9cab7a0707
LibGUI: Move the editing widget along with the content when scrolling.
2019-04-18 23:57:07 +02:00
Andreas Kling
568f3125f3
GWidget: Always update self after a child is removed.
...
We could probably tighten the amount of invalidation we do here, but this is
definitely more correct than not invalidating at all.
2019-04-18 23:25:30 +02:00
Andreas Kling
cc9cefbd5f
LibGUI: GWindow's focused widget should be a WeakPtr.
...
This fixes some very obvious use-after-free accesses.
2019-04-18 23:16:57 +02:00
Andreas Kling
9e6b0ccc0e
LibCore+LibGUI: Make CObject child events synchronous.
...
...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.
2019-04-18 22:57:24 +02:00
Andreas Kling
0e6b273620
LibGUI: Start working on GTableView inline editing.
...
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.
2019-04-18 22:27:14 +02:00
Andreas Kling
ae3ec3fc37
LibGUI: Give GTextEditor a context menu.
...
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. :^)
2019-04-18 12:28:29 +02:00
Andreas Kling
a747a10eab
LibGUI: Refactor context menus to be event-driven instead of declarative.
...
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. :^)
2019-04-18 04:12:27 +02:00
Andreas Kling
c931eaa22c
WindowServer: Generate a separate WM event for window icon changes.
2019-04-18 00:39:11 +02:00
Andreas Kling
ac324f14b8
GWidget: Add move_by() and make set_relative_rect() invalidate parent.
2019-04-16 22:59:27 +02:00
Andreas Kling
f61549ca5f
Make better use of geometry class helpers in some places.
2019-04-16 13:58:02 +02:00
Andreas Kling
952f334de7
GWidget: Tidy up the hit-testing code somewhat.
2019-04-16 13:25:00 +02:00
Andreas Kling
c812d63ea6
GWidget: Remove unnecessary extra parent lookup in move_to_{back,front}().
2019-04-16 04:01:14 +02:00
Andreas Kling
04500c1ae2
GWidget: Add some new child z-ordering facilities.
...
- child_at(Point)
- move_to_front()
- move_to_back()
- is_frontmost()
- is_backmost()
This patch also makes it possible to receive the mouse event that triggers
a context menu before the context menu is shown. I'm not sure this is the
best design for context menus but it works for now.
2019-04-16 03:47:55 +02:00
Andreas Kling
73c70e5d2e
GTableView: Remove the old-style focus rect.
2019-04-16 03:04:14 +02:00
Andreas Kling
6dc9a6ef42
GWidget: Add direct setters for x, y, width & height.
2019-04-14 04:10:43 +02:00
Andreas Kling
3f6408919f
AK: Improve smart pointer ergonomics a bit.
2019-04-14 02:36:06 +02:00
Andreas Kling
91e1f3ffb1
LibGUI+WindowServer: Add a way to dismiss opened menus from the client.
2019-04-14 01:53:19 +02:00
Andreas Kling
c09c114d77
WindowServer+LibGUI: Add ability to set per-window icons.
...
The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
2019-04-13 16:59:55 +02:00
Andreas Kling
7a74b76769
GWidget: Silence debug spam about the click clock.
2019-04-13 16:15:47 +02:00
Andreas Kling
0f4050903d
GVariant: Add to_bool(), to_int() and to_color().
2019-04-13 12:39:20 +02:00
Andreas Kling
a90e218c71
Minesweeper: Start working on a simple minesweeper game. :^)
2019-04-13 03:08:16 +02:00
Andreas Kling
c06a3bdeb4
LibGUI+WindowServer: Add support for per-GWidget context menus.
...
You can now simply assign a GMenu as a GWidget's context menu and it will
automagically pop up on right click. :^)
2019-04-12 17:18:13 +02:00
Andreas Kling
c98bbff0cb
VisualBuilder: Add some widget-specific properties.
2019-04-12 15:17:53 +02:00
Andreas Kling
3674bb9429
GVariant: Tweak stringification of Color, Boolean and Invalid variants.
2019-04-12 14:49:45 +02:00
Andreas Kling
8f4c59c276
GVariant: Don't crash when extracting a null String.
2019-04-12 14:43:44 +02:00
Andreas Kling
054c982181
LibGUI+WindowServer: Add support for enabled/disabled actions.
...
The enabled state of a GAction now propagates both to any toolbar buttons
and any menu items linked to the action. Toolbar buttons are painted in
a grayed out style when disabled. Menu items are gray when disabled. :^)
2019-04-12 02:53:27 +02:00
Andreas Kling
32e5c8c689
GTextEditor: Add on_selection_changed callback.
...
This is probably a bit eager and won't coalesce all updates or even
ignore no-op changes to the selection.
2019-04-12 02:52:34 +02:00
Andreas Kling
269886fc4e
GWidget: Add "enabled" state for widgets.
...
There's nothing magical that happens for painting, each widget needs to
handle it manually in their painting code.
2019-04-12 02:51:16 +02:00
Andreas Kling
47a2982119
LibCore: Move LibGUI/GTimer to LibCore/CTimer.
2019-04-12 00:09:45 +02:00
Andreas Kling
c425bc2e71
GVariant: Add Point, Size and Rect variant types.
2019-04-11 22:52:34 +02:00
Andreas Kling
c57cf9834b
LibGUI: Add GVariant copy constructor.
2019-04-11 21:36:04 +02:00
Andreas Kling
52152e171b
GVariant: Zero out invalid GVariants to unconfuse debugging.
2019-04-11 17:28:59 +02:00
Andreas Kling
ef23ed7ef1
GTableView: Handle not having a model a bit more gracefully.
2019-04-11 17:26:30 +02:00
Andreas Kling
93b76628a5
GGroupBox: Improve appearance with new FrameShape::Box style.
2019-04-11 14:27:31 +02:00
Andreas Kling
16990fece3
GScrollBar: Improve appearance for curiously-shaped scrollbars.
2019-04-11 13:16:43 +02:00
Andreas Kling
b5d1cfef58
VisualBuilder: Add icons to the toolbox, and support for GProgressBar.
2019-04-11 06:08:06 +02:00
Andreas Kling
c71ece77fa
VisualBuilder: Tweak grid size and add an (empty) toolbox window.
2019-04-11 04:01:17 +02:00
Andreas Kling
c6ffb3e2b8
VisualBuilder: Use real GWidgets instead of pretend VBWidgets.
...
That first design was the wrong idea. Instead, have VBWidget instantiate
a GWidget of the appropriate type and parent it to the VBForm.
We then use a new "greedy hit-testing" mechanism in GWidget to prevent any
mouse events from reaching the VBForm's children.
To paint the grabbers above the child widgets, I added a slightly hackish
but kind of neat second_paint_event() that is called after a widget has
painted all of his children. :^)
2019-04-11 03:34:37 +02:00
Andreas Kling
d8e1545783
LibCore: Move LibGUI/GLock to LibCore/CLock.
2019-04-10 22:39:59 +02:00
Andreas Kling
ab1c84cf53
LibCore: Move HTTP classes from LibGUI to LibCore.
2019-04-10 22:28:10 +02:00
Andreas Kling
cfd6e6cc36
LibCore: Move GIODevice hierarchy from LibGUI to LibCore.
2019-04-10 20:22:23 +02:00
Andreas Kling
fc1d3074de
LibCore: Move LibGUI/GNotifier to LibCore/CNotifier.
2019-04-10 17:35:43 +02:00
Andreas Kling
b2542414d7
LibCore: Add CEventLoop and make LibGUI/GEventLoop inherit from it.
...
This is shaping up to be quite nice.
2019-04-10 17:30:58 +02:00
Andreas Kling
2f1f51b8ab
LibCore: Move LibGUI/GObject to LibCore/CObject.
2019-04-10 17:01:54 +02:00
Andreas Kling
b8062f69d8
LibCore: Add CEvent and make LibGUI/GEvent inherit from it.
2019-04-10 16:56:55 +02:00
Andreas Kling
5e0577a042
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
...
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
55811f233f
LibGUI+WindowServer: Coalesce paints and resizes on the client side.
...
Only process paint and resize events on the GUI client side if those events
have the latest up-to-date window size. This drastically reduces async
overdraw during interactive resize.
2019-04-10 15:39:28 +02:00
Andreas Kling
0ac55f2c38
GWindow: Discard wrongly-sized backing stores in set_rect().
...
The WindowServer still holds on to at least one backing store in case it
needs to paint us again before we can render a new one. This ensures that
we don't end up stuck with an undersized backing store.
2019-04-10 14:35:13 +02:00
Andreas Kling
d4818dd2dd
WindowServer: Give windows a "background color" to use for missing parts.
...
When resizing a window, we often end up having to paint some part of it
without coverage in the current backing store. This patch makes those cases
look nicer by having a fallback background color for each window, passed
along with the CreateWindow client message.
2019-04-10 14:29:47 +02:00
Andreas Kling
f6543c5946
LibGUI: Add a simple GGroupBox widget.
...
This needs some work on the visual side, but it gets the job done already.
2019-04-10 05:52:15 +02:00
Andreas Kling
cf8b117d97
GCheckBox: Paint the box part as a container frame.
2019-04-10 03:44:23 +02:00
Andreas Kling
4ab0cd5d4c
LibGUI: Move frame painting from GFrame to StylePainter.
...
This way it can be used by others who might not have a GFrame object.
2019-04-10 03:43:46 +02:00
Andreas Kling
313ac51832
LibGUI: Turn GTextBox into a wrapper around a single-line GTextEditor.
2019-04-10 03:08:29 +02:00
Andreas Kling
5ab043a687
GSpinBox: Move increment/decrement button within the widget frame.
2019-04-10 02:09:06 +02:00
Andreas Kling
9311164439
GWidget: Make hit testing respect child z-order.
...
This was as simple as iterating the children in reverse order. Duh. :^)
2019-04-10 02:08:32 +02:00
Andreas Kling
b8f150457e
LibGUI: Repaint GScrollBar without hover highlight immediately on leave.
2019-04-10 01:50:10 +02:00
Andreas Kling
4abffa4dbe
GSpinBox: Put nice little arrow glyphs on the buttons.
2019-04-10 01:37:08 +02:00
Andreas Kling
4c0f586f2b
LibGUI: Add a spinbox widget.
...
This is essentially a combo widget containing a single-line GTextEditor
and two buttons for increment and decrement. The GTextEditor::on_change
callback is hooked to prevent non-numeric input but it's not entirely
perfect since that callback is asynchronous. This will work until we have
some more sophisticated input validation mechanism though.
2019-04-09 16:29:00 +02:00
Andreas Kling
151b7149e6
GTextEditor: Add GTextEditor::on_change callback for when content changes.
2019-04-09 16:20:36 +02:00
Andreas Kling
7f2eeb0b35
LibGUI+WindowServer: Add support for GWidget tooltips.
...
Any GWidget can have a tooltip and it will automatically pop up below the
center of the widget when hovered. GActions added to GToolBars will use
the action text() as their tooltip automagically. :^)
2019-04-08 18:58:44 +02:00
Andreas Kling
3e175c9a96
LibGUI: Move GSocketAddress to its own file.
2019-04-08 17:19:35 +02:00
Andreas Kling
93a4a4c597
Taskbar: Replace TaskbarWidget with a simple GFrame.
...
There's no need for a custom widget here, at least not now.
2019-04-08 17:17:16 +02:00
Andreas Kling
6d5a54690e
LibGUI: Make GSocket connection asynchronous.
...
Now connect() will return immediately. Later on, when the socket is actually
connected, it will call GSocket::on_connected from the event loop. :^)
2019-04-08 04:56:11 +02:00
Andreas Kling
7fcca0ce4b
GHttp: Rename GHttpNetworkJob => GHttpJob. And tidy up a little bit.
2019-04-08 02:24:34 +02:00
Andreas Kling
71b6436552
GHttp: Fix little bug in HTTP header parsing.
2019-04-07 22:47:34 +02:00
Andreas Kling
31b9d8354e
GIODevice: Remove accidentally committed debug spam.
2019-04-07 20:18:58 +02:00
Andreas Kling
51b4d3fe5a
GHttp: Work on bringing this up.
2019-04-07 19:35:48 +02:00
Andreas Kling
8f30657390
Start working on a Downloader app and backing classes in LibGUI.
...
LibGUI is slowly becoming LibKitchensink but I'm okay with this for now.
2019-04-07 14:36:10 +02:00
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
Andreas Kling
4454392929
GScrollableWidget: Make sure the corner widget is positioned correctly.
2019-03-29 03:02:31 +01:00
Andreas Kling
c77d369b75
GScrollBar: Make the scrubber size proportional to the scrollable range.
2019-03-29 02:51:19 +01:00
Andreas Kling
a5135dbf01
LibGUI: Remove debug spam in GWidget::spans_entire_window_horizontally().
2019-03-29 02:22:17 +01:00
Andreas Kling
d48f486634
LibGUI: Don't draw left and right side of surfaces that span entire window.
...
In other words, if a surface stretches from the left side of the window
all the way to the right side, skip shading and highlighting the sides.
This makes widgets blend together just slightly with the window. :^)
2019-03-29 02:20:22 +01:00
Andreas Kling
9d7a513681
GTextEditor: Keep tweaking the single-line look.
2019-03-29 01:57:29 +01:00
Andreas Kling
5d72cf5a3f
LibGUI: Improve GFrame's look for Container shapes.
...
This is now starting to look like a proper container. Very nice :^)
2019-03-28 20:15:13 +01:00
Andreas Kling
f939fb7eb7
Userland: Add a simple GFrame testing window to guitest2.
2019-03-28 18:52:03 +01:00
Andreas Kling
c7ab643883
Move LibGUI/GStyle to SharedGraphics/StylePainter.
...
I want to paint some buttons in WindowServer where we don't have LibGUI.
2019-03-28 17:32:38 +01:00
Andreas Kling
d12b6b8677
LibGUI: Tweak GScrollBar gutter color.
2019-03-28 17:29:14 +01:00
Andreas Kling
9fa21fa585
LibGUI: Add a GPainter class that inherits from Painter.
...
This gets rid of the last little piece of LibGUI knowledge in Painter.
2019-03-28 17:19:56 +01:00
Andreas Kling
3dc4255eb4
LibGUI: Use GFrame to draw the frames around GItemView and GTableView.
2019-03-28 16:58:29 +01:00
Andreas Kling
1fc03a7644
LibGUI: Make GScrollableWidget a GFrame and fix up GTextEditor for it.
2019-03-28 16:14:26 +01:00
Andreas Kling
cb296ffede
LibGUI: Add a GFrame class that can be inherited by framey widgets.
...
This will gather the code for painting sunken/raised frames etc in a single
place and make it easier add a bit of pleasant shading to UI's. :^)
2019-03-28 15:30:29 +01:00
Andreas Kling
670e376e27
Tweak the look of various UI surfaces and buttons.
2019-03-27 20:48:23 +01:00
Andreas Kling
d71820a382
LibGUI: Make the buttons in GInputBox and GMessageBox slightly taller.
2019-03-27 20:47:48 +01:00
Andreas Kling
0058da734e
Kernel: Add Inode::truncate(size).
...
- Use this to implement the O_TRUNC open flag.
- Fix creat() to pass O_CREAT | O_TRUNC | O_WRONLY.
- Make sure we truncate wherever appropriate.
2019-03-27 16:42:30 +01:00
Andreas Kling
aef6030a80
LibC: Time-related POSIX compliance fixes.
2019-03-27 01:31:53 +01:00
Andreas Kling
be604652ae
LibGUI: Add GIcon::default_icon(name).
...
This is a convenience helper to instantiate a GIcon like so:
auto icon = GIcon::default_icon("filetype-image");
This will give you the "filetype-image" icon in both 16x16 and 32x32 sizes.
2019-03-25 14:46:37 +01:00
Andreas Kling
43bb7aad4c
GItemView: Some improvements to keyboard navigation.
2019-03-25 14:13:32 +01:00
Andreas Kling
a3390b6f1c
GTextEditor: Draw a simple border around single-line editors.
2019-03-25 14:13:21 +01:00
Andreas Kling
4d3478aa71
GItemView: Hide the horizontal scrollbar since we never need it.
...
This view always relayouts the content to fit the available width, so we
don't need a horizontal scrollbar. :^)
2019-03-25 13:58:47 +01:00
Andreas Kling
20137e45f4
LibGUI: Ignore GWidget::update() on invisible widgets.
2019-03-25 13:58:30 +01:00
Andreas Kling
bc3c199bb1
GItemView: Add slightly more horizontal padding to the icon labels.
2019-03-25 13:35:52 +01:00
Andreas Kling
838a06096a
GTextEditor: Shift+Delete should delete the current line.
2019-03-25 13:14:02 +01:00
Andreas Kling
fceeb9b695
GLock: Remove some debug spam.
2019-03-25 13:05:24 +01:00
Andreas Kling
500df578fe
LibGUI+Kernel: Add a GLock class (userspace mutex.)
...
It's basically a userspace port of the kernel's Lock class.
Added gettid() and donate() syscalls to support the timeslice donation
feature we already enjoyed in the kernel.
2019-03-25 13:03:49 +01:00
Andreas Kling
108b663618
GScrollBar: Clicking in the gutter should jump directly to that position.
...
I think I like how this feels but I'm not 100% sure yet, so I'm leaving
the old feel in behind an #ifdef.
2019-03-25 05:03:40 +01:00
Andreas Kling
614dafea32
FileManager+LibGUI: Show thumbnail generation progress in the statusbar.
2019-03-25 04:25:25 +01:00
Andreas Kling
32191b0d4b
GBoxLayout: Don't subtract margins from the available space twice.
2019-03-25 04:24:20 +01:00
Andreas Kling
20f7d7ec67
LibGUI: Add GWidget::doubleclick_event().
...
Now double-clicking an item in a GTableView or GItemView will activate it.
2019-03-25 01:43:32 +01:00
Andreas Kling
b4da451c9a
WindowServer+LibGUI: Implement automatic cursor tracking.
...
When a mouse button is pressed inside a window, put that window into an
automatic mouse tracking state where all mouse events are sent to that
window until all mouse buttons are released.
This might feel even better if it only cared about the mouse buttons you
actually pressed while *inside* the windows to get released, I don't know.
I'll have to use it for a while and see how it's like.
2019-03-24 15:01:56 +01:00
Andreas Kling
86413a6f5a
LibGUI+FileManager: Add a GIcon class to support multi-size icons.
...
A GIcon can contain any number of bitmaps internally, and will give you
the best fitting icon when you call bitmap_for_size().
2019-03-24 04:28:36 +01:00