Commit graph

9433 commits

Author SHA1 Message Date
DexesTTP
5386508119 Meta: Updated BuildInstructions.md for the cmake update
List of changes:
- The cmake command has been moved away from the main build instructions since
  the BuildIt script executes it automatically
- The ninja install has been clarified to take the BuildIt script into account
  and explain that the folder needs to be cleaned before executing cmake
- The ports instructions have been updated to use the make commands
- "brew install bash" has been added to the macOS prerequisites as per #2132
- The build instructions headers have been indented to group the prerequisites
  together
- The build instructions code snippets have been standardized into code blocks
- Fixed a typo
2020-05-15 09:48:14 +02:00
DexesTTP
c715b13ffc Meta: Updated CodingStyle.md clang-format requirement from 8 to 10
Fixes #2213
2020-05-15 09:48:14 +02:00
Andreas Kling
7cc442dc44 LibGUI: Fix build (LibGUI depends on Clipboard IPC classes) 2020-05-15 09:46:55 +02:00
Andreas Kling
660f5baf8f ps: Widen the username column slightly 2020-05-15 00:01:01 +02:00
Andreas Kling
244efe050a Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard
service program. Clipboard runs as the unprivileged "clipboard" user
and with a much tighter pledge than WindowServer.

To keep things working as before, all GUI::Application users now make
a connection to Clipboard after making the connection to WindowServer.
It could be interesting to connect to Clipboard on demand, but right
now that would necessitate expanding every GUI app's pledge to include
"unix" and also unveiling the clipboard portal, which I prefer not to.
2020-05-14 22:53:58 +02:00
Andreas Kling
f4c60740bd AK: Make FileSystemPath::extension() return what's after the last '.' 2020-05-14 20:41:17 +02:00
Andreas Kling
953669374c open: Create a Core::EventLoop before using Desktop::Launcher
We can't talk to IPC servers without having an event loop.
2020-05-14 20:22:20 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Pierre
49727ffee4 PaintBrush: Added 'Move active layer up/down' to the Menu
This allowes the active layer to be moved up or down.
2020-05-14 14:44:27 +02:00
Pierre
80a360683f PaintBrush: Add 'Remove active layer' to the Menu
This allows the active Layer to be removed through the Menu or by using
the shortcut Ctrl+D.
2020-05-14 14:44:27 +02:00
Andrew Kaster
3c3c1b4013 LibUnwind: Create UnwindBase.h to capture the EH ABI in code
The header is essentially just a commented + annotated version of both
the Itanium Exception Handling ABI Level I, and the 386-specific
SystemV ABI for the same. Wrapping one's head around the spec is half
the work :^)
2020-05-14 08:50:10 +02:00
Linus Groh
7bfd24ca76 LibWeb: Support the :root pseudo class 2020-05-14 08:49:51 +02:00
Linus Groh
2f29e61203 LibWeb: Make CSS pseudo classes case-insensitive 2020-05-14 08:49:51 +02:00
Andreas Kling
31c178b9b5 PaintBrush: Start the app with an "empty" single layer image :^) 2020-05-13 22:28:33 +02:00
Andreas Kling
40a72883ff PaintBrush: Add "Delete layer" action to move tool context menu 2020-05-13 22:12:14 +02:00
Andreas Kling
b25c6ab884 PaintBrush: Tweak initial main window size 2020-05-13 22:12:03 +02:00
Andreas Kling
720ebee1be PaintBrush: Add move tool context menu with "move to back/front"
Tools can now have an in-image context menu which you get when right-
clicking inside the image editing area. Our first use of this is to
provide the ability to move layers to the back/front. :^)
2020-05-13 22:03:29 +02:00
Andreas Kling
02d9cf2039 PaintBrush: Tool::on_contextmenu() => on_tool_button_context_menu() 2020-05-13 21:51:43 +02:00
Andreas Kling
72e57561a1 PaintBrush: Activate tool properly when right-clicking tool button
If we don't go via the action, the tool button becomes checked which
can bypass the exclusivity mechanism. That should probably also be
fixed but it's far outside the scope of where I am right now. :^)
2020-05-13 21:50:13 +02:00
Andreas Kling
410cdba5a9 PaintBrush: Switch the active layer when clicking one with move tool
This feels very intuitive and nice, although maybe we need some way to
override this behavior for the scenario where you're intending to move
something currently behind something else.
2020-05-13 21:46:19 +02:00
Andreas Kling
0f77be046f PaintBrush: Draw an outline around the image boundaries 2020-05-13 21:29:50 +02:00
Andreas Kling
a95ed3fdcc PaintBrush: Add keyboard shortcuts for selecting different layers 2020-05-13 21:25:13 +02:00
Andreas Kling
3fe5dc35f2 LibGUI: Add AbstractTableView::move_selection(int steps)
This allows embedders to step the selection up/down and also simplifies
AbstractTableView by sharing code between Key_Up and Key_Down. :^)
2020-05-13 21:24:27 +02:00
Andreas Kling
4cf3f00bab PaintBrush: Add "Create new layer..." action
This action pops up a dialog asking for a name + dimensions. If OK is
clicked, you get a new layer with those specifications. :^)
2020-05-13 21:16:55 +02:00
Andreas Kling
0f3e58ffe0 PaintBrush: Clip layer contents outside the image rect when compositing 2020-05-13 21:12:32 +02:00
Andreas Kling
14aa7f2d44 LibGUI: Add GUI::MessageBox::show_error() convenience function
This is just a wrapper around show() that puts up a standard-looking
error message.
2020-05-13 21:11:49 +02:00
Andreas Kling
7ca9259ffd PaintBrush: Don't paint over the nice GUI::Frame around ImageEditor 2020-05-13 19:49:38 +02:00
Andreas Kling
98cb442edf PaintBrush: Add a "Tool" menu and put all the tools in it 2020-05-13 19:49:38 +02:00
Linus Groh
cbd746e3ec LibWeb: Support "transparent" CSS color value 2020-05-13 19:25:49 +02:00
Linus Groh
57857cd8f6 LibWeb: Make parsing of most CSS values case-insensitive
These are all valid:

