Commit Graph

446 Commits

Author SHA1 Message Date
Rhin
d7b836858e TextEditor: Move the application UI into a dedicated TextEditorWidget. (#292)
Added a main widget for the text editor as a stepping stone to add new features.
2019-07-11 20:52:33 +02:00
Andreas Kling
2dc0ea1cf9 FontEditor: Initial port to using a VisualBuilder generated UI.
Here goes the first attempt at using VisualBuilder to make an application.

There are many features missing that we are gonna have to implement,
noticeably custom widgets (for the glyph editor and glyph map widgets)
but this patch already moves most of the UI layout to a form file. :^)
2019-07-11 20:19:26 +02:00
Andreas Kling
323704c851 TextEditor: Remove use of copy_ref(). 2019-07-11 16:04:53 +02:00
Andreas Kling
a35dc10f54 ProcessManager: Remove use of copy_ref(). 2019-07-11 16:04:17 +02:00
Andreas Kling
6382c14faf IRCClient: Remove use of copy_ref(). 2019-07-11 16:03:54 +02:00
Andreas Kling
433b6678c6 FontEditor: Remove use of copy_ref(). 2019-07-11 16:02:55 +02:00
Andreas Kling
c0742e4c23 FileManager: Remove use of copy_ref(). 2019-07-11 15:59:06 +02:00
Andreas Kling
245ae479eb ProcessManager: Use CProcessStatisticsReader to get process data.
It was silly to duplicate this functionality in so many places. Now everyone
uses CProcessStatisticsReader to parse /proc/all :^)
2019-07-10 15:27:52 +02:00
Andreas Kling
7083a0104a LibGUI: Add GActionGroup, a way to group a bunch of GActions.
This can be used to make a bunch of actions mutually exclusive.
This patch only implements the exclusivity behavior for buttons.
2019-07-09 22:10:03 +02:00
Andreas Kling
2c81477f16 Terminal: Try to preserve line contents when resizing the terminal window.
This is still destructive when shrinking, but clearly better than throwing
everything away.
2019-07-08 19:02:08 +02:00
Andreas Kling
0e75aba7c3 StringView: Rename characters() to characters_without_null_termination().
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
2019-07-08 15:38:44 +02:00
Andreas Kling
752d297321 IRCClient: Fix build. Forgot to update a function signature. 2019-07-07 22:27:48 +02:00
Andreas Kling
ea9340aeca IRCClient: Implement the "part from channel" action.
Also make sure the action is disabled while we're not in a window that
corresponds to an open channel. :^)

Fixes #277.
2019-07-07 21:58:57 +02:00
Andreas Kling
27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Andreas Kling
b79112e6d6 AK: Add String::number() for creating a String from a number.
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
2019-07-03 14:56:27 +02:00
Christopher Dumas
e9ab282cfd Launcher: Reformat config a little bit (#279) 2019-07-03 05:53:44 +02:00
Andreas Kling
d2ec64ace0 Launcher: The "Launcher" config file group shouldn't take up visual space.
Also tweak Launcher.ini since CConfigFile bools are 1/0 rather than
true/false. We should probably use true/false. Or switch over to JSON.
2019-07-02 21:49:00 +02:00
Christopher Dumas
8a2123e385 Launcher: Vertical/Horizontal option 2019-07-02 13:29:14 +02:00
Andreas Kling
aaedc24f15 Kernel+ProcessManager: Convert /proc/memstat to JSON. 2019-07-01 18:43:01 +02:00
Andreas Kling
438a14c597 Terminal: Track which character cells have had something printed in them.
This helps us figure out where lines end, which we need when computing the
selected text for copy-to-clipboard. :^)
2019-07-01 18:14:08 +02:00
Andreas Kling
c70fbca23a QuickShow: Make the window background black for a nicer contrast. 2019-06-30 17:22:12 +02:00
Andreas Kling
1fa467a424 Launcher: Tighten up the widget layout a bit. 2019-06-30 15:58:53 +02:00
Andreas Kling
daf44d5ec5 Terminal: Unbreak single-line text selection. 2019-06-30 15:11:56 +02:00
Andreas Kling
038f99eeff QuickShow: When zooming with the mouse wheel, keep image centered at cursor. 2019-06-30 15:01:35 +02:00
VAN BOSSUYT Nicolas
802d4dcb6b Meta: Removed all gitignore in the source tree only keeping the root one 2019-06-30 10:41:26 +02:00
Andreas Kling
0a44837738 PaintBrush: Make a little icon for the eraser tool. 2019-06-30 09:40:15 +02:00
Andreas Kling
315716d193 GUI: Use Win2K-like "warm gray" color instead of the older colder gray.
Someone suggested this a long time ago and I never got around to it.
So here we go, here's the warm gray! I have to admit I like it better. :^)
2019-06-30 09:23:16 +02:00
Andreas Kling
9962cb7291 ProcessManager: Add process-specific context menus to the main table view. 2019-06-30 08:15:55 +02:00
Andreas Kling
d5bb98acbc AK: Defer to Traits<T> for equality comparison in container templates.
This is prep work for supporting HashMap with NonnullRefPtr<T> as values.
It's currently not possible because many HashTable functions require being
able to default-construct the value type.
2019-06-29 19:14:03 +02:00
Andreas Kling
2bd8118843 Kernel: Change the format of /proc/all to JSON.
Update ProcessManager, top and WSCPUMonitor to handle the new format.

