Commit graph

17649 commits

Author SHA1 Message Date
kleines Filmröllchen
ec52d16f7a PixelPaint: Add Median filter
The median filter replaces a pixel with the median of all pixels
(usually grey value is used) in a square neighborhood. This is a
standard image processing filter used for denoising, as despite its
simplicity it can e.g. retain edges quite well.

The first implementation is quite inefficient mostly to environmental
constraints. Due to how images are passed to the processing function,
two unnecessary copies happen. And because there's no fast sorting
algorithm for small arrays (insertion sort) yet, quick sort needs to be
used which is quite slow on this scale.
2022-08-14 18:24:55 +01:00
Sam Atkins
ca0e32e59f FontEditor: Mark pasted glyphs as modified
Co-authored-by: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com>
2022-08-14 13:59:19 +01:00
Sam Atkins
5b7168b247 FontEditor: Add an option to show or hide modification highlights 2022-08-14 13:59:19 +01:00
Sam Atkins
7f6bf8c7c1 FontEditor: Store glyph modified state on the undo stack
This means that if you modify a glyph, then undo that modification, we
stop showing the glyph as modified.
2022-08-14 13:59:19 +01:00
Sam Atkins
014d825472 LibGUI: Allow GlyphMapWidget to highlight modified glyphs
This makes modifications in FontEditor more visible, both so you know
what you've changed, and for taking a handy "here's what's changed"
screenshot for a font PR. :^)

The background color for new glyphs is green, modified glyphs is blue,
and deleted glyphs is red. The changes persist until you load a new
font file, so you can continue saving your work as you go and still be
able to take a convenient screenshot at the end.

I didn't feel like this one use was enough to add 3 new color roles to
themes, so to make this look decent on dark themes, it detects if the
theme is marked as dark, and uses darker colors for the highlights
which look nice with a light text color.
2022-08-14 13:59:19 +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
Sam Atkins
8cfb0d4514 LibWeb: Add fixmes for other missing CRC2D mixins 2022-08-14 11:30:40 +02:00
Sam Atkins
9f71d65005 LibWeb: Extract CanvasPathDrawingStyles class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
53b9f36413 LibWeb: Extract CanvasImageData class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
270c60c5e8 LibWeb: Extract CanvasDrawImage class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
7cf42ede68 LibWeb: Extract CanvasText class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
62b561e2e1 LibWeb: Extract CanvasDrawPath class from CRC2D
Again, this is an entirely virtual class since the methods involve
direct access to the Painter. Though, maybe I could just expose the
Painter...
2022-08-14 11:30:40 +02:00
Sam Atkins
c0494988ed LibWeb: Extract CanvasRect class from CRC2D
This one requires drawing to the canvas, so it doesn't make so much
sense to move the implementation over.
2022-08-14 11:30:40 +02:00
Sam Atkins
aa3cb8b425 LibWeb: Extract CanvasFillStrokeStyles class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
afabd613bd LibWeb: Extract CanvasFillStrokeStyles class from CRC2D 2022-08-14 11:30:40 +02:00
Sam Atkins
aa87b9699e LibWeb: Extract CanvasTransform class from CRC2D
The implementation of this got a little funky, because it has to access
methods from CanvasState.
2022-08-14 11:30:40 +02:00
Sam Atkins
08e6071ebb LibWeb: Extract CanvasState class from CRC2D
As with CanvasPath, this is to better match the spec IDL.
2022-08-14 11:30:40 +02:00
Sam Atkins
6644f3ab44 LibWeb: Teach CRC2D to draw Path2Ds :^) 2022-08-14 11:30:40 +02:00
Sam Atkins
389f1ee6f5 LibGfx: Add method for copying a Path with a transform applied
The Web's CanvasRenderingContext2D needs a way to draw a path with a
transform applied to it, without modifying the original path, so here
it is. :^)
2022-08-14 11:30:40 +02:00
Sam Atkins
2ec52bbbd5 LibWeb: Implement Path2D class 2022-08-14 11:30:40 +02:00
Sam Atkins
a37ab7b9f8 LibWeb: Extract CanvasPath class from CRC2D
This better matches the spec, and makes it possible for things like
Path2D to reuse the same implementation without duplicate code. :^)
2022-08-14 11:30:40 +02:00
Sam Atkins
8fd83b56d5 LibWeb: Use "unrestricted float/double" where we should in IDL 2022-08-14 11:30:40 +02:00
martinfalisse
872b6369c4 LibWeb: Use parent and sibling positions for absolutely positioned div
If absolutely positioned divs do not have a fixed position, then their
position must be calculated based off of the position of their parent
and their siblings.
2022-08-14 11:22:52 +02:00
martinfalisse
65e7126c48 LibWeb: Factor out compute_y_position
Factor out the code that computes the vertical position of a Box with
respect to its siblings so that it can be used when computing the
absolutely positioned divs as well.
2022-08-14 11:22:52 +02:00
cflip
0822bf5580 FileManager: Add 'Set as Desktop Wallpaper' action to file context menu 2022-08-14 09:44:08 +01:00
David Smith
ac034bdf7d LibGUI: Avoid too large tooltip when switching to shorter text
The tooltip window didn't resize when setting a shorter text, or moving
to a widget with shorter text, so it had extra space on the sides.

