Commit graph

195 commits

Author SHA1 Message Date
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
Ben Wiederhake b83cb09db1 Everywhere: Fix badly-formatted includes
In 7c5e30daaa, the focus was "only" on
Userland/Libraries/, whereas this commit cleans up the remaining
headers in the repo, and any new badly-formatted include.
2023-01-02 11:06:15 -05:00
Tim Schumacher ed4c2f2f8e LibCore: Rename Stream::read_all to read_until_eof
This generally seems like a better name, especially if we somehow also
need a better name for "read the entire buffer, but not the entire file"
somewhere down the line.
2022-12-12 14:16:42 +01:00
Linus Groh 57dc179b1f Everywhere: Rename to_{string => deprecated_string}() where applicable
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-06 08:54:33 +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 4aa608aa71 LibGUI+Taskbar+Applets+Applications: Set various windows as Popups
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-19 16:04:42 +01:00
thankyouverycool 24d299c9c8 LibGUI+WindowServer+Applets+Taskbar: Remove active input concepts
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-19 16:04:42 +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 6e508573a0 Applets: Use new global variables at /sys/kernel/ directory 2022-10-25 15:33:34 -06: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
Sam Atkins ef507720f0 Applets/ResourceGraph: Port to Core::Stream 2022-09-18 18:57:28 -07:00
Sam Atkins 474a38bd3c Applets/Network: Stop marking methods virtual unnecessarily
None of these are overridden, and NetworkWidget is a final class.
2022-09-18 18:57:28 -07:00
Sam Atkins eacf017112 Applets/Network: Remove include_loopback parameter
This is always false, so we can do without it and simplify things a
little.
2022-09-18 18:57:28 -07:00
Sam Atkins c8bfb07b41 Applets/Network: Port to Core::Stream 2022-09-18 18:57:28 -07:00
networkException 802cf9bc69 Everywhere: Use my very shiny serenityos.org email :^) 2022-09-12 15:13:12 +01:00
Cr4xy ac60633694 Keymap: Rename context menu item "Settings" to "Keyboard Settings"
This is a very small change to improve consistency between applet
context menu item names.
2022-09-09 18:59:04 +01:00
thankyouverycool 1f1ac99ef9 WindowServer+WorkspacePicker: Adjust active and inactive colors
Now uses the Selection ColorRole for the active desktop and a
slightly darkened Window for inactive ones. Several themes use
the same color for thread highlighting and inactive windows which
was causing frames to draw without the correct perception of depth.
2022-08-16 16:41:47 +02:00
Lucas CHOLLET 4f87f03bd1 Base: Launch AudioServer at session start-up 2022-08-14 21:52:35 +01:00
Lucas CHOLLET b01822bdd4 Base: Launch NotificationServer at session start-up 2022-08-14 21:52:35 +01:00
Andreas Kling bddbb49923 WorkspacePicker: Add missing unveil(nullptr, nullptr)
Thanks Dex for pointing this out! :^)
2022-08-14 14:41:45 +02:00
Andreas Kling 6744930f4a WorkspacePicker: Tweak applet height and draw frame around desktop rects 2022-08-14 12:50:50 +02:00
Andreas Kling 2121760700 WorkspacePicker: Allow opening workspace settings via a context menu
Previously you had to open Display Settings and navigate to the
"Workspaces" tab in order to edit workspace settings. This patch adds a
context menu shortcut to the same place.
2022-08-14 02:28:25 +02:00
Andreas Kling 419e986dcc WorkspacePicker: Hide tray applet entirely when there's only 1 workspace
Instead of collapsing to a 1x1 applet, we now hide the applet window
entirely, which stops it from taking up space in the system tray.
2022-08-01 10:29:53 +02:00
networkException 7d177b7210 WorkspacePicker: Immediately update active workspace on click or scroll
This patch makes the picker applet react instantly to a click on a
workspace or scroll on the widget, instead of waiting for an event from
WindowServer and as such until the switching animation has ended. This
synchronises the switching with the overlay shown.

