summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
AgeCommit message (Collapse)Author
2019-08-01GDirectoryModel: Fix redundant identical comparison.Andreas Kling
Found by PVS-Studio.
2019-07-31GDirectoryModel: Tweak default width of permission bits columnAndreas Kling
Now that GTableView elides text content by default, this column was a little too wide and ended up getting elided sometimes.
2019-07-31GTableView: Elide cell content so it doesn't overflow the cell rectAndreas Kling
I originally thought I'd have to implement text clipping in Painter for this, but it seems like I can get away without doing that today. :^) Fixes #390.
2019-07-31LibGUI: Simplify GTreeView ancestor traversalConrad Pankoff
2019-07-31LibGUI: Reify intermediate nodes during index traversalConrad Pankoff
In the event where you want to find the index of a deeply-nested path with a GFileSystemModel that hasn't yet traversed most of that path, it is possible for a false negative failure to occur. This failure is caused by the GFileSystemModel incorrectly bailing out of the search when it hits the first unseen path segment that is not at the very end of the path. This patch fixes this problem by reifying the intermediate nodes during that search and traversal process.
2019-07-31GDirectoryModel: Add "modification time" column.Andreas Kling
Fixes #373.
2019-07-31GVariant: Add Type::UnsignedInt.Andreas Kling
2019-07-31GDirectoryModel: Shrink the Permissions and Inode columns a little bit.Andreas Kling
2019-07-30GFilePicker: Edit file name on opening windowrhin123
Overlooked that you can't have two GWidgets selected at the same time, whoops!
2019-07-29TextEditor: Include extension during SaveAsrhin123
When we save-as in the text editor we now auto-populate GFilePicker /w the current name & extension.
2019-07-29Kernel+ProcessManager: Let processes have an icon and show it in the table.Andreas Kling
Processes can now have an icon assigned, which is essentially a 16x16 RGBA32 bitmap exposed as a shared buffer ID. You set the icon ID by calling set_process_icon(int) and the icon ID will be exposed through /proc/all. To make this work, I added a mechanism for making shared buffers globally accessible. For safety reasons, each app seals the icon buffer before making it global. Right now the first call to GWindow::set_icon() is what determines the process icon. We'll probably change this in the future. :^)
2019-07-28GFilePicker: Quality of life improvements (#370)Rhin
Added: - Default to home directory on open. - Save button focus. - Correct title for the mode were in. - Home directory shortcut.
2019-07-28GTabWidget: Allow putting the tabs on the bottom of the widget.Andreas Kling
They're still painted as if they are top tabs, but the subwidget placement logic is all there.
2019-07-28WindowServer+LibGUI: Remove old "icon path" way of doing things.Andreas Kling
Now that we can set icons directly "by bitmap", there's no need for passing around the icon paths anymore, so get rid of all the IPC and API related to that. :^)
2019-07-28WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.Andreas Kling
Now that we support more than 2 clients per shared buffer, we can use them for window icons. I didn't do that previously since it would have made the Taskbar process unable to access the icons. This opens up some nice possibilities for programmatically generated icons.
2019-07-27TextEditor: Let's have line numbers starting at 1.Andreas Kling
Thanks to Dan for pointing this out on IRC: <danboid> I see TextEditor still numbers its lines from 0. You're too much of a programmer sometimes kling! :) < kling> that might be the most extreme form of "programmer design" I've seen in serenity
2019-07-27LibDraw: Tweak the hover highlight color.Andreas Kling
It was a tad too bright. Also make sure we're using the same color in all the different places. At some point it would be nice to improve global color settings, etc.
2019-07-27GSplitter: Explicitly set the size policies when resizing.Andreas Kling
If we don't have the fixed size policy for the first resizee, the layout system will just ignore the preferred sizes that we're giving it.
2019-07-27GWidget: Remove unused is_widget() virtual.Andreas Kling
This is implemented as a bool member in CObject, not a virtual.
2019-07-27GWidget: Add set_size_policy(Orientation, Policy).Andreas Kling
This allows you to set the policy for a single orientation rather than both at the same time.
2019-07-26LibGUI: GDialog should close its nested event loop on window close.Andreas Kling
Make GWindow::close() so we can override it in GDialog and quit from the internal event loop when the window manager tells us to close ourselves. The dialog will return GDialog::ExecCancel in these situations.
2019-07-25LibCore: Introduce a C_OBJECT macro.Andreas Kling
This macro goes at the top of every CObject-derived class like so: class SomeClass : public CObject { C_OBJECT(SomeClass) public: ... At the moment, all it does is create an override for the class_name() getter but in the future this will be used to automatically insert member functions into these classes.
2019-07-24AK: Make HashMap::get(Key) return an Optional<Value>.Andreas Kling
This allows HashMap::get() to be used for value types that cannot be default constructed (e.g NonnullOwnPtr.)
2019-07-24LibGUI: Convert Vector<OwnPtr> to NonnullOwnPtrVector.Andreas Kling
This is turning out really nice so far. :^)
2019-07-24Convert HashMap<Key, OwnPtr<T>> to HashMap<Key, NonnullOwnPtr<T>>.Andreas Kling
In every case I found, we never wanted to support null entry values. With NonnullOwnPtr, we can encode that at the type level. :^)
2019-07-23LibGUI: Destroy tooltip windows when they are not used.Andreas Kling
Cached tooltip windows were preventing the automatic event loop shutdown. It's not like we were gaining much by caching these anyway, since we only cached the GWindow, not anything on the WindowServer side.
2019-07-23LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().Andreas Kling
This behavior and API was extremely counter-intuitive since our default behavior was for applications to never exit after you close all of their windows. Now that we exit the event loop by default when the very last GWindow is deleted, we don't have to worry about this.
2019-07-23LibGUI: Exit the main event loop when the last window is deleted.Andreas Kling
This behavior is the new opt-out default. If you don't want your app to exit when the last GWindow is destroyed, call this: - void GApplication::set_quit_set_quit_when_last_window_deleted(bool) Also renamed "windows()" to "reified_windows" in GWindow.cpp to reflect that it only contains GWindows that have a server-side representation. :^)
2019-07-22GDirectoryModel: Don't forget to drain the watch descriptor.Andreas Kling
2019-07-22GDirectoryModel: Automagically update on filesystem changes.Andreas Kling
Use the new watch_file() mechanism to monitor the currently open directory for changes and refresh the model when notified. This makes FileManager automagically show newly added files. :^)
2019-07-21Libraries: Fix wrong paths to "Root" in the various install.sh scripts.Andreas Kling
We were installing libraries into /Libraries/Root, rather than in /Root. This made the ports system behave rather unpredictable, since I had old versions of things in /Root and new versions of things in /Libraries/Root.
2019-07-21Libraries: Remove unused "install" targets.Andreas Kling
We've been using a per-directory "install.sh" for some time, so let's get rid of the old way of doing things.
2019-07-20GWidget: Add set_preferred_size(width, height) overload.Andreas Kling
It was annoying to always write set_preferred_size({ width, height }). :^)
2019-07-20GSplitter: Implement using the orientation-based geometry helpers.Andreas Kling
2019-07-20GSlider: Add support for vertical sliders.Andreas Kling
You now have to pass an Orientation to the GSlider constructor. It's not possible to change the orientation after construction. Added some vertical GSliders to the WidgetGallery demo for testing. :^)
2019-07-20LibDraw: Move the Orientation enum to its own LibDraw header file.Andreas Kling
2019-07-18GFilePicker: OKCancel MsgBox for overwriting filesrhin123
Allow the user to Overwrite/Cancel when writing to an existing file.
2019-07-18LibDraw: Introduce (formerly known as SharedGraphics.)Andreas Kling
Instead of LibGUI and WindowServer building their own copies of the drawing and graphics code, let's it in a separate LibDraw library. This avoids building the code twice, and will encourage better separation of concerns. :^)
2019-07-18SharedBuffer: Split the creation and share stepsRobin Burchell
This allows us to seal a buffer *before* anyone else has access to it (well, ok, the creating process still does, but you can't win them all). It also means that a SharedBuffer can be shared with multiple clients: all you need is to have access to it to share it on again.
2019-07-17LibGUI: Revert GWindowServerConnection to being a singletonRobin Burchell
This was a mistake, of course. Nested event loops don't need (or want) independent server connections. We initialize the connection early in GEventLoop for e.g. users that want to get the size of a GDesktop before the connection has been established. Bug noticed by Andreas, introduced by me ;-)
2019-07-17Rename new IPC headers & classesRobin Burchell
Sticking these in a namespace allows us to use a more generic ("Connection") term without clashing, which is way easier to understand than to try to come up with unique names for both.
2019-07-17Port LibGUI to use CIPCClientSideConnectionRobin Burchell
As a consequence, move to use an explicit handshake() method rather than calling virtuals from the constructor. This seemed to not bother AClientConnection, but LibGUI crashes (rightfully) because of it.
2019-07-16LibGUI: Add input types to GMessageBox.Andreas Kling
Currently the two available input types are: - GMessageBox::InputType::OK (default) - GMessageBox::InputType::OKCancel Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
2019-07-16GFilePicker: Changed file_exists MessageBox to warningrhin123
Forgot to remove Error in the title. Going to be replaced by YesNo GMessagebox in the future.
2019-07-15TextEditorWidget: Added improved save feature.rhin123
Instead of saving to a temp file, the TextEditorWidget now saves to a path returned by the improved GFilePicker.
2019-07-15AK: Add a canonicalized_path() convenience function.Andreas Kling
This is the same as calling FileSystemPath(foo).string(). The majority of clients only care about canonicalizing a path, so let's have an easy way to express that.
2019-07-14WindowServer: Add a custom window type for LauncherRobin Burchell
This keeps it out of the taskbar window list. The stacking order is a little gnarly, but it seems to work OK still.
2019-07-13LibGUI: Add an auto-repeat interval to GAbstractButton.Andreas Kling
Use this in GSpinBox to implement auto-increment / auto-decrement while you are pressing down the respective buttons. :^)
2019-07-11GGroupBox: Allow constructing these without an initial text.Andreas Kling
2019-07-11GSlider: Make the knob width proportional to the range, if in that mode (#288)Lawrence Manning
Regardless of mode, made the knob container clickable so the knob position can be moved without dragging the knob itself. Added a 3rd GSlider to the WidgetGallery showing the proportional mode in action.