1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 20:55:07 +00:00
Commit graph

22504 commits

Author SHA1 Message Date
Andreas Kling
963e95cb1a GTableView: Minor painting cleanup. 2019-03-09 21:38:13 +01:00
Andreas Kling
0a7137617d GTextEditor: Simplify painting of the ruler. 2019-03-09 21:30:16 +01:00
Andreas Kling
ffe4522316 SharedGraphics: Allow passing a Font to text drawing functions.
This way we don't have to juggle around with calls to Painter::set_font()
which simplifies a bunch of places.
2019-03-09 21:24:12 +01:00
Andreas Kling
b8f999cbef About+LibGUI: Use a GBoxLayout for the About app. 2019-03-09 21:09:29 +01:00
Andreas Kling
eac3a6ad52 GEventLoop: Make the server fd/pid global, and only connect to server once. 2019-03-09 17:34:09 +01:00
Andreas Kling
b1c272a507 WindowServer: Initiating a window drag/resize should also make frontmost. 2019-03-09 17:10:53 +01:00
Andreas Kling
684c52941d WindowServer: Always clip window updates to the window's outer rect. 2019-03-09 17:03:08 +01:00
Andreas Kling
e009be5973 LibGUI: Use PainterStateSaver in GStyle::paint_button(). 2019-03-09 16:56:26 +01:00
Andreas Kling
88f6ce152f SharedGraphics: Add PainterStateSaver RAII helper and Point::operator-().
Two little things to help tidy up a bit in WSWindowManager.
2019-03-09 16:54:41 +01:00
Andreas Kling
3c2139b824 GTextEditor: Use Painter save/restore to simplify. 2019-03-09 16:48:43 +01:00
Andreas Kling
f7097d21f6 SharedGraphics: Give painter a state stack and save()/restore() operations.
This will make some painting code a lot less confusing since there's no
need to manually undo translations, clips, etc.
2019-03-09 16:48:02 +01:00
Andreas Kling
971dd46aec Userland: Use AK::quick_sort() in /bin/top 2019-03-09 16:20:46 +01:00
Andreas Kling
0d5e6593b2 AK: Add a basic QuickSort template implementation.
It was depressing not being able to capture anything when passing a lambda
to qsort_r() so let's just have our own QuickSort. I was gonna have to do
this eventually anyway. :^)
2019-03-09 16:20:12 +01:00
Andreas Kling
e14dd06b8c FileManager: Hook up a GSortingProxyTableModel so we get sorted files. :^)
The next step here is coming up with a nice way to always put directories
ahead of files.
2019-03-09 14:52:25 +01:00
Andreas Kling
7d2c962836 LibGUI: Minor tidying. 2019-03-09 14:39:24 +01:00
Andreas Kling
46caa2663b LibGUI: Use a separate data role for the table model sorting order.
This allows data to be displayed nicely while sorting happens based on some
underlying raw data. :^)
2019-03-09 14:24:34 +01:00
Andreas Kling
3681a402ba GTableView: Allow changing sort options by clicking column headers.
Also paint the sorted column slightly differently to indicate what's up.
2019-03-09 13:59:01 +01:00
Andreas Kling
7d1142c7d9 Make it possible to sort a GTableModel by column+order.
This is accomplished by putting a GSortingProxyTableModel between the model
and the view. It's pretty simplistic but it works for this use case. :^)
2019-03-09 13:33:52 +01:00
Andreas Kling
0680fe2383 ProcessManager: Show the colonel process. 2019-03-09 11:29:32 +01:00
Andreas Kling
2bde251163 Base: Add 16x16 icon for TextEditor. 2019-03-08 19:56:12 +01:00
Andreas Kling
48470cdf44 Launcher: Add a launcher button for TextEditor. 2019-03-08 19:53:11 +01:00
Andreas Kling
5a28392660 GTextEditor: Use a subwidget for the scrollbar corner and tighten clipping. 2019-03-08 18:58:40 +01:00
Andreas Kling
ccda716028 GTextEditor: Backspace and Delete should work regardless of modifier state. 2019-03-08 18:50:14 +01:00
Andreas Kling
032549d7bf GTextEditor: Refactor selection into a GTextRange class.
This is a bit more expressive than "selection start + current cursor".
2019-03-08 18:28:24 +01:00
Andreas Kling
f40d11f06d LibGUI+WindowServer: Implement drag-to-select behavior in GTextEditor.
To make this feel right, I needed to start passing keyboard modifiers along
with mouse events. That allows shift-clicking to extend the selection. :^)
2019-03-08 17:53:02 +01:00
Andreas Kling
6d172725c0 GTextEditor: Fix text_position_at() behavior when passed negative values. 2019-03-08 17:13:31 +01:00
Andreas Kling
35c6dceee0 FileManager: Don't crash if pressing Return with no selected item. 2019-03-08 16:02:00 +01:00
Andreas Kling
c4937f01d8 GTextEditor: Simplify delete_selection(). 2019-03-08 15:55:58 +01:00
Andreas Kling
5602f3be6c GTextEditor: Ctrl+A should select the entire document. 2019-03-08 14:12:41 +01:00
Andreas Kling
220c7b5f75 GTextEditor: Replace selection on input or Backspace/Delete. 2019-03-08 14:10:34 +01:00
Andreas Kling
48d48679b0 GTextEditor: Work on cut/copy/paste operations. 2019-03-08 14:08:15 +01:00
Andreas Kling
b8581b0069 Seal clipboard buffers after copying data into them.
This is just a quick safety mechanism to ensure that nobody alters the
contents of a clipping after it's been set.

