Commit Graph

216 Commits

Author SHA1 Message Date
Ben Wiederhake
c214d31c5e Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
Andrew Kaster
8ed5ed3ec0 LibGL: Make GL::create_context fallible
Propagate errors in places that are already set up to handle them, like
WebGLRenderingContext and the Tubes demo, and convert other callers
to using MUST.
2022-09-16 15:32:38 +02:00
Linus Groh
81f1183e28 Tubes: Run clang-format 2022-09-11 23:24:33 +01:00
Jelle Raaijmakers
9dfe50170e Demos: Add Tubes :^) 2022-09-11 22:45:49 +01:00
networkException
1346a653e4 WidgetGallery: Port file picker to use FileSystemAccessClient
Previously we would unveil the home directory of anon to allow showing
anything in the file picker. This patch removes direct access to the
home directory and instead makes WidgetGallery connect to
FileSystemAccessServer to open a file, making the application more user
agnostic and allowing directories outside /home/anon to be shown.
2022-09-10 20:41:16 +01:00
MacDue
b609dd7348 Eyes: Add an option to show/hide the window frame
This works the same as in the Cube demo, and now allows enjoying
the eyes without any obstructions :^)

The window frame can now be disabled with the -h/--hide-window
command-line option, or via toggle in the GUI.
2022-08-25 13:42:17 +02:00
thankyouverycool
0d4fd4e2a6 LibGfx+LibGUI+WindowServer+Apps+Demos: Replace ToolWindows
with the RenderAbove WindowMode. This mode will ensure child
windows always draw above their parents, even when focus is lost.
RenderAbove modals are automatically themed the same as the old
ToolWindows. Fixes ToolWindows rendering above ALL normal windows,
regardless of parent. We can't rely on WindowType to create these
sort of effects because of WindowManager's strict display hierarchy.
2022-08-25 13:28:50 +02:00
thankyouverycool
f833473df0 Apps+Demos+Dialogs: Remove unnecessary minimum window sizes
The new layout system conveniently calculates these for us now.
In the case of Mandelbrot where it needs to be overriden, make
sure to disable obey min widget size first. In EmojiInputDialog's
case, the window needs to be resized instead to center correctly.
2022-08-25 13:28:50 +02:00
Lucas CHOLLET
bee5bcda73 Everywhere: Replace hardcoded anon's uid in unveil path with %uid 2022-08-14 21:52:35 +01:00
Lucas CHOLLET
c5b7c9f479 LibCore+LaunchServer: Move portal directory to /tmp/user/%uid
The `/tmp/user` directory is owned by root, this solution prevents
malicious users to interfere with other users' portals.

This commit also moves `launch`'s portal in the user directory.
2022-08-14 21:52:35 +01:00
Linus Groh
8150d71821 Everywhere: Prefix 'TYPEDEF_DISTINCT_ORDERED_ID' with 'AK_' 2022-07-22 23:09:43 +01:00
Lucas CHOLLET
70846d701c LaunchServer+SystemServer: Move the portal to a user-specific directory
Various changes are needed to support this:
 - The directory is created by Core::Account on login (and located in
   /tmp).
 - Service's sockets are now deleted on exit (to allow re-creation)
 - SystemServer needs to handle SIGTERM to correctly destroy services.
2022-07-19 11:15:14 +01:00
FrHun
dfefd1ec88 WidgetGallery: Make inspectable
WidgetGallery is only a demo anyways, and the perfect target to test the
Inspector.
2022-07-15 12:38:35 +02:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
FrHun
53215be7ae WidgetGallery: Repair GML layout on BasicsTab 2022-07-04 11:15:40 +02:00
FrHun
8dd08d47f1 Applications: Remove usages of deprecated implicit conversions
These deprecated conversions are currently in place to make the system
compile, but they are to be removed soon. This prepares that.
2022-06-28 17:52:42 +01:00
FrHun
8081a8a5de LibGUI: Add layout spacer support to GML
This is a bit of a hack, but it is an easy way to finally get spacers
into GML.
This will translate well if spacers are later to become child objects of
the continer widget.
2022-06-10 21:26:06 +01:00
MacDue
8ac5f625e9 LibGfx: Rename draw_ellipse/circle to fill_ellipse/circle
This makes these functions more consistent with the non-aa painter.
2022-06-01 19:33:45 +02:00
Sam Atkins
cdffe556c8 LibGUI+Userland: Make Dialog::ExecResult an enum class 2022-05-13 16:27:43 +02:00
Sam Atkins
84b98da259 Userland: Set tab-widget properties in GML instead of code 2022-05-11 20:16:43 +02:00
MacDue
739d870091 Fire: Ignore mouse events outside the window (to the left)
This fixes a small issue where if you drag the cursor outside the
window on the left-hand side, the fire demo will still respond to
the mouse events, but wrapped around to the right of the window.
2022-05-08 18:15:12 +02:00
MacDue
934ea4faf1 Fire: Replace #defines with constexprs 2022-05-08 18:15:12 +02:00
EWouters
053fc51b7d Mandelbrot: Remove image export confirmation dialog
Andreas mentioned this dialog is not needed in the monthly update
video[^1].

