Commit Graph

1574 Commits

Author SHA1 Message Date
Tobias Christiansen
f47026b1d6 PixelPaint: Add Filter Gallery Dialog to the Filter Menu
This patch adds the bare bones of the new Filter Gallery.
For now, only the gml and the basic layout got added, a fairly boringw
indow pops up when "Filter Gallery" is called.

The code for the Model used by the TreeView is taken in large parts from
HackStudio's VariableModel.
2022-01-01 14:38:59 +01:00
Conor Byrne
2042a4d1e1 VideoPlayer: Port VideoPlayer to LibMain 2022-01-01 04:28:34 +00:00
Elyse
173a84a2ef LibGUI+SoundPlayer: Use 'decrease_slider_by_page_steps()' method
This method allow us to avoid repeating the pattern
'set_value(value() - page_step() * page_number)'.
2021-12-30 14:31:50 +01:00
Elyse
0d660b27ae LibGUI+SoundPlayer: Use 'increase_slider_by_page_steps()'
This method allow us to avoid repeating the pattern
'set_value(value() + page_step() * page_number)'.
2021-12-30 14:31:50 +01:00
Elyse
086615535f Everywhere: Use 'decrease_slider_by()' method from AbstractSlider
The same idea as 'increase_slider_by()', it helps us to avoid repeating
the pattern 'set_value(value() - delta)'.
2021-12-30 14:31:50 +01:00
Elyse
d53e1fa1fa Everywhere: Use 'increase_slider_by()' method from AbstractSlider
This method help us to avoid repeating the pattern
'set_value(value() + delta)'.
2021-12-30 14:31:50 +01:00
Timothy Flynn
565a880ce5 Userland: Link directly against LibUnicodeData where needed
This is partially a revert of commits:
    10a8b6d411
    561b67a1ad

Rather than adding the prot_exec pledge requried to use dlopen(), we can
link directly against LibUnicodeData in applications that we know need
that library.

This might make the dlopen() dance a bit unnecessary. The same purpose
might now be fulfilled with weak symbols. That can be revisted next, but
for now, this at least removes the potential security risk of apps like
the Browser having prot_exec privileges.
2021-12-30 14:18:12 +01:00
Luke Wilde
8eb01c0b11 ImageViewer: Allow choice between nearest neighbor and bilinear scaling
Currently, ImageViewer always uses nearest neighbor scaling.
This allows the user to choose whether to use nearest neighbor
or bilinear scaling. It current defaults to nearest neighbor.
2021-12-29 17:58:32 +01: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
Maciej
ab324c1dae ImageViewer: Change how scaling works
- Store scale as a (float) factor (not as %)
- Make scaling exponential so that matches PixelPaint and another
image viewers/editors/etc
2021-12-28 23:23:09 +01:00
Andreas Kling
ac7ce12123 Kernel: Remove the kmalloc_eternal heap :^)
This was a premature optimization from the early days of SerenityOS.
The eternal heap was a simple bump pointer allocator over a static
byte array. My original idea was to avoid heap fragmentation and improve
data locality, but both ideas were rooted in cargo culting, not data.

We would reserve 4 MiB at boot and only ended up using ~256 KiB, wasting
the rest.

This patch replaces all kmalloc_eternal() usage by regular kmalloc().
2021-12-28 21:02:38 +01:00
TheGrizzlyDev
ebaf211260 ThemeEditor: Implement a way to simulate color blindness in preview
Implement a mechanism that allows us to alter colors so that they
mimic those a colorblind person would see. From the color we can then
alter the colors for the whole preview so we can simulate everything
in the theme including icons/decorations.

This filter is also available as a Filter in LibGfx so it can be
reused in multiple other places.

