Commit Graph

49 Commits

Author SHA1 Message Date
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
Lucas CHOLLET
a33a490d48 Magnifier: Port to Core::Stream 2023-01-08 20:08:18 +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
FrHun
f413033a50 Magnifier: Add ability to drag the location when it is locked 2022-12-23 12:16:46 +00:00
FrHun
9d3debcbbe Magnifier: Remember grid color 2022-12-23 12:16:46 +00:00
FrHun
79f5c49afe Magnifier: Eliminate flickering when downsizing
Previously the content flickered when downsizing the window, because the
previously grabbed frame was still active, but was now too large for the
window.
This crops the source rect to a size where it now perfectly fits the
content area.
2022-12-23 12:16:46 +00:00
FrHun
9e0deb76b2 Magnifier: Prevent 0 size that otherwise hangs 2022-12-23 12:16:46 +00:00
FrHun
808eafcf1e Magnifier: Add option to choose grid color 2022-12-23 12:16:46 +00:00
FrHun
2b635b5330 Magnifier: Add option to display grid over the image 2022-12-23 12:16:46 +00:00
FrHun
837625e422 Magnifier: Allow locking location at current cursor position 2022-12-23 12:16:46 +00:00
Lucas CHOLLET
9ae97c8cb1 LibFileSystemAccessClient: Rename try_save_file =>
`try_save_file_deprecated`

This precedes the addition of a new api using `Core::Stream`
2022-12-14 18:26:25 +00:00
thankyouverycool
31f4ec66c5 Magnifier: Add a manual to Help menu and propagate construction errors 2022-12-10 13:15:35 +01:00
thankyouverycool
5e96ad0345 Magnifier: Standardize File menu
File->Quit should appear as the final item in its menu
2022-12-10 13:15:35 +01:00
thankyouverycool
f8e0bcbedf Magnifier: Remove always_on_top_action
This action was originally added so that Magnifier's window would
always be on top by default, but it's a redundant menu item and wasn't
actually setting itself at start-up. Instead, rely on the same menu
item provided to all Modeless windows by default for a more consistent
UX, and set the option after show() so it takes effect.
2022-12-10 13:15:35 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
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-12-06 08:54:33 +01:00
thankyouverycool
e99277611b Magnifier+ThemeEditor: Use CommonMenus::make_accessibility_menu() 2022-11-19 11:04:11 +01:00
Tim Schumacher
ce2f1b845f Everywhere: Mark dependencies of most targets as PRIVATE
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-11-01 14:49:09 +00:00
Liav A
5dfb2b18f3 Applications: Use new global variables at /sys/kernel/ directory 2022-10-25 15:33:34 -06:00
demostanis
34acae90c7 Userland: Let applications make use of make_command_palette_action() 2022-10-25 10:21:18 +01:00
crpz1
87a9462b7f Magnifier: Increase window size
The help menu was not visible prior to this.
2022-10-21 17:16:01 +01:00
crpz1
466e0c4846 Magnifier: Add Always on Top 2022-10-21 17:16:01 +01:00
Ali Mohammad Pur
166a905951 Userland: Properly populate GENERATED_SOURCES
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
2022-10-12 15:55:15 +01:00
Timothy Flynn
7cab86ad28 Userland: Unveil /proc/all in applications which require it
These were missed in 7af5eef. It is needed for any application using
e.g. FileSystemAccessServer.
2022-10-03 17:09:21 +01:00
Timothy Flynn
25e0ab3ee4 Userland: Tighten promises by removing 'proc' where it isn't used
This is a partial revert of commit 7af5eef. After 97d15e9, the 'proc'
promise is not needed for operations using getsid().

