thankyouverycool
dc716194c8
LibGUI: Add on_activity_change function to Window
...
Reports changes on the active/inactive state of a window.
2020-07-15 13:19:44 +02:00
Tom
8ae37bccf1
LibGUI: Fix menu leak when default action changed
2020-07-15 00:11:30 +02:00
Tom
50903fd88c
FileManager: Add "Open with" menu if alternative applications are available
2020-07-15 00:11:30 +02:00
thankyouverycool
4970c448bf
LibGUI: Draw contiguous frame if GroupBox title is left empty
2020-07-14 17:55:39 +02:00
Tom
c8d3f8cdeb
LibGUI: Add Options flags and OpenMultiple mode for FilePicker
...
If the application can't open more than one file, we should not
allow the user to select multiple.
2020-07-13 19:49:34 +02:00
Tom
d4c6ae8263
LibGUI: Add ability to disable multiselect for views
2020-07-13 19:49:34 +02:00
Tom
f266f0e880
LibGUI: Improve IconView performance with large selections
...
This implements the following optimizations:
* Rather than clearing a HashTable of selected items and re-populating
it every time the selection rectangle changes, determine the delta
by only examining the items that might be in the area where the
selection may have changed compared to the previous area. Then
only add/remove selection items as needed.
* When painting, only query and paint the items actually visible.
Also, keep a local cache of item information such as calculated
rectangles and selection state, so it doesn't have to be calculated
over and over again.
2020-07-13 19:49:34 +02:00
Tom
b778804d20
LibGUI: Add ModelClient abstract class and allow registering clients
...
This solves a problem where the SortingProxyModel doesn't
receive the on_update call because other code overwrote
the handler later on.
2020-07-13 19:49:34 +02:00
thankyouverycool
332f349e07
LibGUI: Fix keybind conflicts in TreeView
...
Changes the shortcut to expand and collapse subtrees from alt to
ctrl+right/left arrows in TreeView. The current shortcuts conflict
with applications that already have navigation controls bound to alt
like file manager.
2020-07-13 14:27:23 +02:00
thankyouverycool
366d7e6d05
LibGUI: Only report toggled directories once on subtree collapse/expansion
...
This prevents redundant calls to on_toggle for the same indices when
subtrees are collapsed or expanded.
2020-07-13 14:27:23 +02:00
Peter Elliott
0fd31ef598
LibGUI: Ignore KeyUp events by default
...
fixed #2576
2020-07-11 18:51:41 +02:00
Tom
1c1ab71692
WindowServer/LibGUI: Add default menu items and allow default action for context menu
...
By specifying an optional Action for Menu::popup an application
can specify what item should be displayed as a default item.
2020-07-11 11:45:49 +02:00
thankyouverycool
deceb91c48
FileManager: Show an open folder icon for the selected directory
...
The currently selected directory now displays an open folder icon
in the directory tree.
2020-07-10 19:44:18 +02:00
thankyouverycool
e6ddc7e022
LibGUI: Add missing on_toggle hook to TreeView
...
Alt+arrow toggles are now captured.
2020-07-10 19:44:18 +02:00
Tom
fc568ea13a
LibGUI: Make scrollbar thumb size relative to content size
...
In order to calculate a thumb size that is a representation
of the visible portion (page) of the content, that information
needs to be taken into account.
2020-07-09 21:56:45 +02:00
Tom
d4b87fb18e
LibGUI: Implement IconView auto-scrolling when trying to select items out of view
...
If selecting in a large icon view, and dragging the mouse outside
of the widget, or close to the border of it, start scrolling
automatically. This allows for selecting large amount of items
that exceed the amount that can be displayed.
2020-07-09 21:51:01 +02:00
Linus Groh
899dcba158
WindowServer+LibGUI: Add "wait" cursor
2020-07-07 23:11:39 +02:00
Linus Groh
b8a8e417f1
WindowServer+LibGUI: Add "help" cursor
2020-07-07 23:11:39 +02:00
Linus Groh
b86a59ec05
LibGUI: Use Resize{Column,Row} cursor for Splitter and AbstractTableView
2020-07-07 23:11:39 +02:00
Linus Groh
62866208ee
WindowServer+LibGUI: Add "resize row/column" cursors
2020-07-07 23:11:39 +02:00
thankyouverycool
cbf3c2caeb
LibGUI: Add on_toggle function to TreeView
...
This adds a function to expose the index and open/close state
of expandible nodes in TreeView.
2020-07-07 13:38:35 +02:00
Andreas Kling
0b9efc04b5
LibGUI: Sort FileSystemModel alphabetically internally
...
This just makes everything nicer.
2020-07-04 20:33:23 +02:00
Andreas Kling
998b3f6d87
LibGUI: Fix glitchy behavior in ScrollableWidget::scroll_into_view()
...
This function relies on visible_content_rect() which could previously
return rectangles with negative size. This was causing TableViews to
scroll down a little bit when assigning a model to them.
Also tweak the logic so we scroll a 0x0 rect into view, giving a
slightly nicer final position.
2020-07-04 20:18:57 +02:00
Andreas Kling
a5799ed462
LibGUI: Add SortingProxyModel::sort_role()
...
This allows you to specify a role to sort by. Defaults to Role::Sort.
Also reordered the Role enum so that Role::Custom is last.
2020-07-04 18:40:21 +02:00
Andreas Kling
d851863704
Userspace: Remove a bunch of unnecessary Kernel/API/KeyCode.h includes
2020-07-04 17:25:31 +02:00
Andreas Kling
11c4a28660
Kernel: Move headers intended for userspace use into Kernel/API/
2020-07-04 17:22:23 +02:00
Andreas Kling
ca93c22ae2
LibGUI: Turn GUI::Application::the() into a pointer
...
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.
This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
2020-07-04 16:54:55 +02:00
Andreas Kling
1dd1595043
LibGUI: Make GUI::Application a Core::Object
...
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-04 14:05:57 +02:00
Andreas Kling
c6c71b0fcc
LibGUI: Respect per-index font when computing TreeView item rects
...
This makes the selected (currently shown in bold) item in HackStudio's
project file view show up at the correct position.
2020-07-04 11:01:43 +02:00
Andreas Kling
eec22acb8e
LibGUI: Add GUI::CommonActions::make_select_all_action() :^)
2020-07-03 21:34:12 +02:00
Linus Groh
33ca151eb0
FilePicker: Add folder icon to location box
...
It looks good in FileManager so it will also look good here :^)
FileManager commit: b8a50e9
2020-07-03 12:28:12 +02:00
Linus Groh
f8fa495d67
FilePicker: Make the location box 2px taller
...
This mimics a recent change to the FileManager's location box.
FileManager commit: 3d5233a
2020-07-03 12:28:12 +02:00
Andreas Kling
c6193af269
LibGUI: Make Application::exec() return instead of calling exit()
...
We were calling exit() here because we didn't want to deal with object
teardown in the long-long-ago before Core::Object was ref-counted.
2020-07-01 20:49:00 +02:00
Jack Karamanian
4dcdad4cc4
LibGUI: Highlight JS Extends and Super tokens
2020-07-01 11:18:44 +02:00
AnotherTest
476ccb2206
LibGUI: Do not recurse into rows with invalid indices
...
That would cause the traversal to go into an infinite loop.
2020-07-01 11:18:19 +02:00
Linus Groh
2e183e3292
LibGUI: Update FilePicker location textbox when changing directory
...
Fixes #2662 .
2020-06-30 12:20:18 +02:00
Linus Groh
5acc457c06
LibGUI: Only show FilePicker preview pane on demand
...
FilePicker::set_preview() and FilePicker::clear_preview() now show and
hide the preview pane respectively.
2020-06-30 10:43:46 +02:00
Linus Groh
6b61d4656f
LibGUI: Tweak FilePicker layout to remove bottom padding
...
This makes the "Cancel" and "Open" buttons align with the right sidebar's
bottom edge.
2020-06-30 10:26:11 +02:00
Andreas Kling
f50bc0f314
LibGUI: Add TextEditor::set_icon()
...
You can now set a 16x16 icon on a single-line TextEditor. If present,
the icon will be painted to the left of the text content.
2020-06-29 20:34:42 +02:00
Benoît Lormeau
951a429268
LibGUI: SpinBox: update the displayed value when set_range() clamps it
...
Consider the following: upon instanciation of a GUI::SpinBox, its
internal value and displayed value are both 0. When calling `set_min(1)`
on it (same as `set_range(1, max())`), the internal value gets clamped
to 1 correctly, but "0" is still displayed by the widget.
The displayed value is now updated accordingly to the internal value
when it gets clamped.
2020-06-29 14:57:36 +02:00
Hüseyin ASLITÜRK
a8b0ad5cc6
LibGUI: Fix image preview size in FilePicker for large images
...
Image preview widget overflow to other widgets in FilePicker dialog when image is larger than 160px. Also change the ImagePreview widget variable name for align to naming standards.
2020-06-27 12:57:30 +02:00
Hüseyin ASLITÜRK
671560a844
LibGUI: Bug fix on GUI::Image when image is nullptr
...
This bug cause to FilePicker crash when second image selected for preview. FilePicker sets bitmap to "nullptr" clear preview.
2020-06-21 16:42:46 +02:00
Hüseyin ASLITÜRK
12671e38e7
LibGUI: Add a new Window::is_maximized method
2020-06-18 23:18:11 +02:00
Andreas Kling
033da11364
LibGUI: Fix MessageBox width calculation not including the icon width
2020-06-18 22:18:19 +02:00
Hüseyin ASLITÜRK
0a2dc1f5c0
AboutDialog: Replace Label with Image to show banner and app icon
2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
030d0f9937
MessageBox: Replace Label with Image component to show icons
2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
56e82a2c07
FilePicker: Replace Label with Image component to show icons
2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
ccb0d00020
LibGUI: Add a new GUI::Image component for display images
...
New GUI::Image component for replace Label usage for icons and images.
2020-06-18 16:35:57 +02:00
Sergey Bugaev
0674d9362b
LibGUI: Use Core::File::read_link()
2020-06-17 15:02:03 +02:00
Hüseyin ASLITÜRK
53227f400c
LibGUI: Replace text attribute on KeyEvent with code_point attribute
2020-06-16 13:15:17 +02:00