Commit graph

296 commits

Author SHA1 Message Date
thankyouverycool 02d94a303c Base+Userland: Apply Human Interface Guidelines to Object text
Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.

Rewords a few actions and dialogs to use uniform language and
punctuation.
2023-05-23 05:59:49 +02:00
Ben Wiederhake f2609281a3 CatDog: Stop recognizing name of deleted program
Inspector was deleted a long time ago in commit
16c47ccff6, and likely isn't coming back
any time soon.
2023-05-17 23:25:51 +02:00
Karol Kosek 945f05ed76 Userland: Port Model::column_name() to String 2023-05-15 06:42:10 +02:00
Lucas CHOLLET 1a97382305 LibGUI: Make Application's construction fallible
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-05-05 16:41:21 +01:00
Cubic Love 240a56d9ce Base+CatDog: Move assets from /icons/ to /graphics/
The graphics directory is a more suitable home for demo assets.
Also, update the example presenter file which uses a CatDog sprite.
2023-05-05 11:52:33 +01:00
thankyouverycool f7e034d4b2 LibGfx+Userland: Merge FrameShape and FrameShadow into FrameStyle
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-30 05:49:46 +02:00
thankyouverycool 91bafc2653 LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
Andreas Kling c756e021a7 Userland: Remove "Inspector" program and related utilities
This program has never lived up to its original idea, and has been
broken for years (property editing, etc). It's also unmaintained and
off-by-default since forever.

At this point, Inspector is more of a maintenance burden than a feature,
so this commit removes it from the system, along with the mechanism in
Core::EventLoop that enables it.

If we decide we want the feature again in the future, it can be
reimplemented better. :^)
2023-04-25 14:48:40 +02:00
Tim Ledbetter 05c8aa71f2 Applications: Update man page links for applications
This commit updates all application man page links to point to the
Applications subdirectory.
2023-04-25 02:16:48 -06:00
Karol Kosek 51bd9ca037 LibGUI+Userland: Make Menu::*add_submmenu take name using new string 2023-04-19 07:59:54 +02:00
Karol Kosek 969543a847 LibGUI+Userland: Make Window::*add_menu take name using new string 2023-04-19 07:59:54 +02:00
thankyouverycool 02a9e5d3f6 LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
2023-04-18 10:05:21 +02:00
Cubic Love 3d10132021 Starfield: Rename starfield_window to starfield_widget
Linus says it should be a widget and not a window!
2023-04-12 19:34:27 +02:00
Cubic Love c3a5618dab Base: Add icons for the Gradient screensaver
Add 32px and 16px application icons for the Gradient screensaver
2023-04-12 19:34:27 +02:00
Cubic Love c6af248909 Demos: Rename GradientScreensaver to Gradient
This brings the name in-line with the naming convention used by the
other screensavers 'Starfield' and 'Tubes'.
2023-04-12 19:34:27 +02:00
Jelle Raaijmakers 48d5cde299 Tubes: Remove unused includes 2023-04-11 06:38:18 -04:00
Jelle Raaijmakers be303facb8 3DFileViewer+Tubes: Add map_fixed to pledges
Both applications eventually reach LibGPU's loading of a dynamic library
(e.g. LibSoftGPU) which requires this pledge.

The pledge was always required, but went unchecked until 01318d8f9b.
2023-04-11 06:38:18 -04:00
Lucas CHOLLET 496b7ffb2b LibGfx: Move all image loaders and writers to a subdirectory 2023-03-21 22:39:25 +01:00
Karol Kosek 797968c310 LibGUI+Userland: Make TabWidget::*add_tab() take title using new string 2023-03-16 09:58:42 +01:00
Nico Weber f1a3028ef1 LibGfx: Change BMPWriter API to be consistent with other image writers 2023-03-12 21:32:21 +01:00
Nico Weber 9b297c634f LibGfx: Make QOIWriter use ErrorOr
In addition to it now handling allocation failures, the encode() API is
now consistent with PNGWriter.
2023-03-12 13:23:34 +00:00
Andreas Kling a504ac3e2a Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
2023-03-10 13:15:44 +01:00
Andreas Kling b4022dc844 Screensaver: Remove outdated comment about NonnullPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling 33e87d1627 Userland: Fix remaining smart pointer const-correctness issues 2023-02-21 00:54:04 +01:00
Sam Atkins 6b66e39df4 LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
2023-02-18 16:56:56 +00:00
Sam Atkins 77ad0fdb07 Userland: Specify margins and spacing in the GUI::Layout constructor 2023-02-18 16:56:56 +00:00
FrHun 90b019b4c4 WidgetGallery: Use dynamic layout techniques in the sliders tab 2023-02-17 16:25:57 +00:00
Tim Schumacher 874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher 606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Karol Baraniecki 506c26acce LibGUI+Userland: Switch order of parameters for InputBox::show
Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
2023-02-04 18:46:39 -07:00
Karol Baraniecki 8095d9276b Userland: Replace manual checking by using GUI::InputType::NonemptyText
Do this where we were already checking if the input was empty after the
InputBox was submitted. Those places gain interactive input validation.

