Commit graph

1741 commits

Author SHA1 Message Date
Luke
e8a9e8aed5 LibWeb: Add namespace to Element 2020-10-22 15:24:42 +02:00
BenJilks
afd52e2576 PixelPaint: Tool properties panel
Each tool can have its own set of properties that can be modified
through a panel on the right side.

The tools I've added properties for are:

Pen:
	Thickness

Brush:
	Size
	Hardness

Spray:
	Thickness
	Density

Bucket:
	Threshold
2020-10-16 00:03:53 +02:00
Andreas Kling
1d96ecf148 Everywhere: Add missing <AK/TemporaryChange.h> includes
Don't rely on HashTable.h pulling this in.
2020-10-15 23:49:53 +02:00
Linus Groh
20907780bd FileManager: Only set ~/Desktop as model root path in desktop mode
Setting it as model root path in DirectoryView::setup_model() for
windowed mode as well would cause an issue with the following:

- "open ~/Desktop"
- "FileManager ~/Desktop"
- "Show in FileManager..." from Desktop context menu

When viewing the Desktop as the initial path it would be the same and
on_path_change wasn't called, leading to various widgets and window
properties not being updated.

Fixes #3772.
2020-10-15 23:49:34 +02:00
BenJilks
5f15fb17d9 PixelPaint: Basic brush tool
This patch adds a very basic implementation of the classic brush
tool. It features a wide brush with a falloff around the edges.
2020-10-14 20:36:40 +02:00
AnotherTest
93f4388e45 LibGfx+PixelPaint: Fix distortions in convolutions with size != 4 or 5 2020-10-12 20:04:48 +02:00
Tom
95434d70ed LibGfx: Allow specifying a separate source bitmap for Filter::apply
By allowing to specify a separate source bitmap when calling Filter::apply
the same filter can be applied to multiple areas, and also doesn't need
to use a temporary bitmap. This also enables us to apply the filter to
multiple regions properly, even if they are (almost) adjacent.

If no separate source bitmap is supplied then a temporary bitmap is still
necessary.
2020-10-12 20:04:48 +02:00
Tom
da8d87c297 LibGfx: Make Filter::Parameters more light-weight
By moving the Bitmap and Rect out of Filter::Parameters we can re-use
the parameters more efficiently, allowing the filter to be applied
to many bitmaps without having to re-create the filter every time.
2020-10-12 20:04:48 +02:00
Tom
8af02fc8b3 LibGfx: Move filters from PixelPaint into LibGfx
This allows re-using the same filters outside of PixelPaint.
2020-10-12 20:04:48 +02:00
Tom
f9700ffb41 PixelPaint: Move GUI logic and filter parameters out of filters 2020-10-12 20:04:48 +02:00
Peter Elliott
b82f2df4c8 Piano: Add UI support for different lengths of notes 2020-10-12 19:41:53 +02:00
Peter Elliott
27b990ec19 Piano: Add note names to RollWidget 2020-10-12 19:41:53 +02:00
Peter Elliott
01bff0141e Piano: Highlight pressed key in roll widget 2020-10-12 19:41:53 +02:00
Kesse Jones
31791945ab FileManager: Added menu to show dotfiles in directory context menu 2020-10-10 23:29:18 +02:00
Linus Groh
fcd263f17b FileManager: Fix file creation error message
s/String::format/String::formatted/ - the error message was not being
formatted properly.
2020-10-10 00:53:09 +02:00
Linus Groh
e7c53bee16 Spreadsheet: Fix rendering of documentation examples
s/String::format/String::formatted/ - the Markdown source was not being
formatted properly.
2020-10-10 00:53:09 +02:00
Linus Groh
870dd44ba9 Help: Replace InProcessWebView with OutOfProcessWebView 2020-10-08 23:20:52 +02:00
Linus Groh
f6af2d747e TextEditor: Replace InProcessWebView with OutOfProcessWebView 2020-10-08 23:20:52 +02:00
Lenny Maiorani
9eef5fc446 SinglyLinkedList: Remove unused includes
Several files include `AK/SinglyLinkedList.h` without using
it. Removing it to simplify.
2020-10-08 09:54:41 +02:00
asynts
9123920a19 Welcome: Use new format functions. 2020-10-06 20:29:26 +02:00
asynts
ff3552bb14 TextEditor: Use new format functions. 2020-10-06 20:29:26 +02:00
asynts
712e348fad Terminal: Use new format functions. 2020-10-06 20:29:26 +02:00
asynts
0dec600a2a SystemMonitor: Use new format functions. 2020-10-06 20:29:26 +02:00
asynts
f005548d56 Spreadsheet: Use new format functions.
In a few places I also simplified a few format strings:

    -outln("{} item{}", items, items.size() == 1 ? ' ' : 's');
    +outln("{} item(s)", items);