Note that WindowServer events will still get handled in case the
workspace were to be updated from somewhere else.
2022-07-22 21:54:20 +01:00
networkException b3f8734e22 WorkspacePicker: Use full words for some variable names
This patch updates the spelling of "col" to be "column" and
"v{col,row}s" to be spelled out as "workspace_{row,column}s".
2022-07-22 21:54:20 +01:00
Timur Sultanov 9906f41e01 Keymap+WindowServer: Add context menu to keymap applet
Adding a context menu which lists configured keymaps and allows
setting the active keymap
2022-07-21 16:40:47 +02:00
kleines Filmröllchen 3f59356c79 LibAudio: Rename ConnectionFromClient to ConnectionToServer
The automatic nomenclature change for IPC sockets got this one wrong.
2022-07-19 11:17:45 +01:00
Liav A e4e5fa74d0 Kernel+Userland: Rename prefix of user_physical => physical
There's no such supervisor pages concept, so there's no need to call
physical pages with the "user_physical" prefix anymore.
2022-07-14 23:27:46 +02:00
Filiph Sandström a1ddc44c07 WorkspacePicker: Hide applet if size == 0 2022-07-13 00:51:48 +02:00
sin-ack c8585b77d2 Everywhere: Replace single-char StringView op. arguments with chars
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).

No functional changes.
2022-07-12 23:11: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
sin-ack e5f09ea170 Everywhere: Split Error::from_string_literal and Error::from_string_view
Error::from_string_literal now takes direct char const*s, while
Error::from_string_view does what Error::from_string_literal used to do:
taking StringViews. This change will remove the need to insert `sv`
after error strings when returning string literal errors once
StringView(char const*) is removed.

No functional changes.
2022-07-12 23:11:35 +02:00
sin-ack 60f6bc902b Userland: Convert command line arguments to String/StringView
StringView was used where possible. Some utilities still use libc
functions which expect null-terminated strings, so String objects were
used there instead.
2022-07-12 23:11:35 +02:00
MacDue 5aad6a4378 Applets: Use spawn_or_show_error() for common spawn pattern 2022-06-03 12:29:56 +01:00
Olivier De Cannière 6c202ee4a9 LibGUI: Fix typo in ConnectionToWindowManagerServer 2022-06-01 19:31:34 +02:00
MacDue 623ad4a42a Applets/ResourceGraph: Open network monitor when clicking network graph
(Previously, it would open the performance monitor tab)
2022-05-28 21:52:44 +02:00
MacDue 7c8541b914 Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI 2022-05-25 23:14:22 +01:00
MacDue 3fc0350caf LibCore: Return ErrorOr<pid_t> and support arguments in Process::spawn
This makes the wrapper more like the rest in LibCore, and also
removes the annoying limitation of not supporting arguments.

There are three overloads one for String, char const *, and StringView
argument lists. As long as there are <= 10 arguments the argv list
will be allocated inline, otherwise on the heap.
2022-05-25 23:14:22 +01:00
kleines Filmröllchen 49b087f3cd LibAudio+Userland: Use new audio queue in client-server communication
Previously, we were sending Buffers to the server whenever we had new
audio data for it. This meant that for every audio enqueue action, we
needed to create a new shared memory anonymous buffer, send that
buffer's file descriptor over IPC (+recfd on the other side) and then
map the buffer into the audio server's memory to be able to play it.
This was fine for sending large chunks of audio data, like when playing
existing audio files. However, in the future we want to move to
real-time audio in some applications like Piano. This means that the
size of buffers that are sent need to be very small, as just the size of
a buffer itself is part of the audio latency. If we were to try
real-time audio with the existing system, we would run into problems
really quickly. Dealing with a continuous stream of new anonymous files
like the current audio system is rather expensive, as we need Kernel
help in multiple places. Additionally, every enqueue incurs an IPC call,
which are not optimized for >1000 calls/second (which would be needed
for real-time audio with buffer sizes of ~40 samples). So a fundamental
change in how we handle audio sending in userspace is necessary.

This commit moves the audio sending system onto a shared single producer
circular queue (SSPCQ) (introduced with one of the previous commits).
This queue is intended to live in shared memory and be accessed by
multiple processes at the same time. It was specifically written to
support the audio sending case, so e.g. it only supports a single
producer (the audio client). Now, audio sending follows these general
steps:
- The audio client connects to the audio server.
- The audio client creates a SSPCQ in shared memory.
- The audio client sends the SSPCQ's file descriptor to the audio server
  with the set_buffer() IPC call.
- The audio server receives the SSPCQ and maps it.
- The audio client signals start of playback with start_playback().
- At the same time:
  - The audio client writes its audio data into the shared-memory queue.
  - The audio server reads audio data from the shared-memory queue(s).
  Both sides have additional before-queue/after-queue buffers, depending
  on the exact application.