:^)
2023-02-04 18:46:39 -07:00
Linus Groh 9c08bb9555 AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
Tim Schumacher 82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Arda Cinar 8f4c67672c LibGfxDemo: Draw diagonal dotted and dashed lines 2023-01-17 22:54:18 +01:00
Lucas CHOLLET c0ada49a24 WidgetGallery: Use the non-deprecated API of LibFileSystemAccessClient
The patch is tiny as WidgetGallery is only using `LibFSAC` for its file
picker.
2023-01-15 16:39:12 +00:00
Liav A e241b47fee Userland: Remove a bunch of unveil calls on /sys/kernel/processes
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
2023-01-13 13:41:30 +01:00
Sam Atkins e181b1cb82 Userland: Use Core::Timer::create_foo() factory functions where possible 2023-01-12 11:25:51 +01:00
Andreas Kling c55739bbc0 LibGfx: Make Rect::align_within() correct for TopCenter and BottomCenter
Also update the LibGfxDemo to actually show off these alignments.
2023-01-09 19:54:26 +01:00
Andrew Kaster ddf348daeb Everywhere: Use ElapsedTimer::elapsed_time() for comparisons
Simplify a lot of uses of ElapsedTimer by converting the callers to
elapsed_time from elapsed, as the AK::Time returned is better for unit
conversions and comparisons against constants.
2023-01-07 14:51:04 +01:00
Sam Atkins f0395a2042 LibGUI+Userland: Rename try_load_from_gml() -> load_from_gml() :^)
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07 14:39:30 +01:00
Sam Atkins 54b1326165 Userland: Replace all uses of load_from_gml with try_load_from_gml
MOAR FIXMES! ;^)
2023-01-07 14:39:30 +01:00
Karol Kosek 247db3fdd0 LibFileSystemAccessClient: Rename try_* functions to try_*_deprecated
These functions return the deprecated `Core::File` class, so let's mark
it as such to avoid possible confusion between future non try_*
functions which will use Core::Stream family classes and to possibly
grab someone's attention. :^)
2023-01-07 10:53:43 +00:00
Sam Atkins 0c24522635 LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)
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-06 13:36:02 -07:00
MacDue a1726b1ba5 LibGfx: Avoid rounding/truncating glyph positions till blitting
This keeps some overloads that accept ints to avoid adding calls to
.to_type<float>() all over the place.
2023-01-05 12:09:35 +01:00
Timothy Flynn 9c5915b5b4 Screensaver: Add a screensaver launcher application
Similar to the Settings application, this adds a single Screensaver
application to launch all screensaver demos. This is to declutter the
taskbar menu a bit.
2023-01-03 17:56:55 +01:00
Timothy Flynn 10bf86de2c Demos: Rename Screensaver to GradientScreensaver
This is to avoid naming conflicts with an upcoming Screensaver launcher
application.
2023-01-03 17:56:55 +01:00
Andreas Kling 0fe4f4fe53 Demos: Remove "Cube" application
This wasn't doing anything interesting enough to justify being its own
demo application. If we need a spinning cube, we can just load a cube
model into 3DFileViewer. :^)
2023-01-03 15:43:10 +01:00
Ben Wiederhake 6b7ce19161 Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:

\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Andreas Kling 88ebc44cbf Demos: Remove "Mouse" application
This was a plain-looking test app for debugging mouse events.
Mouse events work now, and if we want mouse testing facilities, they
can be added to MouseSettings instead.
2023-01-02 15:29:12 +01:00