Andreas Kling
686ee2bf04
LibGUI: Rename ModelClient::on_model_update() => model_did_update()
...
This follows the typical client callback naming scheme used elsewhere
and doesn't collide with the "on_foo" Function hook convention.
2020-08-13 20:18:11 +02:00
Andreas Kling
82e949aa7c
LibGUI: Rename SortingProxyModel "target" to "source" instead
2020-08-13 20:18:11 +02:00
Andreas Kling
299824de73
LibGUI: Rename GUI::Image => GUI::ImageWidget
...
"Image" was a bit too vague, "ImageWidget" is obviously a widget of
some sort.
2020-07-23 17:31:08 +02:00
Andreas Kling
76523a3d2d
LibGUI: Show the special home directory icon in GUI::FilePicker
2020-07-19 21:42:00 +02:00
Tom
65a11fb5f9
LibGUI: Add InputBox::show with required parent window argument
...
Similar to MessageBox::show, this encourages passing in a window.
2020-07-16 16:10:21 +02:00
Tom
27bd2eab22
LibWeb: Require parent window argument for MessageBox
...
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.
Fix up several message boxes that should have been modal.
2020-07-16 16:10:21 +02:00
Tom
6568765e8f
LibGUI: Add parent window argument to FilePicker functions
...
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
2020-07-16 16:10:21 +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
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
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
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
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
56e82a2c07
FilePicker: Replace Label with Image component to show icons
2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
0799835e15
LibGUI: Use new Bitmap::is_path_a_supported_image_format method
2020-06-15 22:42:23 +02:00
Sergey Bugaev
602c3fdb3a
AK: Rename FileSystemPath -> LexicalPath
...
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
2020-05-26 14:35:10 +02:00
Andreas Kling
977863ea07
LibGUI: Include keyboard modifier state with button on_click calls
...
This will allow you us to implement special behavior when Ctrl+clicking
a button.
2020-05-12 20:31:16 +02:00
Linus Groh
9dbab2d05e
Misc: Replace "String(string_view)" with "string_view.to_string()"
...
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
2020-05-06 19:28:59 +02:00
Ben Wiederhake
cfbc49b5fc
LibGUI: FilePicker: Set initial sort to name instead of undefined
...
Well, technically the initial sort order is 'ascending inode'.
However, that is unpredictable for the user.
In the rare case it is desired, it can be re-enabled by revealing the
inode column, and then sorting by it, in the TableView.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
8e01356b2f
LibGUI: FilePicker: Populate location textbox
2020-05-02 14:12:36 +02:00
Ben Wiederhake
6a453370ad
LibGUI: FilePicker: Fix position of location textbox
2020-05-02 14:12:36 +02:00
Andreas Kling
c45e16f605
LibCore: Add StandardPaths thing to retrieve various standard locations
...
Fixes #1853 .
2020-04-19 19:57:05 +02:00
Andreas Kling
37fc6c117c
Userspace: Add missing #includes now that AK/StdLibExtras.h is smaller
2020-03-08 13:06:51 +01:00
Andreas Kling
b29ff7b821
LibGUI: Don't use Core::Object::add() to instantiate dialogs
...
Now that add() returns a WidgetType&, we can't rely on the parent of a
GUI::Dialog to still keep it alive after exec() returns. This happens
because exec() will call remove_from_parent() on itself before
returning.
And so we go back to the old idiom for creating a GUI::Dialog centered
above a specific window. Just call GUI::Dialog::construct(), passing
the "parent" window as the last parameter.
2020-03-04 21:04:06 +01:00
Andreas Kling
028c011760
LibCore: Make Core::Object::add<ChildType> return a ChildType&
...
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
2020-03-04 21:04:06 +01:00
Andreas Kling
0f3e57a6fb
LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients
2020-03-04 14:26:16 +01:00
Andreas Kling
4697195645
LibGUI: Use set_layout<LayoutType>() in lots of client code
2020-03-04 13:49:48 +01:00
Andreas Kling
a26b63a958
LibGUI: Remove Button& parameter from Button::on_click hook
...
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
2020-03-03 17:02:38 +01:00
Andreas Kling
3523071bb7
LibGUI: Disable the ColumnsView subview in MultiView for now
...
This is causing FilePicker to log a bunch of debug noise due to the
missing support for tree models in SortingProxyModel and it's not
helping anyone so let's just disable it.
This needs fixing in SortingProxyModel.
2020-02-27 14:43:35 +01:00
Andreas Kling
ab9a0780e3
LibGUI: Show the columns view action in the toolbar (but disable it)
...
We'll enable it once ColumnsView is less crashy. :^)
2020-02-24 21:23:00 +01:00
Andreas Kling
a5d7ea24e9
LibGUI: Use MultiView in FilePicker
...
This allows the user to switch between different view modes.
Fixes #1283 .
2020-02-24 20:50:21 +01:00
Andreas Kling
bfd86c4631
LibGUI: Make GUI::Frame have the 2px sunken container look by default
...
The overwhelming majority of GUI::Frame users set the same appearance,
so let's just make it the default.
2020-02-23 11:10:52 +01:00
Andreas Kling
45c25ffecd
LibGUI: Use Core::Object::add() a whole bunch
2020-02-23 11:10:52 +01:00
Andreas Kling
6a9cc66b97
LibGUI: Remove leading G from filenames
2020-02-06 20:33:02 +01:00