Commit graph

1751 commits

Author SHA1 Message Date
Andreas Kling
9d347352a1 LibGfx+LibGUI+Clients: Make fonts findable by their qualified name
The qualified name of a font is "<Family> <Size> <Weight>". You can
get the QN of a Font via the Font::qualified_name() API, and you can
get any system font by QN from the GUI::FontDatabase. :^)
2020-10-25 21:18:18 +01:00
Andreas Kling
260b52215c HexEditor: Use the system default fixed width font 2020-10-25 21:18:18 +01:00
asynts
1254cbbd0b AK: Eradicate calls to warn(). 2020-10-25 18:52:51 +01:00
Andreas Kling
80b77cec38 LibGfx+FontEditor+Fonts: Add family, size and weight metadata to fonts
This makes finding fonts from the same family much less difficult. :^)
2020-10-25 10:12:03 +01:00
Andreas Kling
688675e89b LibGUI: Make table view row height+padding font-size-relative
This makes tables look a lot nicer with different-sized fonts. :^)
2020-10-25 10:12:03 +01:00
asynts
88bca152c9 AK: Eradicate the uses of out(). 2020-10-24 12:56:25 +02:00
Andreas Kling
46c15276e9 LibWeb: Fix Document construction mishap in <template> element
Ref-counted objects must not be stack allocated. Make DOM::Document's
constructor private to avoid this issue. (I wish we could mark classes
as heap-only..)
2020-10-23 08:33:16 +02:00
Andreas Kling
c31cc8c060 FileManager: Ignore model updates during widget construction
We can't use current_view() before we've actually constructed the
subviews, so just ignore statusbar update requests before they get
a chance to call current_view().

This is not the most beautiful thing, and maybe we can think of a
nicer approach.
2020-10-22 18:52:54 +02:00
Andreas Kling
460d3e3969 FileManager: Update the error label overlay on back/forward navigation
Fixes #3817.
2020-10-22 18:27:28 +02:00
Andreas Kling
39a7358b51 FileManager: Set up the model error/complete callbacks earlier
We need to set these up before calling set_root_path, as that's where
the error callbacks would fire from.
2020-10-22 18:26:59 +02:00
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