- Pausing playback is just an IPC call, nothing happens to the buffer
  except that the server stops reading from it until playback is
  resumed.
- Muting has nothing to do with whether audio data is read or not.
- When the connection closes, the queues are unmapped on both sides.

This should already improve audio playback performance in a bunch of
places.

Implementation & commit notes:
- Audio loaders don't create LegacyBuffers anymore. LegacyBuffer is kept
  for WavLoader, see previous commit message.
- Most intra-process audio data passing is done with FixedArray<Sample>
  or Vector<Sample>.
- Improvements to most audio-enqueuing applications. (If necessary I can
  try to extract some of the aplay improvements.)
- New APIs on LibAudio/ClientConnection which allows non-realtime
  applications to enqueue audio in big chunks like before.
- Removal of status APIs from the audio server connection for
  information that can be directly obtained from the shared queue.
- Split the pause playback API into two APIs with more intuitive names.

I know this is a large commit, and you can kinda tell from the commit
message. It's basically impossible to break this up without hacks, so
please forgive me. These are some of the best changes to the audio
subsystem and I hope that that makes up for this :yaktangle: commit.

:yakring:
2022-04-21 13:55:00 +02:00
Sam Atkins 73552c1856 Userland: Always construct Application with try_create() 2022-04-18 12:57:34 +02:00
Simon Wanner 206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Sam Atkins c0ca6e470f AK+Userland: Rename Array::front/back to first/last
This is the name that is used for every other collection type so let's
be consistent.
2022-04-06 14:31:52 +02:00
kleines Filmröllchen 8da0cf7912 Applets: Add a network graph applet
This resource graph applet shows incoming network traffic graphically,
and the tooltip shows both TX and RX. The data of all adapters is
combined. The scale of the applet auto-adapts to the shown traffic load.

Co-authored-by: bgianfo <bgianf@serenityos.org>
2022-04-03 09:49:08 -07:00
Idan Horowitz 086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
thankyouverycool 5c27ce2561 ClipboardHistory: Show ranges and max dimensions for copied glyphs
Makes copy history a bit more informative by showing the code point
range of the selection copied, or the individual character if the
selection contains only one glyph.
2022-03-18 01:12:26 +01:00
Andreas Kling a6a8ba80fc LibGfx: Rename Color::from_rgba() => Color::from_argb()
This matches the rename of RGBA32 to ARGB32. It also makes more sense
when you see it used with 32-bit hexadecimal literals:

Before:
    Color::from_rgba(0xaarrggbb)

After:
    Color::from_argb(0xaarrggbb)
2022-03-04 23:40:21 +01:00
Itamar af132fdbd1 Userland: Rename WindowManagerServerConnection
Rename WindowManagerServerConnection=>ConnectionToWindowManagerServer.

This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar 3a71748e5d Userland: Rename IPC ClientConnection => ConnectionFromClient
This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-25 22:35:12 +01:00
thankyouverycool 10afd5a721 Applets: Update Audio applet FrameShape and adjust dimensions
Uses the new Window FrameShape. Fixes margins for erroneously
elided CheckBoxes. Demystifies the numbers used to calculate the
slider window rect.
2022-02-25 19:38:23 +01:00
Nícolas F. R. A. Prado eebdd86fbd ClipboardHistory: Add Time column
Add a Time column to ClipboardHistory that shows the time when each
item in the list was copied.
2022-02-24 08:47:55 +01:00
Lenny Maiorani f2d8c488ec Userland/Applets: 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-13 21:27:17 +00:00
Vitaly Dyachkov 32b8795091 LibConfig: Rename pledge_domains(String) => pledge_domain(String)
pledge_domains() that takes only one String argument was specifically
added as a shortcut for pledging a single domain. So, it makes sense to
use singular here.
2022-02-11 18:06:39 +01:00
Maciej 99e3e42fa5 Keymap Applet: Spawn KeyboardSettings when clicking 2022-02-04 21:30:31 +01:00
Timur Sultanov b9c558f6c6 WindowServer+Keymap+LibGUI: Add widget to display current keymap 2022-02-03 00:47:22 +01:00
kleines Filmröllchen 4efe6210ee Applets/Audio: Use Array for the volume level bitmaps 2022-01-28 23:40:25 +01:00
Dmitry Petrov 1662213737 Userland: Add horizontal mouse scroll support 2022-01-20 10:37:52 +01:00
sin-ack 2e1bbcb0fa LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServer
This change unfortunately cannot be atomically made without a single
commit changing everything.