The color simulation algorithm is based on this one
https://github.com/MaPePeR/jsColorblindSimulator publicly available.
2021-12-28 17:10:44 +01:00
Maciej
00d1dbb95b TextEditor: Highlight AF files as INI 2021-12-28 11:36:12 +01:00
Rummskartoffel
561b67a1ad Help: Fix crash when trying to load libunicodedata.so 2021-12-28 01:31:46 +01:00
Julian Offenhäuser
5bc7a18a04 FileManager: Add "Create Archive" action
This option will appear when you select one or more files or
directories. It will then ask the user to enter a name for the new
archive (or use the current directories' name if left empty) and
create it under that name in the currently opened directory.

Note that only .zip files are currently supported.
2021-12-28 01:14:52 +01:00
Sam Atkins
d702678d16 LibJS+WebContent+Browser+js: Implement console.group() methods
This implements:
- console.group()
- console.groupCollapsed()
- console.groupEnd()

In the Browser, we use `<details>` for the groups, which is not actually
implemented yet, so groups are always open.

In the REPL, groups are non-interactive, but still indent any output.
This looks weird since the console prompt and return values remain on
the far left, but this matches what Node does so it's probably fine. :^)
I expect `console.group()` is not used much outside of browsers.
2021-12-27 21:44:07 +01:00
Rummskartoffel
ab2c5eebec Help: Fix memory leak given ambiguous man page title on command line
Given a command line with an ambiguous man page title, such as `$ Help
uname`, Help would find and try to open all matching pages, leading to
bad behavior such as a memory leak, flickering scrollbars, and
eventually a crash due to OOM. This commit fixes the issue by making
Help only open one page on startup.
2021-12-27 12:01:31 +01:00
Andreas Kling
e815bf5d1f PDFViewer: Add a basic set of pledges 2021-12-25 10:58:30 +01:00
Sam Atkins
eefe471dce SystemMonitor: Remove unused SortingProxyModel include 2021-12-24 05:11:52 -08: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
Elyse
46b1c2d609 SoundPlayer: Add a keyboard shortcut 'M' to mute the player
This shortcut let us mute/unmute the player, but it still doesn't update
the volume slider because the actual volume widget can't display a muted
state.
2021-12-24 00:19:01 -08:00
Elyse
8f2161c0ee SoundPlayer: Add 'mute' methods to Player
These methods allow us to mute/unmute the player without needing to
modify the volume level that it has.
2021-12-24 00:19:01 -08:00
Max Trussell
c8eab80b3d SoundPlayer: Sync startup loop and show playlist settings in GUI
This fix syncs up the AudioPlayer's internal state for showing
playlist information with the AudioPlayer's GUI. Before, if the
AudioPlayer was opened with a playlist file (.m3u or .m3u8) it would
automatically show the playlist information in the GUI and set the
loop mode to playlist, but the menu options would be unchecked. In
order to hide the playlist information, the menu option would then
have to be toggled twice -- once on and again off.
2021-12-24 00:05:35 -08:00
Arne Elster
277ac48649 HexEditor: Don't unnecessarily abbreviate variable names
There's enough line space to use readable variable names.
2021-12-23 23:25:47 -08:00
Arne Elster
9f38966105 HexEditor: Make HexDocuments final
There's no reason as to why someone would inherit those, so might
aswell make them final.
2021-12-23 23:25:47 -08:00
Arne Elster
af754211fa HexEditor: Scroll back to the top when opening another file
When a file is opened and scrolled to some position and the user opens
another file, the current scroll position stays the same. That's
disorienting. Therefore, when opening another file, scroll back to the
top.
2021-12-23 23:25:47 -08:00
Arne Elster
fd66dda1d7 HexEditor: Stream input files instead of keeping them in memory
To support editing of large files it is an advantage to not load the
entire file into memory but only load whatever is needed for display at
the moment. To make it work, file access is abstracted into a socalled
HexDocument, of which there two: a memory based and a file based one.
The former can be used for newly created documents, the latter for file
based editing.

Hex documents now do track changes instead of the HexEditor. HexEditor
only sets new values. This frees HexEditor of some responsibility.
2021-12-23 23:25:47 -08:00
creator1creeper1
4b2b0a4d0e Calculator: Make double construction and conversion private
At this point, the double conversions should really only be
implementation details of the KeypadValue class. Therefore,
the constructor-from double and conversion-operator-to
double of KeypadValue are made private. Instead, the
required functionality is provided by KeypadValue itself.
The internal implementation is still done using doubles.
However, this opens us up to the possibility of having
loss-free square root, inversion and division in the future.
2021-12-22 00:43:13 -08:00
r00ster91
b6d921f682 PixelPaint: Refactor falloff computation and extend hardness range 2021-12-21 13:52:55 -08:00
creator1creeper1
cacac7927b Calculator: Construct KeypadValue precisely from the Clipboard contents
Previously, we would use lossy strtod() conversion. This was bad,
especially since we switched from internally storing Calculator
state in a double to storing it in the KeypadValue class
some time ago. This commit adds a constructor for the KeypadValue
class that is not lossy by using strtoll(). It handles numbers
with and without decimal points as well as negative numbers
correctly.
2021-12-21 13:22:12 -08:00
Timothy Flynn
10a8b6d411 Userland: Add unveil/pledge requisites for dynamic Unicode data loading
Loading libunicodedata.so will require dlopen(), which in turn requires
mmap(). The 'prot_exec' pledge is needed for this.

Further, the .so itself must be unveiled for reading. The "real" path is
unveiled (libunicodedata.so.serenity) as the symlink (libunicodedata.so)
itself cannot be unveiled.
2021-12-21 13:09:49 -08:00
Ali Mohammad Pur
f0709c7a24 LibC+AK: Implement all sorts of wprintf variants 2021-12-21 21:24:36 +03:30
Sam Atkins
85a54261b3 Help: Include page names in the search
This fixes the problem before, where searching "Shell" would list
"Shell-vars" in the results, but searching "Shell-vars" would make it
disappear.

Also removed some now-unnecessary includes.
2021-12-20 10:58:41 -08:00
Sam Atkins
8461f8c1cd Help: Add support for launching with a section and page, like man
I found it strange that `man` and `Help` did not accept the same command
line arguments since they are so similar. So... now they do. :^)