Ultimately this will be replaced by a more sophisticated SHM object.
2019-03-08 13:33:35 +01:00
Andreas Kling
6820f9e14f WindowServer+LibGUI: Add a server-side clipboard.
On the client side, use GClipboard's data() and set_data(String) to access
the global clipboard. :^)
2019-03-08 13:27:19 +01:00
Andreas Kling
eda0866992 Add a C++ helper class for working with shared buffers.
This is a bit more comfortable than passing the shared buffer ID manually
everywhere and keeping track of size etc.
2019-03-08 12:24:05 +01:00
Andreas Kling
0b5d5fc3c9 Kernel: Minor tidying in BXVGADevice. 2019-03-08 02:54:39 +01:00
Andreas Kling
6576ac8332 GTextEditor: Add selected_text() function.
I don't have a clipboard to actually put the copied selection onto yet,
so just print the selected text to stdout so we can see what it is.
2019-03-08 01:59:59 +01:00
Andreas Kling
77359a5360 LibGUI: Only activate keyboard shortcuts on KeyDown, not KeyUp. 2019-03-08 01:59:49 +01:00
Andreas Kling
1e0971c8b4 WindowServer: Fix slightly off alignment of menubar clock. 2019-03-08 01:31:03 +01:00
Andreas Kling
f40ef7f495 Meta: Time for a new screenshot! :^) 2019-03-08 01:10:33 +01:00
Andreas Kling
b5521e1b0d GTextEditor: Add basic selection support. 2019-03-08 00:49:45 +01:00
Andreas Kling
c9c40e1da6 Base+WindowServer: Add a new default wallpaper for fun. 2019-03-07 23:58:04 +01:00
Andreas Kling
28a6ba498a Userland: Fix broken permissions for files created by /bin/cp.
When passing O_CREAT to open(), it will grab a third "mode" argument from
the stack. Let's not forget to actually pass this!

Also use the process umask for the created files.
2019-03-07 23:23:07 +01:00
Andreas Kling
ca52de8e5c TextEditor: Add a menu for switching the editor font. 2019-03-07 23:05:55 +01:00
Andreas Kling
949c98c5af LibGUI: Implement GToolbar separators. 2019-03-07 23:01:36 +01:00
Andreas Kling
054e4caf49 TextEditor: Add Cut/Copy/Paste placeholder actions. 2019-03-07 21:43:43 +01:00
Andreas Kling
27b0aab13e GTextEditor: Unbreak forward merge with Delete. 2019-03-07 20:15:05 +01:00
Andreas Kling
9867fe1025 GTextEditor: Add a ruler column that always shows the line numbers. 2019-03-07 20:05:05 +01:00
Andreas Kling
f13c62f225 GTextEditor: Fix double effect of backspace/delete in some cases. 2019-03-07 17:18:22 +01:00
Andreas Kling
a738b5cb69 TextEditor: Open an empty document by default. 2019-03-07 17:15:59 +01:00
Andreas Kling
f8b72ab3ab GTextEditor: Add basic PageUp/PageDown navigation support. 2019-03-07 17:11:17 +01:00