[^1]: https://youtu.be/yUmHEYs5n34?t=364
2022-05-08 16:38:19 +02:00
MacDue
cf5b6c5c8d Demos/Eyes: Render eyes antialiased
This looks good, and is a good way to test ellipse rendering is
working properly.
2022-05-07 22:59:02 +02:00
Liav A
b401f278ad Userland: Re-organize /dev GPU nodes 2022-05-05 20:55:57 +02:00
EWouters
d3bc3da873 Mandelbrot: Add BMP and QOI image formats as options for export
Inspired by #13558 I added the option to export as QOI to the
Mandelbrot demo. I added BMP as well for completeness.
2022-04-20 08:19:25 -04:00
Simon Wanner
206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MacDue
593aa9aff1 Demos/LibGfxScaleDemo: Use BGRA8888 bitmap in canvas
Previously BGRx8888 was used, which produces artifacts with the new
antialiased window frames with border radii, which require alpha
blending whilst painting.
2022-03-26 18:24:11 +00:00
Lenny Maiorani
f912a48315 Userland: Change static const variables to static constexpr
`static const` variables can be computed and initialized at run-time
during initialization or the first time a function is called. Change
them to `static constexpr` to ensure they are computed at
compile-time.

This allows some removal of `strlen` because the length of the
`StringView` can be used which is pre-computed at compile-time.
2022-03-18 19:58:57 +01:00
Linus Groh
c2d11d5aa0 Eyes: Add 'Contents' action to help menu 2022-03-18 01:10:16 +01:00
Sahan Fernando
683de841e5 Kernel: Sandbox each GPU3DDevice file description into own host context 2022-03-14 17:38:18 +03:30
Sahan Fernando
fd5eaf6494 Demos: Create demo for VirGL gpu device
This is a simple demo for VirGL, that does the bare minimum required to
create and render a spinning cube (with one color per face).
2022-03-09 14:58:48 +03:30
Paulo Henrique Silva
0b3c1b4c79 Mandelbrot: Add Help menu with standard About action
Noticed that Mandelbrot didn't use the standard About action in the Help
menu. As a first patch to Serenity, this patch fixes it.
2022-03-08 18:34:14 +01:00
kleines Filmröllchen
81c042a8cd Demos/CatDog: Show different messages depending on state
There are two new sets of messages for the new application-dependent
main states of CatDog. With the current Array-based system, all message
collections must have the same number of messages, but that's not a
problem.
2022-03-02 18:10:02 +01:00
kleines Filmröllchen
145f983ee1 Demos/CatDog: Introduce inspector & artist states based on open programs
These two new main states are determined by looking at the programs the
user has open. The artist state, using the new artist catdog, is
triggered by PixelPaint and FontEditor, and the inspector state is
triggered by Inspector, Profiler and SystemMonitor. This requires CatDog
to unveil /proc/all, and, for some reason, /etc/passwd.
2022-03-02 18:10:02 +01:00
kleines Filmröllchen
93bb943394 Demos/CatDog: Refactor the main states
CatDog's state was previously handled by a bunch of booleans that all
needed to be in sync pretty accurately, but some of these are exclusive
(like alerted and sleeping). This commit introduces a simple enum for
the main states of CatDog which exclude the roaming and direction
states. The main state determines the standing image of CatDog and will
have further effects in the future.
2022-03-02 18:10:02 +01:00
kleines Filmröllchen
83d9a89275 Demos/CatDog: Let the speech bubble know about the CatDog widget
This will allow us to have better interaction between CatDog's state and
what it's saying.
2022-03-02 18:10:02 +01:00
Itamar
935d023967 Userland: Rename WindowServerConnection=>ConnectionToWindowServer
This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
thankyouverycool
653f01616c LibGUI+Apps: Adjust Splitter spacings
Different thread highlights between widgets lead to different
visual weights between splitters, even when they have the same
width or height. This means some splitters look best at odd
sizes while others even. This sets the default spacing to the
most commonly used, depending on orientation, and adjusts
spacing for a few apps based on the new paint rect.

The most consistent look across apps requires some manual
tweaking occassionally. Knurlheads, use your discretion!
2022-02-23 18:56:22 +02:00
Lenny Maiorani
0ec688f86e Demos: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-02-15 23:00:03 +02:00
Idan Horowitz
c8ab45e79f Userland: Run gml-format
This brings the existing GML files up to spec with the new requirements
2022-02-13 02:36:35 +02:00
kleines Filmröllchen
6ee597369d Meta+Userland: Run the GML formatter on CI and pre-commit
Now that the GML formatter is both perserving comments and also mostly
agrees to the existing GML style, it can be used to auto-format all the
GML files in the system. This commit does not only contain the scripts
for running the formatting on CI and the pre-commit hook, but also
initially formats all the existing GML files so that the hook is
successfull.
2022-02-07 18:39:50 +01:00
Jagger De Leo
742cca4bfe Starfield: Add app icon
Previously, Starfield used app-screensaver icon.
2022-02-01 04:11:56 +00:00
Dmitry Petrov
1662213737 Userland: Add horizontal mouse scroll support 2022-01-20 10:37:52 +01:00
mjz19910
10ec98dd38 Everywhere: Fix spelling mistakes 2022-01-07 15:44:42 +01:00
mjz19910
3102d8e160 Everywhere: Fix many spelling errors 2022-01-07 10:56:59 +01:00
Sam Atkins
f6633a1026 LibGUI+Userland: Make SortingProxyModel::create() return ErrorOr
Unfortunately, most of the users are inside constructors, (and two
others are inside callback lambdas) so the error can't propagate, but
that can be improved later.
2021-12-24 05:11:52 -08:00
Astraeus-
d12359ff20 WidgetGallery: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Astraeus-
1adc808664 Mouse: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00