This means you can now open for example the `tar` man page in Help with
`Help tar`, or `Help 1 tar` if you want to disambiguate between pages in
different sections.

If the result is not found, it falls back to the previous behavior,
treating the input as a search query.

Initially I had this written as two optional positional arguments, but
when told to parse `[optional int] [optional string]`, and then given a
string input, ArgsParser forwards it to the [optional int], which then
fails to parse. Ideally it would pass it to the second, [optional
string] arg instead, but that looks like a fairly big change to make to
ArgsParser's internals, and risk breaking things. Maybe this ugly hack
will be an incentive to fix it. :^)
2021-12-20 10:58:41 -08:00
Sam Atkins
4c91f736c7 Help: Move update_actions() code into open_page()
These two lambdas are always called together, in this order, so why not
make them one instead?

Also converted a couple of west-consts to east-const.
2021-12-20 10:58:41 -08:00
Sam Atkins
4bf2ef2a4c Help: Always show the welcome page on launch if nothing else is there
Previously, launching Help with a query like `Help tar` left the page
blank, which looks like something has gone wrong. Instead, let's show
the usual welcome page.
2021-12-20 10:58:41 -08: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
Junior Rantila
105f741131 Piano: Make Key_Space shortcut to toggle playback 2021-12-20 10:39:37 -08:00
Idan Horowitz
d82c91ac2c SystemMonitor: Add back accidentally removed veil lock
Since the call to lock the veil was missing, the protections provided
by unveil() were not actually enabled.
2021-12-19 13:41:35 +01:00
Astraeus-
eb1f00a940 AnalogClock: Port to LibMain 2021-12-17 13:09:54 -08:00
Astraeus-
eec6ae0d07 About: Port to LibMain 2021-12-17 13:09:54 -08:00
RasmusNylander
fa99125571 Spreadsheet: Handle emptying of cell containing only an '='
Cell::set_data(String new_data) now checks whether the cell is a
formula-cell and the new_data is an empty string. If this is case, it
will no longer simply return and will now instead actually set the
cell's contents to an empty string.

This fixes an error whereupon committing the string "=" to a cell, it
would not be possible to directly delete the cell's contents. Instead,
it first had to be overwritten with another string, which then could be
deleted.