Most of the important changes are in LibIPC/Connection.cpp,
LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp.

The notable changes are:
- IPCCompiler now generates the decode and decode_message functions such
  that they take a Core::Stream::LocalSocket instead of the socket fd.
- IPC::Decoder now uses the receive_fd method of LocalSocket instead of
  doing system calls directly on the fd.
- IPC::ConnectionBase and related classes now use the Stream API
  functions.
- IPC::ServerConnection no longer constructs the socket itself; instead,
  a convenience macro, IPC_CLIENT_CONNECTION, is used in place of
  C_OBJECT and will generate a static try_create factory function for
  the ServerConnection subclass. The subclass is now responsible for
  passing the socket constructed in this function to its
  ServerConnection base; the socket is passed as the first argument to
  the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before
  any other arguments.
- The functionality regarding taking over sockets from SystemServer has
  been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket
  implementation of this functionality hasn't been deleted due to my
  intention of removing this class in the near future and to reduce
  noise on this (already quite noisy) PR.
2022-01-15 13:29:48 +03:30
kleines Filmröllchen be6418cc50 Everywhere: Use my new serenityos.org e-mail :^) 2022-01-14 11:54:09 +01:00
creator1creeper1 d92558b3b3 Applets/Audio: Propagate errors by extracting out GUI initialization
This commit extracts out the GUI initialization in AudioWidget into
the new try_initialize_graphical_elements function. This function
is now able to use try_set_main_widget instead of set_main_widget.
It's only called by the fallible try_create method.
2022-01-11 09:19:09 -08:00
creator1creeper1 b4eed25872 Applets/ResourceGraph: Propagate errors in create_applet
We now return an error if we fail to parse the applet spec in the
expected format. We can now also use try_set_main_widget instead of
set_main_widget.
2022-01-11 09:19:09 -08:00
Maciej 310fdd87d1 ClipboardHistory: Update to new glyph format 2022-01-09 00:18:46 +01:00
creator1creeper1 74d1eb6502 Applets/ResourceGraph: Propagate errors in JSON decoding 2022-01-03 16:01:42 +01:00
creator1creeper1 e46f08ff33 Applets/Network: Propagate errors using custom try_create
We now move-construct the bitmaps into the NetworkWidget.
2022-01-03 16:01:42 +01:00
creator1creeper1 f125d52622 Applets/Network: Propagate errors with try_set_main_widget
Use try_set_main_widget instead of set_main_widget.
2022-01-03 16:01:42 +01:00
creator1creeper1 43ecf1d429 Applets/Audio: Propagate errors using custom try_create
We now move-construct the bitmaps into the AudioWidget.
2022-01-03 16:01:42 +01:00
creator1creeper1 a550c20c35 Applets/Audio: Propagate errors with try_set_main_widget
Use try_set_main_widget instead of set_main_widget.
2022-01-03 16:01:42 +01:00
Elyse c78a8b94c5 Everywhere: Refactor 'muted' to 'main_mix_muted' in all AudioConnections
The 'muted' methods referred to the 'main mix muted' but it wasn't
really clear from the name. This change will be useful because in the
next commit, a 'self muted' state will be added to each audio client
connection.
2021-12-24 00:19:01 -08:00
Astraeus- 3e4e055c76 ClipboardHistory: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Andreas Kling c3733bea92 Applets/ClipboardHistory: Port to LibMain :^) 2021-12-04 14:24:04 +01:00
Jelle Raaijmakers 2565f458d1 ClipboardHistory: Add debug dump action
This allows for easy dumping of clipboard data to the debug console.
2021-11-30 10:52:18 +01:00
Brian Gianforcaro cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Ralf Donau f53bc19b8a Applets/Audio: Remove unveiling /tmp/portal/config 2021-11-24 19:46:03 +01:00
Andreas Kling 365379bcb1 Applets/Audio: Port to LibMain :^) 2021-11-24 00:25:23 +01:00
Andreas Kling 24bf74a177 WorkspacePicker: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Andreas Kling 51484bec82 Applets: Rename DesktopPicker => WorkspacePicker
This is consistent with the rest of the system.
2021-11-23 15:44:59 +01:00
Andreas Kling b03f8d18c5 Applets/Network: Port to LibMain :^)
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling 21a5fb0fa2 LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Mustafa Quraish 4d302e0e88 Everywhere: Use Application::construct() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Mustafa Quraish 2fbcab46bf Everywhere: Use ArgsParser::parse() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Andreas Kling b65a039db7 Applets/ResourceGraph: Port to LibMain :^)
This simplifies a bunch of calls to pledge() and unveil().
2021-11-22 23:52:47 +01:00
Andreas Kling d0db6c472c Applets/ResourceGraph: Remove unnecessary unveiling of /etc/passwd
This used to be needed by Core::ProcessStatisticsReader, but since we no
longer use that for the CPU graph, we can just lose it (along with a
FIXME about it.)
2021-11-22 23:52:47 +01:00
Ben Wiederhake d6c686e8bf ClipboardHistory: Properly display bitmap depth 2021-11-21 11:49:06 +00:00
Ben Wiederhake f22c0ffe0c LibGUI+Everywhere: Make sync requests to Clipboard server more obvious 2021-11-21 11:49:06 +00:00
Andreas Kling 587f9af960 AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)
Also add slightly richer parse errors now that we can include a string
literal with returned errors.