In my opinion this is more readable and in some places it incorrectly
wrote '0 item' which is "fixed" now. In other places the placeholder
space looked weird.
2020-10-06 15:28:39 +02:00
asynts
30ca17e78f SoundPlayer: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
97660ad46c QuickShow: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
0b29c5e41d PixelPaint: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
377afff33a Piano: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
5aadf00463 KeyboardSettings: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
da9c995a8c IRCClient: Use new format functions. 2020-10-06 15:28:39 +02:00
asynts
7c2cd81edb AK+Format: Exclude prefix from width calculation.
When we write the format specifier '{:#08x}' we are asking for eight
significant digits, zero padding and the prefix '0x'.

However, previously we got only six significant digits because the
prefix counted towards the width. (The number '8' here is the total
width and not the number of significant digits.)

Both fmtlib and printf shared this behaviour. However, I am introducing
a special case here because when we do zero padding we really only care
about the digits and not the width.

Notice that zero padding is a special case anyways, because zero padding
goes after the prefix as opposed to any other padding which goes before
it.
2020-10-06 15:28:39 +02:00
asynts
aea5fff0d1 HexEditor: Use new format functions.
I changed the formatting for some numbers when it made sense, because I
believe '0x00000020' to be more expressive than '      20' for example.
2020-10-06 15:04:37 +02:00
asynts
c776d76b71 Help: Use new format functions. 2020-10-06 15:04:37 +02:00
asynts
30b9dff5aa FontEditor: Use new format functions. 2020-10-06 15:04:37 +02:00
Luke
52c31bb743 LibGfx+FontEditor+Fonts: Add "mean line" value to all fonts
The main inspiration behind this was to have a correct ex CSS unit.
The mean line is based off what it shows in the CSS Values and Units
Level 4 specification, section 6.1.1.

https://www.w3.org/TR/css-values-4/#font-relative-lengths
2020-10-05 20:05:40 +02:00
asynts
ee9c18c118 FileManager: Use new format functions. 2020-10-05 16:25:50 +02:00
asynts
7fd4646acb DisplaySettings: Use format instead of printf. 2020-10-05 14:19:24 +02:00
asynts
9efc69a6e2 Debugger: Use format instead of printf.
There was one bogus printf in a signal handler, I just left it there.
2020-10-05 14:19:24 +02:00
asynts
e1dfeef11f Calendar: Use format instead of printf.
I am not sure what this message is supposed to tell me, but I'll just
keep it around.
2020-10-05 14:19:24 +02:00
asynts
206e48abb5 Calculator: Use format instead of printf.
This also fixes a graphical bug where the decimal point was always
rendered. The number four was represented as '4.' instead of '4'. Now
the decimal point is only shown when there are decimal places.
2020-10-05 14:19:24 +02:00
Andreas Kling
94b95a4924 LibJS: Remove Interpreter::call()
Just use VM::call() directly everywhere.
2020-10-04 23:08:49 +02:00
asynts
59e7ffa86d AK: Make the return type of dbgputstr consistent. 2020-10-04 19:18:32 +02:00
Andreas Kling
4cf3a1eb41 Browser: Remove dbgln() statement that was crashing on startup
Don't have time to dig into this right now, but let's unbreak Browser.
2020-10-04 17:12:11 +02:00
Andreas Kling
6f5322409d Browser: Fix build after dbgf() -> dbgln() rename 2020-10-04 17:09:01 +02:00
asynts
d5ffb51a83 AK: Don't add newline for outf/dbgf/warnf.
In the future all (normal) output should be written by any of the
following functions:

    out    (currently called new_out)
    outln
    dbg    (currently called new_dbg)
    dbgln
    warn   (currently called new_warn)
    warnln

However, there are still a ton of uses of the old out/warn/dbg in the
code base so the new functions are called new_out/new_warn/new_dbg. I am
going to rename them as soon as all the other usages are gone (this
might take a while.)

I also added raw_out/raw_dbg/raw_warn which don't do any escaping,
this should be useful if no formatting is required and if the input
contains tons of curly braces. (I am not entirely sure if this function
will stay, but I am adding it for now.)
2020-10-04 17:04:55 +02:00
asynts
616af36d91 Browser: Use format functions instead of printf. 2020-10-04 14:23:25 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Andreas Kling
44f9637e20 Browser: Add a special context menu for images
Now, right-clicking on an image allows you to open that image in this
tab or a new tab. You can also copy the image URL, and even copy the
image itself to the clipboard! :^)

Copying to the clipboard will not work in a multi-process context yet,
since we need to send the image bitmap across the IPC boundary and this
patch does not do that.
2020-10-02 19:03:10 +02:00
Andreas Kling
d00bfd0eaa Browser: Move the opening of a download window to its own function
This should probably grow into a proper download manager at some point,
but for now let's at least move it out of the context menu callback.
2020-10-02 19:00:45 +02:00
AnotherTest
c1fc27cab2 HackStudio+TextEditor: Add the Shell syntax highlighter 2020-09-30 20:05:24 +02:00