This could probably be done more elegantly. Right now, I believe,
writing the string "=" to a (formula-)cell already containing an
identical string will result in the cell being marked as dirty, even
though nothing actually changed.
2021-12-16 02:44:37 +03:30
Ali Mohammad Pur
5f1a34bba3 Spreadsheet: Avoid using Value.to_string_without_side_effects()
We should use .to_string() and handle the possible exceptions.
This makes the displayed cell contents so much more informative than
'[object Object]' :^)
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
235eb0b1ad Spreadsheet: Replace hacky JS VM configuration with a more correct one
Now we give each sheet its own interpreter and realm, and only make them
share the VM.
This is to prepare for the next commit, which will be refactoring a
bunch of things to propagate exceptions via ThrowCompletionOr<T>.
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
82dde46a30 Spreadsheet: Replace the help button's text with something we can render 2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
91444de2cf Spreadsheet: Reimplement ranges as lazy objects instead of arrays
Doing so makes it possible to talk about theoretically infinite ranges
like "all of column A".
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
892e585e9a Spreadsheet: Don't recreate the global environment on every evaluation
The worksheet's realm does not change, and is not shared, so we can
safely leave the global environment be.
This fixes lexical scoping in the spreadsheet's runtime file.
2021-12-12 14:49:49 +03:30
Sahan Fernando
49ed168ced Userland: Use File::lines() range-based for loop where appropriate 2021-12-12 14:06:38 +03:30
Undefine
312bac1967 Mail: Ask the user if they want to see the mail settings 2021-12-11 15:09:54 -08:00
Jose Flores
65df30d00c Piano: Add track controls to the player widget
Adds the ability to add a track and cycle through the
tracks from player widget. Also displays the current track
being played or edited in a dropdown that allows
for quick track selection.
2021-12-11 23:07:21 +01:00
bugreport0
1a2ff38609 CrashReporter: Remove redundant pledge() 2021-12-11 23:06:56 +01:00
Daniel Bertalan
4a81b33c07 Everywhere: Fix -Winconsistent-missing-override warnings from Clang
This option is already enabled when building Lagom, so let's enable it
for the main build too. We will no longer be surprised by Lagom Clang
CI builds failing while everything compiles locally.