This will allow us to use TRY() when working with JSON data.
2021-11-17 00:21:10 +01:00
Andreas Kling d21dc1f451 Everywhere: Replace "virtual desktop" => "workspace" 2021-11-13 12:48:43 +01:00
Andreas Kling 235f39e449 LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
Ben Wiederhake 465af4c4d4 Applications: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
2021-11-02 22:56:53 +01:00
Filiph Sandström d6a0726302 Everywhere: Rename left/right-click to primary/secondary
This resolves #10641.
2021-10-27 22:05:58 +03:00
Idan Horowitz 350c5a751d ResourceGraph: Use /proc/stat instead of /proc/all for CPU usage stats
This results in a quite large speedup, as generating /proc/all takes a
very long time.
2021-10-07 21:09:38 +02:00
thankyouverycool 92fffc3abc LibGUI: Rename CallOnChange => AllowCallback and implement elsewhere
This is a helpful option to prevent unwanted side effects, distinguish
between user and programmatic input, etc. Sliders and SpinBoxes were
implementing it idiosyncratically, so let's generalize the API and
give Buttons and TextEditors the same ability.
2021-09-22 21:35:42 +02:00
David Isaksson 122f440672 AudioApplet: Refactor window resizing 2021-09-19 21:52:32 +02:00
David Isaksson df32f1b7de AudioApplet: Get values from AudioServer instead of the config file 2021-09-19 21:52:32 +02:00
David Isaksson bd48abab8b AudioApplet: Make sure to set the internal volume on slider change
This fixes the issue that the percent label doesn't update.
2021-09-19 21:52:32 +02:00
David Isaksson 3f6ccf63fe AudioApplet: Round the volume to the nearest integer 2021-09-19 21:52:32 +02:00
David Isaksson c1458e8061 AudioApplet: Update the volume slider on update from audio server 2021-09-19 21:52:32 +02:00
Mustafa Quraish 441e601689 ClipboardHistory: Listen for configuration changes
Resize the clipboard history size dynamically by listening for config
changes. This is currently not ideal since we don't have the callbacks
for `Config::Listener::config_i32_did_change`, so for now we are just
taking the string and attempting to convert it to an int.
2021-09-18 03:33:25 +00:00
Mustafa Quraish b1a3bb638b ClipboardHistory: Use config file to set number of history items
The number of items in history was hardcoded to 20 earlier, now
we try to load this value from a config file. The default if none
is available is still 20.
2021-09-18 03:33:25 +00:00
kleines Filmröllchen 152ec28da0 Audio: Change how volume works
Across the entire audio system, audio now works in 0-1 terms instead of
0-100 as before. Therefore, volume is now a double instead of an int.
The master volume of the AudioServer changes smoothly through a
FadingProperty, preventing clicks. Finally, volume computations are done
with logarithmic scaling, which is more natural for the human ear.

Note that this could be 4-5 different commits, but as they change each
other's code all the time, it makes no sense to split them up.
2021-09-12 23:38:57 +02:00