Since the kernel is not allowed to use floating-point math, we now compile
the JSON classes in AK without JsonValue::Type::Double support.
To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
2019-06-29 09:04:45 +02:00
Andreas Kling
561bfd3ed6 Terminal: Make it so typing resets the cursor blink timer.
Patch contributed by "pd"
2019-06-28 21:46:23 +02:00
Andreas Kling
96ca8bea6c Terminal: Don't write erroneous characters to PTY when modifiers pressed.
Additionally the Alt modifier now generates the correct characters, as do
Insert/Delete/PgUp/PgDown.

Patch contributed by "pd"
2019-06-28 21:46:05 +02:00
Andreas Kling
274b41e47c Terminal: Changex internal opacity representation to byte instead of float.
This lets us avoid some math during paint events.
Patch contributed by "pd"
2019-06-28 21:42:15 +02:00
Robin Burchell
933cd3848f PaintBrush: Add size context menu to SprayTool 2019-06-28 15:27:23 +02:00
Robin Burchell
24ada6bd1f PaintBrush: Add an erase tool 2019-06-28 15:27:23 +02:00
Lawrence Manning
f0a6b42066 Move common Application build steps into their own Makefile.common
Further consolidation is of course possible, eg the Games/ programs
follow the same rules more or less.
2019-06-25 21:35:50 +02:00
Andreas Kling
8247dad540 PaintBrush: Allow RGBA32 to use the bucket and spray tools.
Eventually I'd like to do some kind of bitmap layers, and we definitely want
alpha channel support then, so let's just not paint ourselves into an
uncomfortable corner early on. :^)
2019-06-25 20:33:44 +02:00
Andreas Kling
b529b4a3e6 PaintBrush: Add support for opening files.
Obviously this only supports whatever PNG files that load_png() can decode
at the moment.
2019-06-25 20:27:32 +02:00
Andreas Kling
eedb4f6b2f QuickShow: Allow panning and zooming the image instead of stretching it.
This needs more work and polish, but it's a step in a more pleasant and
useful direction.

Also turn QuickShow into a fully-fledged "application". (By that, I really
just mean giving it its own Applications/ subdirectory.)
2019-06-23 16:35:43 +02:00
Andreas Kling
cf0d05d54a Terminal: Don't compute buffer positions outside the possible area. 2019-06-23 15:34:36 +02:00
Andreas Kling
5aefd7f828 PaintBrush: Implement a thickness setting for the pen tool.
Painter gains the ability to draw lines with arbitrary thickness.
It's basically implemented by drawing filled rects for thickness>1.

In PaintBrush, Tool classes can now override on_contextmenu() to
provide a context menu for the toolbox button. :^)
2019-06-23 10:00:02 +02:00
Andreas Kling
08c04f0a41 Terminal: Add basic mouse selection with copy and paste.
Left mouse button selects (and copies the selection on mouse up).
The right mouse button then pastes whatever's on the clipboard. I always
liked this behavior in PuTTY, so now we have it here as well :^)
2019-06-23 09:18:17 +02:00
Andreas Kling
61b4da447d PaintBrush: Fix compiler warnings. 2019-06-22 16:26:04 +02:00
Andreas Kling
4118aaaa32 Terminal: Fix compiler warnings. 2019-06-22 16:07:46 +02:00
Andreas Kling
25fd847ef2 PaintBrush: Add a color picker tool. 2019-06-22 12:05:35 +02:00
Andreas Kling
d343fb2429 AK: Rename Retainable.h => RefCounted.h. 2019-06-21 18:58:45 +02:00
Andreas Kling
550b0b062b AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h. 2019-06-21 18:45:59 +02:00
Andreas Kling
90b1354688 AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr. 2019-06-21 18:37:47 +02:00
Andreas Kling
77b9fa89dd AK: Rename Retainable => RefCounted.
(And various related renames that go along with it.)
2019-06-21 15:30:03 +02:00
Andreas Kling
2e9cc75d11 WindowServer+Taskbar: Let WindowServer manage the "window menus".
Taskbar now simply asks the WindowServer to popup a window menu when right
clicking on a taskbar button.

This patch also implements the "close" menu item, and furthermore makes the
window menu show up when you left-click a window's titlebar icon. :^)
2019-06-21 11:03:43 +02:00