Furthermore, the stronger `-Wsuggest-override` warning is enabled in
this commit, which enforces the use of the `override` keyword in all
classes, not just those which already have some methods marked as
`override`. This works with both GCC and Clang.
2021-12-11 13:14:15 -08:00
Sam Atkins
54bbb97ac6 Browser+LibWeb+WebContent: Add variables display to Inspector
This allows us to see which custom properties apply to a given element,
which previously wasn't shown.
2021-12-10 06:52:17 +01:00
scwfri
8d0143a380 HackStudio+TextEditor: Persist EditingEngineType across editors
Persist EditingEngine mode in HackStudio and TextEditor when opening new
files or editing splits. Previously, the EditingEngine defaulted to a
RegularEditingEngine for a new Editor, even if Vim Emulation had been
selected in the existing Editor.
2021-12-09 21:31:06 +01:00
Ben Wiederhake
13cba5f8b4 Spreadsheet: Avoid implicitly copying ByteBuffer 2021-12-08 09:46:13 -08:00
Sam Atkins
3ca2aee054 Applications: Cast unused smart-pointer TRY return values to void 2021-12-05 15:31:03 +01:00
Sam Atkins
d2024f04bd Userland: Cast unused BackgroundAction::construct() results to void
User code does not need to keep this alive, so casting to void is safe.
But maybe a bit weird.
2021-12-05 15:31:03 +01:00
Elyse
8595fd585d SoundPlayer: Port to LibMain :^) 2021-12-04 15:07:18 -08:00
Andreas Kling
96e4077c38 SystemMonitor: Port to LibMain :^)
There's a lot more work to do on this application to take full advantage
of TRY() etc. This patch just scratches the surface.
2021-12-04 14:24:04 +01:00
Andreas Kling
01228bf4ef CrashReporter: Port to LibMain and use TRY() while building the UI :^) 2021-12-04 14:24:04 +01:00
Jelle Raaijmakers
a4603fbc06 3DFileViewer: Add checkbox to disable texture 2021-12-01 10:21:13 +01:00
Andreas Kling
fc0a040e5d CrashReporter: Remove unnecessary button height overrides from GML 2021-11-30 23:34:40 +01:00
Andreas Kling
85eb0eaad0 CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"
"Inspect in Hack Studio" was a bit vague.
2021-11-30 23:34:40 +01:00
Erik Biederstadt
e052d647b7 Spreadsheet: Allow sheet renaming after double clicking on the tabwidget 2021-12-01 00:44:26 +03:30
thankyouverycool
298a6b9937 LibGUI+FontEditor: Allow ComboBox on_change callback to be toggled
When calling set_selected_index() on ComboBox, allow its on_change
callback to be disabled. Fixes FontEditor window state erroneously
switching to modified when initializing between different slopes
and weights.
2021-11-30 10:51:51 +01:00
thankyouverycool
ca062d83db FontEditor: Convert to east const 2021-11-30 10:51:51 +01:00
thankyouverycool
de77e28360 FontEditor: Correct member type and initialization in UndoGlyph
Makes code_point type u32, consistent with the rest of the system,
and properly initializes it.
2021-11-30 10:51:51 +01:00
thankyouverycool
e3e3c03dca FontEditor: Remove unused Vector<String> 2021-11-30 10:51:51 +01:00
thankyouverycool
ca77aea099 FontEditor: Correct NewFontDialog layout issues
Fixes incorrect scale initialization and inconsistent margins, sets
minimum values for glyph width and height to 1, and labels page 1
more precisely as "Typeface" properties.
2021-11-30 10:51:51 +01:00
thankyouverycool
9b184fc1cb FontEditor: Clean up GlyphMapWidget header
Fixes minor organizational inconsistency and zeroes initializations
for rows and columns as the previous values haven't been meaningful
since the map was converted to a scrollable widget. No functional
changes.
2021-11-30 10:51:51 +01:00
thankyouverycool
7d73d2dfc8 FontEditor: Remove superfluous 'this' pointers 2021-11-30 10:51:51 +01:00
thankyouverycool
e29abc5395 LibGfx+FontEditor: Consolidate BitmapFont width and height limits
And make them more self-documenting. Previously these constraints
were duplicated across multiple files.
2021-11-30 10:51:51 +01:00
thankyouverycool
541f1de3a8 FontEditor: Add scaled offset members to GlyphEditor
Previously these were undescriptive globals making them a bit cryptic.
2021-11-30 10:51:51 +01:00
thankyouverycool
aa09e40eb2 FontEditor: Update status bar on initialization
Fixes incorrect glyph status immediately after loading a new font.
2021-11-30 10:51:51 +01:00
thankyouverycool
ae922c67fd FontEditor: Remove code duplication when resizing GlyphEditor
The left column now also enforces a minimum width to prevent especially
small fonts from hiding the glyph toolbars and width widgets.
2021-11-30 10:51:51 +01:00
thankyouverycool
c1744822a1 FontEditor: Account for glyph width when pasting
Fixes glyphs not expanding up to their maximum width if necessary
when pasting larger glyphs into smaller ones.
2021-11-30 10:51:51 +01:00
thankyouverycool
281805696b FontEditor: Don't allow cutting and copying absent glyphs
And update status bar on cut. Fixes placing these effectless actions
on the undo stack.
2021-11-30 10:51:51 +01:00
thankyouverycool
d2b211f14a FontEditor: Don't null check newly created NonnullRefPtr fonts 2021-11-30 10:51:51 +01:00
thankyouverycool
74938e6f42 FontEditor: Factor out redundant code for a request to close 2021-11-30 10:51:51 +01:00
thankyouverycool
1e052f5a91 FontEditor: Convert mode and transform buttons into toolbar actions
This will let us more easily organize and assign shortcuts to new
modes and transformations as they are built, and it generally looks
more polished as a uniform interface. Also adds a counterclockwise
option to the rotate action, moves Copy as Character to the edit
menu as it doesn't directly impact GlyphEditor, and makes the paint
and move modes exclusive checkables to make the editor's state more
visually obvious.
2021-11-30 10:51:51 +01:00
thankyouverycool
922e80e72b FontEditor: Simplify start-up
Previusly a cloned or newly loaded font was moved twice from main to
the constructor and then from constructor to an init routine where it
was finally used. The unmasked font is now moved only once, directly
to initialization, and redundant error checking is discarded.
2021-11-30 10:51:51 +01:00
thankyouverycool
56a8a2b493 FontEditor: Use LibUnicode to convert character case
Fixes characters beyond the Basic Latin code block not showing
their upper-case form in the preview window.
2021-11-30 10:51:51 +01:00
thankyouverycool
edf86af4f4 LibGfx+FontEditor: Add helper to determine raw glyph presence
GlyphBitmaps are considered present if they have a width greater
than zero. This adds a counterpart method for raw (unmasked) glyphs
and makes intent more explicit throughout FontEditor.
2021-11-30 10:51:51 +01:00
Jelle Raaijmakers
61e4c09514 3DFileViewer: Set correct aspect ratio in view frustum 2021-11-29 22:11:41 +00:00
Jelle Raaijmakers
dcc7d7d566 3DFileViewer: Improve FPS display
We only showed frame times down to the millisecond. Our FPS counter was
based off of that, allowing for a limited set of possible FPS values.

