summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
AgeCommit message (Collapse)Author
2020-05-24LibGUI: Use word breaks to intelligently navigate a TextEditorFalseHonesty
Previously, holding Control while using the left/right arrow keys to navigate through a TextEditor would only be helpful if the document had spans. Now, if there are no spans, it will navigate to the next "word break", defined to be the threshold where text changes from alphanumeric to non-alphanumeric, or vice versa.
2020-05-24LibGUI: Add word break locator methods to TextDocumentFalseHonesty
TextDocument now has utilities to locate a word break both before and after any TextPosition.
2020-05-23LibGUI: Improve double click selection on documents without spansFalseHonesty
Previously, double clicking would select the range around your click up until it found a space, and in the browser's location bar this behavior didn't suffice. Now, it will select the range around your click until there is a "word break". A word break is considered to be when your selection changes from being alphanumeric to being non alphanumeric, or vice versa.
2020-05-22LibGUI: Add hook when a context menu is requested on a buttonFalseHonesty
2020-05-21LibGUI: Add hook when a context menu is requested on a tabFalseHonesty
2020-05-21LibGUI: Fix view column auto-sizing of icon-only columnsAndreas Kling
For icon columns, just use the item height as the auto width for now. This gives us 16x16 icons, which is always what we want anyway.
2020-05-21LibGUI: Remove Model::row_name() since nothing used itAndreas Kling
2020-05-21LibGUI: Make all views use CenterLeft as the default text alignmentAndreas Kling
If a model doesn't specify a text alignment for a given field, we now fall back to CenterLeft. This will look better than Center in the vast majority of cases.
2020-05-21LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizingAndreas Kling
Auto-sizing of view columns is now enabled by default. This removes the last remaining need for ColumnMetadata, so this patch gets rid of it.
2020-05-21LibGUI: Replace ColumnMetadata::sortable => Model::is_column_sortable()Andreas Kling
Now there's only one thing left in ColumnMetadata: the initial width.
2020-05-21LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadataAndreas Kling
2020-05-21LibGUI: Models should always specify font via Model::Role::FontAndreas Kling
This gets rid of one field in ColumnData. The goal is to get rid of all fields and lose ColumnData entirely.
2020-05-21LibGUI: Always paint the cursor visible when focusing a TextEditorAndreas Kling
If the cursor happened to be blinking in the invisible state, it would take 500ms before we actually see the cursor in a newly focused editor widget. This patch makes it show up right away.
2020-05-21LibGUI: Focus the first focusable widget added to a windowAndreas Kling
It feels really awkward if nothing is focused when opening a window.
2020-05-21LibGUI: Move AbstractTableView::keydown_event() down to TableViewAndreas Kling
We can't really share this stuff with TreeView anyway, since tables and trees have very different spatial relationships between indexes.
2020-05-21LibGUI: Allow expand/collapse subtrees in TreeView with Alt+Left/RightAndreas Kling
This makes TreeView a lot more keyboard friendly.
2020-05-21LibGUI: FileSystemModel, markdown file icon for .md files.Hüseyin ASLITÜRK
2020-05-20LibGUI: Add MessageBox question iconHüseyin ASLITÜRK
2020-05-20LibGUI: Replace up and down arrows with emojiHüseyin ASLITÜRK
2020-05-20LibGUI: Update copyright character in about dialogHüseyin ASLITÜRK
2020-05-19LibGUI: Use dbg() instead of dbgprintf() in GUI::DialogAndreas Kling
2020-05-19LibGUI: Remove some ancient unused debug logging in AbstractButtonAndreas Kling
2020-05-19LibGUI: Add ability to hide GUI::TabWidget's tab barLinus Groh
2020-05-18LibGUI: Make text selection feel better in single-line editorsAndreas Kling
We should always stay on the only line when selecting in a single-line editor, instead of requiring the user to keep the cursor inside the text when selecting. This broke with the variable-width font changes.
2020-05-18LibGUI: Add 1px of horizontal content padding to TextEditorAndreas Kling
This adds a little bit of needed air around the text.
2020-05-18LibGUI: Grow the "line content rect" slightly in single line text boxesAndreas Kling
Previously we would sometimes leave some pixels from an old selection rect on screen after clearing the selection. It was because the line content rect was smaller than the visual selection rect, and we were using the line content rect for invalidations.
2020-05-18LibGUI: Use a variable-width font by default in single-line TextEditorsAndreas Kling
This makes things like the Browser location bar look way nicer. :^)
2020-05-18LibGUI: Support variable-width fonts in TextEditorAndreas Kling
This patch reworks metric and coordinate computation to iterate over text content instead of making assumptions about fixed glyph widths.
2020-05-18LibGUI: Remove outdated FIXME in TextEditorAndreas Kling
2020-05-18LibGUI: Tweak EmojiInputDialog layout :^)Andreas Kling
2020-05-17LibGUI: Fix crash in TextDocument::remove(TextRange)Andreas Kling
Oops, we can't be appending substrings of a string we just deleted! Fix this by building up the new line instead of trying to clear and append in place. This works out nicely as we now do fewer document view updates when removing a range. :^)
2020-05-17LibGUI: TextEditor now opts in to emoji input by default :^)Andreas Kling
2020-05-17LibGUI: Add a simple emoji input dialog activated by Ctrl+Alt+Space :^)Andreas Kling
Widgets can now opt in to emoji input via set_accepts_emoji_input(). If the focused widget accepts emoji input, we'll pop up a simple dialog with all the available emojis as clickable buttons. You can press escape if you change your mind and don't want an emoji. This UI layout definitely will not scale as we add more emojis, but it works for the moment, and we can adapt it as we go. Pretty cool! :^)
2020-05-17LibGUI: Make the TextEditor widget store UTF-32 codepointsAndreas Kling
A TextDocumentLine is now backed by a non-null-terminated sequence of Unicode codepoints encoded as UTF-32 (one u32 per codepoint.) This makes it possible to view and edit arbitrary Unicode text without strange cursor and selection behavior. You can freely copy and paste emojis between TextEditor and Terminal now. :^) Storing UTF-32 is quite space-inefficient, but we should be able to use the same optimization techniques as LibVT does to reduce it in the typical case where most text is ASCII. There are a lot of things that can be cleaned up around this code, but this works well enough that I'm pretty happy with it.
2020-05-16LibGUI+WindowServer: Allow applications to set custom cursor bitmapsShannon Booth
This will allow e.g PaintBrush to use custom cursors for each tool.
2020-05-16FileManager+LibGUI+Userland: Switch clipboard to MIME typesSergey Bugaev
We will now actually use MIME types for clipboard. The default type is now "text/plain" (instead of just "text"). This also fixes some issues in copy(1) and paste(1).
2020-05-15LibGUI: Fix build (LibGUI depends on Clipboard IPC classes)Andreas Kling
2020-05-14Clipboard: Move the system clipboard to a dedicated service process :^)Andreas Kling
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-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-13LibGUI: Add AbstractTableView::move_selection(int steps)Andreas Kling
This allows embedders to step the selection up/down and also simplifies AbstractTableView by sharing code between Key_Up and Key_Down. :^)
2020-05-13LibGUI: Add GUI::MessageBox::show_error() convenience functionAndreas Kling
This is just a wrapper around show() that puts up a standard-looking error message.
2020-05-13LibGUI+WindowServer: Allow apps to use the "move" cursor :^)Andreas Kling
2020-05-12LibGUI: Add missing Vector.h include to Event.hAndreas Kling
2020-05-12LibGUI: Include keyboard modifier state with button on_click callsAndreas Kling
This will allow you us to implement special behavior when Ctrl+clicking a button.
2020-05-12LibGUI: Actually check widgets in focus chain for keyboard shortcutsAndreas Kling
We were iterating the ancestor chain of the focused widget when looking for a matching keyboard shortcut, but we didn't actually look at the ancestors at each step. With this fix, we now correctly activate actions found in the ancestor chain of the focused widgets. :^)
2020-05-12LibGUI: Add KeyEvent::to_string()Andreas Kling
This makes it way easier to debug key events.
2020-05-12LibGUI: Use KeyCode stringification helper in Shortcut::to_string()Andreas Kling
2020-05-12LibGUI: Add a way to highlight the focused widget for debuggingAndreas Kling
You can now pass --gui-focus-debug to any GUI::Application and it will draw a cyan rectangle around the currently focused widget.
2020-05-12LibGUI: Allow scrolling through a ComboBox with the mouse wheelAndreas Kling
2020-05-12LibGUI: Add missing window() null check when widget's child is removedAndreas Kling
Before notifying our window that a child was removed, we should first check that we actually have a window! :^)