width: AUTO;
height: 10PX;
color: LiMeGrEeN;
2020-05-13 19:25:49 +02:00
Linus Groh
d8cdf3f5e1 LibWeb: Make CSS property parsing case-insensitive
These are all valid:

background-COLOR: red;
Background-Color: red;
BACKGROUND-COLOR: red;
BaCkGrOuNd-CoLoR: red;
2020-05-13 19:25:49 +02:00
Linus Groh
1277290a4a AK: Add StringView::equals_ignoring_case()
StringUtils::equals_ignoring_case() already operates on a StringView&,
so StringView should have the method directly without having to go
through a temporary String (which also has the method).
2020-05-13 19:25:49 +02:00
AnotherTest
6cd4d136a0 Shell: Break out of continuation when ^C is pressed
This fixes the little issue with Shell not allowing cancellation of
commands once they were in continuation mode
```
$ ls '
$ # No matter what we do here, we cannot escape 'ls'
```
2020-05-13 15:07:44 +02:00
AnotherTest
98d25324fd LibLine: Add a hook to run when an interrupt is handled
We do not want to clog up signal handlers by putting possibly complex
logic inside them, so allow the editor to handle that.
2020-05-13 15:07:44 +02:00
Andreas Kling
2c45076e68 PaintBrush: Let's have a tool (pen) checked on startup 2020-05-13 15:06:11 +02:00
Andreas Kling
1631077b74 PaintBrush: Put all the tool buttons into an action group
This allows us to easily make them exclusive and uncheckable. :^)
2020-05-13 14:48:17 +02:00
Andreas Kling
0de3b1c4bf PaintBrush: Oops, fix typo in ImageEditor::keyup_event() 2020-05-13 14:37:12 +02:00
Andreas Kling
d045972559 PaintBrush: Add keyboard shortcuts for all tools
I've used the shortcuts from GIMP for the most part, since that's what
I'm used to. We can definitely iterate on these to find better options
as the app develops. :^)
2020-05-13 14:23:08 +02:00
Andreas Kling
24f9406784 PaintBrush: Most tools still care about mousemoves outside layer
This allows you to do things like start a line outside the layer,
or spray a little outside but still partly hitting the layer. :^)
2020-05-13 13:50:35 +02:00
Andreas Kling
96d03546ef PaintBrush: Make the line, rectangle and ellipsis preview work again
You can now see what you're drawing before committing to it. This works
by passing the second_paint_event from the ImageEditor to the tool.
We also pass the active layer which makes it easier for the tool to
keep his logic in layer-relative coordinates even while drawing preview
states directly into the ImageEditor backing bitmap.
2020-05-13 13:43:20 +02:00
Andreas Kling
8318842c7e PaintBrush: Make the move tool handle arrow key events
You can now nudge layers around with the arrow keys. :^)
2020-05-13 13:21:49 +02:00
Andreas Kling
06405e83d7 PaintBrush: Make ImageEditor forward keydown and keyup events to tool 2020-05-13 13:21:49 +02:00
Andreas Kling
55d96715ff PaintBrush: Make the ImageEditor accept focus 2020-05-13 13:21:49 +02:00
Andreas Kling
8882b6bd9a PaintBrush: Remove the PaintableWidget
Moved the current colors to ImageEditor for now, although I don't think
that will be their final home.
2020-05-13 13:21:47 +02:00
Linus Groh
de42ddfd93 LibJS: Trim whitespace from string before coercing to number 2020-05-13 09:36:20 +02:00
Linus Groh
f39c7c2978 LibJS: Use String::trim_whitespace() for String.prototype.trim*() 2020-05-13 09:36:20 +02:00
Linus Groh
1febee768d AK: Replace String::trim_spaces() with String::trim_whitespace()
As suggested by @awesomekling in a code review and (initially) ignored
by me :^)

Implementation is roughly based on LibJS's trim_string(), but with a fix
for trimming all-whitespace strings.
2020-05-13 09:36:20 +02:00
Linus Groh
0c14ee035c LibJS: Make string to number coercion work for doubles 2020-05-13 09:36:20 +02:00
Linus Groh
7b8765c311 LibJS: Make the Function() constructor throw a SyntaxError, not return 2020-05-13 09:34:25 +02:00
DexesTTP
aab998e776 WindowServer: Invalidate the cursor when setting an override cursor 2020-05-13 09:33:37 +02:00