summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
AgeCommit message (Collapse)Author
2023-05-23LibGfx+Everywhere: Change `Gfx::Rect` to be endpoint exclusiveJelle Raaijmakers
Previously, calling `.right()` on a `Gfx::Rect` would return the last column's coordinate still inside the rectangle, or `left + width - 1`. This is called 'endpoint inclusive' and does not make a lot of sense for `Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would return 4 as its right side. This same problem exists for `.bottom()`. This changes `Gfx::Rect` to be endpoint exclusive, which gives us the nice property that `width = right - left` and `height = bottom - top`. It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly the same. All users of `Gfx::Rect` have been updated accordingly.
2023-05-05LibGUI: Make `Application`'s construction fallibleLucas CHOLLET
The pattern to construct `Application` was to use the `try_create` method from the `C_OBJECT` macro. While being safe from an OOM perspective, this method doesn't propagate errors from the constructor. This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually define a `create` method that can bubble up errors from the construction stage. This commit also removes the ability to use `argc` and `argv` to create an `Application`, only `Main`'s `Arguments` can be used. From a user point of view, the patch renames `try_create` => `create`, hence the huge number of modified files.
2023-04-30LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStylethankyouverycool
Previously, Frames could set both these properties along with a thickness to confusing effect: Most shapes of the same shadowing only differentiated at a thickness >= 2, and some not at all. This led to a lot of creative but ultimately superfluous choices in the code. Instead let's streamline our options, automate thickness, and get the right look without so much guesswork. Plain shadowing has been consolidated into a single Plain style, and 0 thickness can be had by setting style to NoFrame.
2023-04-30LibGUI+Userland: Port Labels to Stringthankyouverycool
2023-04-19LibGUI+Userland: Make Menu::*add_submmenu take name using new stringKarol Kosek
2023-04-19Userland: Construct Menus with name using the non-deprecated StringKarol Kosek
2023-04-15LibGfx+Userland: Add width_rounded_up() helperthankyouverycool
2023-04-15AK+Everywhere: Change URL::path() to serialize_path()MacDue
This now defaults to serializing the path with percent decoded segments (which is what all callers expect), but has an option not to. This fixes `file://` URLs with spaces in their paths. The name has been changed to serialize_path() path to make it more clear that this method will generate a new string each call (except for the cannot_be_a_base_url() case). A few callers have then been updated to avoid repeatedly calling this function.
2023-03-24Taskbar: Use Process::spawn_or_show_error() for shutdown actionsMacDue
2023-03-24Taskbar: Use Process::spawn_or_show_error() to open the "Run" dialogMacDue
2023-03-24Taskbar: Use GUI::Process::spawn_or_show_error() to launch appsMacDue
And while here make a partial fix for launching terminal apps that require root and contain spaces in their name/path.
2023-03-10Everywhere: Support overriding the system color schemeimplicitfield
2023-03-04Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()Andreas Kling
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
2023-02-25Everywhere: Use _{short_,}string to create Strings from literalsLinus Groh
2023-02-18LibGUI+Userland: Stop returning Layout from `Widget::(try_)set_layout()`Sam Atkins
Nobody uses this return value any more. It also lets us remove a whole bunch of `(void)` casts. :^)
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-18Userland: Use Widget::add_spacer() everywhereSam Atkins
2023-02-13Userland: Set Button text using the new String classKarol Kosek
2023-02-13LibGUI+TaskBar: Make Calendar::formatted_date() return ErrorOr<String>Karol Kosek
This commit introduces no error propagation.
2023-02-13Userland: Replace usages of AbstractButton::text_deprecated with text()Karol Kosek
2023-02-13LibGUI+Userland: Add `_deprecated` suffix to AbstractButton::{set_,}textKarol Kosek
2023-01-27Taskbar: Remove declarations for non-existent methodsSam Atkins
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-12LibCore+Userland: Don't auto-start new Core::TimersSam Atkins
This was unintuitive, and only useful in a few cases. In the majority, users had to immediately call `stop()`, and several who did want the timer started would call `start()` on it immediately anyway. Case in point: There are only two places I had to add a manual `start()`.
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
Rip that bandaid off! This does the following, in one big, awkward jump: - Replace all uses of `set_main_widget<Foo>()` with the `try` version. - Remove `set_main_widget<Foo>()`. - Rename the `try` version to just be `set_main_widget` because it's now the only one. The majority of places that call `set_main_widget<Foo>()` are inside constructors, so this unfortunately gives us a big batch of new `release_value_but_fixme_should_propagate_errors()` calls.
2023-01-03LibDesktop+Taskbar: Add an option to exclude apps from the system menuTimothy Flynn
We currently hard-code excluding Settings apps from the system menu. This adds an "ExcludeFromSystemMenu" option to the AppFile configuration to selectively exclude these apps, which all Settings app now set. This is to allow selectively excluding a few Demo apps in a future commit.
2023-01-03LibGfx: Make Font::width() return a floatAndreas Kling
2023-01-02Everywhere: Fix badly-formatted includesBen Wiederhake
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on Userland/Libraries/, whereas this commit cleans up the remaining headers in the repo, and any new badly-formatted include.
2022-12-27Taskbar: Propagate more errors on widget populationthankyouverycool
2022-12-27Taskbar: Load Assistant's AppFile on window creationthankyouverycool
Fixes crashing when spawning Assistant by shortcut
2022-12-26Taskbar: Handle errors when adding/changing quick launch entriesArda Cinar
This patch removes 2 FIXMEs :^)
2022-12-26Taskbar: Add a factory function for TaskbarWindowArda Cinar
This means the errors all the way from Individual widgets get propagated up.
2022-12-26Taskbar: Add a factory function for QuickLaunchWidgetArda Cinar
This helps propagate errors that might happen when constructing the quick launch menu. However, the errors are not propagated all the way yet.
2022-12-23Taskbar: Propagate errors while loading bmpericLemanissier
2022-12-14LibGfx+Userland: Make Gfx::SystemTheme propagate errorsCygnix Proto
This patch introduces error propagation to Gfx::SystemTheme to remove instances of release_value_but_fixme_should_propagate_errors(). Userland applications that have been affected by this change have been updated to utilise this propagation and as a result 4 such instances of the aforementioned method have been removed.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-26Taskbar: Unbreak SDL2 port by changing include pathJelle Raaijmakers
Ports would not be able to find `QuickLaunchWidget.h` this way.
2022-11-26Taskbar: Removed the awkward window reference structArda Cinar
2022-11-26Taskbar: Made it possible to add a system menu to taskbar laterArda Cinar
This makes it possible to construct the taskbar before the system menu and remove the awkward reference in Taskbar/main.cpp
2022-11-26Taskbar: Rename start_menu to system_menuArda Cinar
The main menu in GUI (the one in the lower left side of screen by default) was called start_menu in some parts of the code and system_menu in others. In the documentation, it was referred to as "system menu". So, in order to be consistent, these variables are all renamed to system_menu
2022-11-19LibGUI+Taskbar+Applets+Applications: Set various windows as Popupsthankyouverycool
Makes the Audio applet, Taskbar clock, CommandPalette, EmojiPicker, and Assistant work as Popup windows. Popups are frameless, unmovable, and unresizable by default, in addition to their preemptive function. Also sets Assistant not to obey widget min size so its search result area resizes correctly
2022-11-19LibGUI+WindowServer+Applets+Taskbar: Remove active input conceptsthankyouverycool
and the CaptureInput mode. They are a source of unneeded complexity in WindowServer and have proven prone to regressions, so this patch replaces them with a simple input preemption scheme using Popups. Popup windows now have ergonomics similar to menus: When open, a popup preempts all mouse and key events for the entire window stack; however, they are fragile and will close after WindowServer swallows the first event outside them. This is similar to how combo box windows and popups work in the classic Windows DE and has the added benefit of letting the user click anywhere to dismiss a popup without having to worry about unwanted interactions with other widgets.
2022-11-14Taskbar: Support launching apps that require rootSamuel Bowman
If an app file has RequiresRoot=true, launch the app with the requsite setuid binary. For GUI apps, this is Escalator. For app files with RunInTerminal=true, this is pls.
2022-11-13Userland: Accept drag_enter events for widgets supporting file dropsKarol Kosek
This patch will switch cursor to DragCopy when a user enters a widget while dragging file(s), giving them a visual clue that it *might* be dropped into this widget. This is a rather naive approach, as the cursor icon will change for any kind of file, as currently programs don't know the drag contents before dropping it. But after all I think it's better than nothing. :^)
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-17LibDesktop+Taskbar: Add 'WorkingDirectory' property to app filescflip
2022-10-09Taskbar: Display an icon for removing a widgetimplicitfield
2022-09-29Calendar: Only accept Calendar notificationsimplicitfield
Previously, changing the time format caused Taskbar to crash. This commit also simplifies TaskbarWindow::config_string_did_change() so that it is in line with the changes made to Calendar::config_string_did_change(). Fixes #15384
2022-09-22Taskbar: Add a context menu to open clock settings from the clock widgetTimothy Flynn