Fix by allowing the window to resize without obeying the minimum size
of the (previous) tooltip.
2022-08-14 09:39:30 +01: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
Liav A
c85f81bc9d Utilities/lsblk: Remove Interface Type column
We are going to remove this slice of data from the SysFS later on, so
lsblk must not try to read it.
2022-08-14 01:09:03 +01:00
electrikmilk
a5cef2c41a Base: Add Icon for Partition Editor
This adds a 16x16 and 32x32 icon that is missing for the Partition
Editor.
2022-08-14 00:52:56 +01:00
Linus Groh
849495915b LibJS: Make Function.prototype a callable function object
20.2.3 Properties of the Function Prototype Object
https://tc39.es/ecma262/#sec-properties-of-the-function-prototype-object

The Function prototype object:
- is itself a built-in function object.
2022-08-14 00:44:27 +01:00
Sam Atkins
913412e0c5 Browser+Base: Allow opening multiple URLs at once from command line
This lets you run `br example.com wikipedia.org some/local/file.html` in
one go and have them all opened as tabs.
2022-08-13 23:32:52 +02:00
Lucas CHOLLET
9df81e20d7 ThemeEditor: Use FileSystemAccessServer instead of unveiling files 2022-08-13 21:04:06 +01:00
Federico Guerinoni
8753dc72e8 HackStudio: Fix update modified document on tab widget
Closes #14297
2022-08-13 16:43:18 +01:00
cflip
272917de28 PixelPaint: Allow configuration of default image size through GUI
This adds a checkbox to the new image dialog that allows the user to
set the default values without needing to manually edit the config file
2022-08-13 09:10:29 +01:00
Liav A
488f22941b SystemMonitor: Remove GML references to the deleted Hardware tab 2022-08-12 12:24:40 +02:00
MacDue
b205cf967d LibWeb: Implement linear-gradient() transition hints
These allow you to specify the point were the gradient transitions
from one color to the next (without a transition hint the transition
occurs at the point 50% of the way between the two colors).

There is a little bit of guesswork in this implementation as the
specification left out how hints work with the color stop fixup,
though it appears that they are treated the same as color stops.
2022-08-12 12:24:15 +02:00
Ali Mohammad Pur
c90cf67dc6 Shell: Avoid StringView OOB access in Formatter ctor 2022-08-11 14:12:55 +00:00
Ali Mohammad Pur
bbce061a61 Shell: Stop printing 'sh -c' commands
That's getting too spammy and too useless.
2022-08-11 14:12:55 +00:00
MacDue
1473842b56 LibWeb: Follow image-rendering when painting image style values 2022-08-10 19:39:07 +02:00
Junior Rantila
9c42a75381 HackStudio: Add fullscreen shortcut 2022-08-10 08:42:53 +01:00
Junior Rantila
d40b0439d8 Terminal: Propagate more errors 2022-08-09 20:09:33 -04:00
thankyouverycool
d11ce1d808 WindowServer: Let WindowManager set serverside effects
Menu and Window animations can now be disabled and the geometry
overlay made conditional. Shadow options are dependent on the
current theme actually supplying bitmaps, but they provide a fast
way to toggle those that do without having to edit theme files.
2022-08-09 12:08:21 +02:00
thankyouverycool
5917545633 LibGUI+LibGfx: Let Desktop::the() set widget effects
Scrolling can now be set Coarse or Smooth system-wide, Splitter
knurls and Tab accents toggled on and off, and Menu flashing
disabled.
2022-08-09 12:08:21 +02:00
thankyouverycool
1d445356b6 DisplaySettings: Add an Effects tab
Effects tab provides the UI for setting SystemEffects.
DisplaySettings is getting a bit crowded and might need a re-org
at some point, but this seems like a good home for effects while
the settings mature.
2022-08-09 12:08:21 +02:00
thankyouverycool
841d06f676 LibGUI+WindowServer: Create IPC calls for passing SystemEffects
SystemEffects are sent to the WindowManager through
set_system_effects() and broadcast to Desktop clients with
update_system_effects(). WindowManager is reponsible for saving,
loading and rebroadcasting effects from WindowServer.ini on
config changes.
2022-08-09 12:08:21 +02:00
thankyouverycool
e2318dffe3 LibGUI: Let Desktop:the() manage SystemEffects inside LibGUI
These settings might well ultimately be factored into a dedicated
settings manager, but until then, a charitable interpretation of
Desktop::the() as the desktop environment will suffice.
2022-08-09 12:08:21 +02:00
thankyouverycool
8904a61d71 LibGUI+WindowServer: Add a SystemEffects wrapper and helpers
SystemEffects provides a tidy way to work with system-wide
visual options passed through IPC.
2022-08-09 12:08:21 +02:00
Karol Kosek
9d7345d17b Chess: Import/Export chessboards using LibFileSystemAccessClient
With this change, the wpath and cpath promises as well as unveiling
user's entire home directory are no longer needed. :^)
2022-08-08 22:03:30 -04:00
Matthew B. Jones
79a5a1c209 LibGUI: Correct cursor index during mouseup_event
Previously, during a m_might_drag mouse_up event, we were updating
the selection directly, which caused the selection to be accurate
but the location of the cursor index to be stale/incorrect. The
side effect of this is then future events may point to the wrong
index.

Instead, call the set_cursor function with SelectionUpdate::Set,
which handles both updating the cursor index as well as the
selection index.
2022-08-08 16:41:36 -04:00