Convert these calculations to floating point so we get more useful FPS
and frame time values.
2021-11-29 11:44:01 +00:00
kleines Filmröllchen
96d02a3e75 LibAudio: New error propagation API in Loader and Buffer
Previously, a libc-like out-of-line error information was used in the
loader and its plugins. Now, all functions that may fail to do their job
return some sort of Result. The universally-used error type ist the new
LoaderError, which can contain information about the general error
category (such as file format, I/O, unimplemented features), an error
description, and location information, such as file index or sample
index.

Additionally, the loader plugins try to do as little work as possible in
their constructors. Right after being constructed, a user should call
initialize() and check the errors returned from there. (This is done
transparently by Loader itself.) If a constructor caused an error, the
call to initialize should check and return it immediately.

This opportunity was used to rework a lot of the internal error
propagation in both loader classes, especially FlacLoader. Therefore, a
couple of other refactorings may have sneaked in as well.

The adoption of LibAudio users is minimal. Piano's adoption is not
important, as the code will receive major refactoring in the near future
anyways. SoundPlayer's adoption is also less important, as changes to
refactor it are in the works as well. aplay's adoption is the best and
may serve as an example for other users. It also includes new buffering
behavior.

Buffer also gets some attention, making it OOM-safe and thereby also
propagating its errors to the user.
2021-11-28 13:33:51 -08:00
Marcus Nilsson
5217202737 ThemeEditor: Use LibMain
Use the new serenity_main construct and TRY in ThemeEditor.
2021-11-28 10:10:35 -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
Andreas Kling
60c132d7d3 LibGUI: Move GUI::SettingsWindow setup out of the constructor
In order to propagate errors that occur during UI setup, we have to move
all that logic out of widget/window subclass constructors. This is a
first attempt at doing that, for GUI::SettingsWindow.
2021-11-28 08:54:22 +01:00
Andreas Kling
acd4cc97fc KeyboardSettings: Remove some unnecessary pledge promises
This program doesn't need to create or write files directly.
2021-11-28 08:54:22 +01:00
Andreas Kling
45844f9338 LibGUI: Make GUI::SettingsWindow::add_tab() return ErrorOr
This allows us to use TRY() when creating settings UI.
2021-11-28 08:10:53 +01:00
Andreas Kling
7c19e86a50 TerminalSettings: Remove unnecessary pledges and unveils 2021-11-28 08:10:53 +01:00
Andreas Kling
6b862d5063 TerminalSettings: Port to LibMain :^) 2021-11-28 08:10:53 +01:00
Andreas Kling
8a11e986e5 MailSettings: Port to LibMain :^) 2021-11-28 08:10:53 +01:00
Andreas Kling
984cf1fe7a DisplaySettings: Port to LibMain :^) 2021-11-28 08:10:53 +01:00
Brian Gianforcaro
cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Brian Gianforcaro
eb896aa33e Settings: Convert to TRY + serenity_main(..) 2021-11-28 08:04:57 +01:00
kleines Filmröllchen
1ff48a3ca4 Terminal: Modernize terminal settings as a standalone application
The settings for Terminal are extracted into their own application,
TerminalSettings, which is reachable over the normal Settings menu as
well as the same place in the Terminal menu. The font settings are moved
into these settings as well, which are now split up into the "Terminal"
and "View" tabs. The font settings themselves receive an option to
override the selected font with the system default on the user side.
The live update behavior of all of the terminal settings is retained.

The layout of the new TerminalSettings is based around the other
Settings applications, but pixel-perfectness is missing in some places.
It's a bit fiddly and I'd like to have some better GUI::Label auto-size
behavior, but oh well :^)
2021-11-27 12:45:44 +01:00
Brian Gianforcaro
72e9d024b9 Settings: Fix launch of settings dialog
There was a bug report on discord where someone mentioned that
launching the keyboard settings always crashed. When looking
at the backtrace it became clear we were calling down the
`AppFile::executable()` path on uninitialized memory.

We can fix this by using the "official" API for obtaining data
from the GUI ModelIndex, instead of casting random memory to
the object type we expect it to be. :^)

Validated this fixes the issue for me locally.
2021-11-27 11:24:31 +01:00
Marcus Nilsson
67f349be46 PixelPaint: Keep a RefPtr to offset_text_box in EditGuideDialog
Keep a RefPtr to offset_text_box in EditGuideDialog instead of using
a local pointer. Previously the lambda in ok_button.on_click() would
outlive the local variable causing a crash.
2021-11-27 11:04:48 +01:00