summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
AgeCommit message (Collapse)Author
2021-08-31Userland: Use Rect::centered_within() where usefulAndreas Kling
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-18Userland+LibGUI: Make Margins arguments match CSS orderingsin-ack
Previously the argument order for Margins was (left, top, right, bottom). To make it more familiar and closer to how CSS does it, the argument order is now (top, right, bottom, left).
2021-08-14Taskbar: Add keyboard shortcuts to the fixed items in the start menuAndreas Kling
2021-08-07Taskbar: Pass full argv for exit actionLuK1337
We need to pass --now to `shutdown` command.
2021-08-06Userland: Use Core::Process::spawn() instead of posix_spawn() in placesAndreas Kling
This replaces a bunch of very basic uses of posix_spawn() with the new Core::Process::spawn().
2021-08-04Taskbar: Use provided AppFile icon instead of finding it ourselvesJelle Raaijmakers
2021-08-03Taskbar: Set chdir to the home directory when opening applicationsKarol Kosek
Although the chdir was set up for the applications opened from the quick launch, the regular application list hadn't do this. This meant that you could open a Terminal or HackStudio project in the root directory, which isn't so bad, but it's better to stick to the user home directory.
2021-08-01Services: Remove unused header includesBrian Gianforcaro
2021-07-27Userland: Make TextWrapping::Wrap opt-insin-ack
This was breaking many places which didn't expect text to wrap. Now, the only place where text currently wraps is in GUI::Label.
2021-07-26Userland: Move text wrapping/elision into the new TextLayout :^)sin-ack
This class now contains all the fun bits about laying out text in a rect. It will handle line wrapping at a certain width, cutting off lines that don't fit the given rect, and handling text elision. Painter::draw_text now internally uses this. Future work here would be not laying out text twice (once actually preparing the lines to be rendered and once to get the bounding box), and possibly adding left elision if necessary. Additionally, this commit makes the Utf32View versions of Painter::draw_text convert to Utf8View internally. The intention is to completely remove those versions, but they're kept at the moment to keep the scope of this PR small.
2021-07-26Taskbar: Unbreak application launchers in the start menuAndreas Kling
Application launcher actions reference their applications by an index into the global `g_apps` table. When skipping over settings apps, we still have to increment the current app identifier.
2021-07-26Taskbar: Show Settings app instead of Settings app categoryAndreas Kling
The Settings app is basically a viewer for the Settings app category anyway, so let's just direct users there instead of having the various settings apps in the start menu.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-20Taskbar: Update the start button width when system fonts changeAndreas Kling
2021-07-20Taskbar: Launch apps in Terminal when RunInTerminal=true is specifiedLinus Groh
This feels a bit awkward right now, and needs code duplication - I think adding a mechanism to the AppFile class to run the executable would be neat, especially if we add an arguments field to app files - but this will do for now.
2021-07-12TaskbarWindow: Redraw start button when default font changesLuK1337
2021-07-10Taskbar: Scale window icon bitmap if it's not 16x16LuK1337
Fixes: #5806
2021-07-08Taskbar: Make clicks at the edges and corners work as expectedAndrea Martinelli
This makes it easy for the user to just throw the mouse at the corner of the screen and obtain the desired outcome (eg. opening the start menu), without having to precisely position the cursor over one of the buttons.
2021-07-08Everywhere: Add break after the last case label before `default`Daniel Bertalan
We already do this in most places, so the style should be consistent. Also, Clang does not like it, as this could cause an unexpected compile error if some statements are added to the default label or a new label is added above it.
2021-07-04Taskbar: Simplify quick launch widget layoutAndreas Kling
Use shrink-to-fit instead of manually calculating the widget size.
2021-07-04Taskbar: Give the "Show/Hide Desktop" button an icon :^)Andreas Kling
2021-07-04Taskbar: Add show desktop button to toggle showing of the desktopForLoveOfCats
2021-07-03Taskbar: Only show the current desktop's window buttonsTom
By tracking what virtual desktop a window is on, and what desktop is being viewed we can show or hide the window buttons accordingly.
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-28Taskbar: Move 'Assistant' Desktop::AppFile to member for quicker accessSpencer Dixon
We care about showing 'Assistant' app as fast as possible when the hotkey is pressed. In order to do that, we can parse the `.af` file ahead of time and have it ready to use.
2021-06-28Assistant+Taskbar: Use AppFile::spawn() utilitySpencer Dixon
2021-06-28Taskbar: Open 'Assistant' with Super+SpaceSpencer Dixon
2021-06-28LibGUI+WindowServer: Add new WMEvent Super+SpaceSpencer Dixon
To make Assistant useful we need a way to quickly trigger it. I've added a new specialized event coming from the window server for when a user is holding down 'Super' and hits 'Space'. The Taskbar will be able to listen for this event and spawn a new instance of the Assistant if it's not already running.
2021-06-22Taskbar: Check if executable in .af exist in filesystemPAUL007
This adds access X_OK check in discover_apps_and_categories() to see executable specified in .af files exist before registering them for start menu.
2021-06-20WindowServer: Add initial support for rendering on multiple screensTom
This allows WindowServer to use multiple framebuffer devices and compose the desktop with any arbitrary layout. Currently, it is assumed that it is configured contiguous and non-overlapping, but this should eventually be enforced. To make rendering efficient, each window now also tracks on which screens it needs to be rendered. This way we don't have to iterate all the windows for each screen but instead use the same rendering loop and then only render to the screen (or screens) that the window actually uses.
2021-06-17Everywhere: Add component declarationsGunnar Beutner
This adds component declarations so that users can select to not build certain parts of the OS.
2021-06-04Taskbar: Make sure LibGUI/Desktop.h is usable in portsGunnar Beutner
Now that Desktop.h includes Services/Taskbar/TaskbarWindow.h we have to install Taskbar's header files so that Desktop.h can be used in ports or when building software in-target.
2021-06-04Taskbar: Allow creating menus for sub-categoriesGunnar Beutner
This change allows creating sub-categories in app files, e.g. with Category=Games/Puzzles.
2021-05-21Revert "Userland: static vs non-static constexpr variables"Linus Groh
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a. Booting the system no longer worked after these changes.
2021-05-21Userland: static vs non-static constexpr variablesLenny Maiorani
Problem: - `static` variables consume memory and sometimes are less optimizable. - `static const` variables can be `constexpr`, usually. - `static` function-local variables require an initialization check every time the function is run. Solution: - If a global `static` variable is only used in a single function then move it into the function and make it non-`static` and `constexpr`. - Make all global `static` variables `constexpr` instead of `const`. - Change function-local `static const[expr]` variables to be just `constexpr`.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
2021-05-16Taskbar: Make shutdown dialog non-resizable and tweak button spacingAndreas Kling
2021-05-16Taskbar: Give the shutdown dialog a UI facelift :^)Andreas Kling
2021-05-13Userland: Tighten a *lot* of pledges! :^)Andreas Kling
Since applications using Core::EventLoop no longer need to create a socket in /tmp/rpc/, and also don't need to listen for incoming connections on this socket, we can remove a whole bunch of pledges!
2021-05-10WindowServer+Taskbar: Make all the IPC used by Taskbar asynchronousAndreas Kling
2021-05-09Taskbar+LibGUI+WindowServer: Shrink taskbar by one pixelAndreas Kling
Make the taskbar 27 pixels tall instead of 28. This makes the button icons and applets vertically centered. On a related note, this required touching *way* too many places..
2021-05-08AK: Add missing GenericTraits<NonnullRefPtr>Itamar
This enables us to use keys of type NonnullRefPtr in HashMaps and HashTables. This commit also includes fixes in various places that used HashMap<T, NonnullRefPtr<U>>::get() and expected to get an Optional<NonnullRefPtr<U>> and now get an Optional<U*>.
2021-05-03Userland: Make IPC results with one return value available directlyGunnar Beutner
This changes client methods so that they return the IPC response's return value directly - instead of the response struct - for IPC methods which only have a single return value.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-02LibGfx: Unify Rect, Point, and SizeMatthew Olsson
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
2021-05-02WindowServer+LibGUI+Taskbar: Store window progress as Optional<int>Andreas Kling
We were previously using the magical constant -1 to signify that a window had no progress state. Be more explicit an use an Optional. :^)
2021-05-01Everywhere: Turn #if *_DEBUG into dbgln_if/if constexprGunnar Beutner
2021-04-25Userland+Base: Add "ladyball" logo for the system :^)Andreas Kling
Thanks to Katalin Kult for the artwork!