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