Age | Commit message (Collapse) | Author |
|
|
|
This patch brings the ConfigFile helpers for opening lib, app and system
configs more inline with the regular ConfigFile::open functions.
|
|
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.
|
|
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).
|
|
|
|
We need to pass --now to `shutdown` command.
|
|
This replaces a bunch of very basic uses of posix_spawn() with the new
Core::Process::spawn().
|
|
|
|
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.
|
|
|
|
This was breaking many places which didn't expect text to wrap. Now,
the only place where text currently wraps is in GUI::Label.
|
|
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.
|
|
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.
|
|
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.
|
|
Also mark them as [[nodiscard]].
|
|
|
|
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.
|
|
|
|
Fixes: #5806
|
|
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.
|
|
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.
|
|
Use shrink-to-fit instead of manually calculating the widget size.
|
|
|
|
|
|
By tracking what virtual desktop a window is on, and what desktop is
being viewed we can show or hide the window buttons accordingly.
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
This adds component declarations so that users can select to not build
certain parts of the OS.
|
|
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.
|
|
This change allows creating sub-categories in app files, e.g. with
Category=Games/Puzzles.
|
|
This reverts commit 800ea8ea969835297dc7e7da345a45b9dc5e751a.
Booting the system no longer worked after these changes.
|
|
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`.
|
|
Instead use default_font().bold_variant() in cases where we want a bold
variant of the default font. :^)
|
|
|
|
|
|
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!
|
|
|
|
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..
|
|
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*>.
|
|
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.
|
|
This updates all existing code to use the auto-generated client
methods instead of post_message/send_sync.
|
|
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.
|
|
We were previously using the magical constant -1 to signify that a
window had no progress state. Be more explicit an use an Optional. :^)
|
|
|
|
Thanks to Katalin Kult for the artwork!
|