This also fixes launching several applications in which 7af5eef added
the 'proc' promise only in the second call to pledge().
2022-10-03 17:09:21 +01:00
Peter Elliott
7af5eef0dd SystemServer+LoginServer+Userland: Switch to sid-based sockets
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
2022-10-03 11:11:29 +02:00
MacDue
ddfe18783b Magnifier: Don't error if cancelling capture save 2022-10-01 14:06:53 +02:00
Roberto Bampi
69f7a59a34 Magnifier: Add the option to save captures 2022-09-26 17:28:54 +01: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
Sam Atkins
73552c1856 Userland: Always construct Application with try_create() 2022-04-18 12:57:34 +02:00
Brian Gianforcaro
9cfd520bb8 Applications: Use default execpromises parameter to pledge(..) 2022-04-03 17:13:51 -07:00
Itamar
935d023967 Userland: Rename WindowServerConnection=>ConnectionToWindowServer
This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Lenny Maiorani
160bda7228 Applications: 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-14 22:06:55 +00:00
electrikmilk
91d27bd484 Magnifier: Add missing icons
Add icons for 'Next Frame' and 'Previous Frame'.
2022-02-13 15:17:09 -05:00
TheGrizzlyDev
2905642550 Magnifier: Add colorblind preview options
Add the same preview options as the theme editor so you can test the
accessibility of anything on your desktop. Both tools share the same
shortcuts.
2021-12-28 23:59:56 +01:00
Junior Rantila
5238308d6f Magnifier: Add timeline for easy checking of animations
This patch adds a 512 frame timeline to Magnifier and the ability to
step through it with the arrow keys.

This makes it easier to check Serenity animations frame by frame for
correctness etc.
2021-12-20 10:48:03 -08:00
Marcus Nilsson
c91eebfbaa Magnifier: Use LibMain
Use the new serenity_main construct and TRY in Magnifier.
2021-11-28 10:10:35 -08:00
Marcus Nilsson
401ea85655 Magnifier: Add 8x magnification and pausing
This adds an option for even more magnification, when you really need to
count pixels, as well as pausing the capture by pressing Space and
switching between magnification levels with keys 2, 4 & 8.
2021-09-17 23:48:42 +02:00
Ben Wiederhake
0a69da08aa Magnifier: Remove unnecessary global cursor tracking 2021-09-08 10:53:49 +02:00
Andreas Kling
687a12d7fb Userland: Add GUI::Window::add_menu() and use it everywhere
Applications previously had to create a GUI::Menubar object, add menus
to it, and then call GUI::Window::set_menubar().

This patch introduces GUI::Window::add_menu() which creates the menubar
automatically and adds items to it. Application code becomes slightly
simpler as a result. :^)
2021-07-21 21:24:26 +02:00
Andreas Kling
3368e54224 Magnifier: Make a custom 16x16 icon for this app + tweak 32x32 version
Stop piggybacking on the generic "find" icon and make a custom one. :^)
2021-07-04 23:15:17 +02:00
Andreas Kling
3e63633e1c Magnifier: Make the main widget a GUI::Frame
This makes the magnifier window look slightly nicer. :^)
2021-07-04 23:15:16 +02:00
Andreas Kling
782a5c88ce WindowServer: Make most remaining WindowServer IPC calls async
The only remaining sync call from client to server is now the call
that switches a window's backing store. That one actually relies on
the synchronization to hand over ownership of the backing stores,
so it has to stay synchronous for now.
2021-07-04 23:15:16 +02:00
Gunnar Beutner
631d36fd98 Everywhere: Add component declarations
This adds component declarations so that users can select to not build
certain parts of the OS.
2021-06-17 11:03:51 +02:00
Andreas Kling
cb295ab644 WindowServer+Magnifier: Make Magnifier buttery smooth :^)
This patch moves the magnifier rect computation over to the server side
to ensure that the mouse cursor position and the screen image never get
out of sync.
2021-06-07 10:22:25 +02:00
Andreas Kling
0ea1fd2d54 Magnifier: Use a GUI::DisplayLink to drive the screen captures
This ensures that we don't try to update more often than the screen
is updated. It also avoids doing synchronous IPC in paint_event().
2021-06-07 10:22:25 +02:00
Eugene Barnett
cab2ee5ea2 Magnifier: Add desktop display scale awareness
Continues to magnify correctly at the most current
desktop scale.
2021-06-06 15:56:43 +02:00
Andreas Kling
31d4bcf5bf Userland: Tighten a *lot* of pledges! :^)
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-13 23:28:40 +02:00
Linus Groh
8afcd22900 Magnifier: Make window resizable
Instead of having the window non-resizable, it now defaults to a frame
size of 200 x 200 pixels but is user-resizable. The shown screenshot
updates its size accordingly. :^)
Sometimes we might need a larger view, or a non-square shape.
2021-05-11 18:01:55 +02:00
Valtteri Koskivuori
4d01183f5c Userland: Implement a magnifier app
This utility is useful for making sure those UI elements are pixel
perfect. A simple 2x/4x magnification around the mouse cursor, shown in
a window.
2021-05-11 10:18:29 +01:00