summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
AgeCommit message (Collapse)Author
2022-01-22LibGUI: Use Font::glyph_or_emoji_width() in TextEditorMaciej
This fixes selection of text containing emoji when variable-width font is set.
2022-01-21LibGUI: Allow Button::set_icon to accept a bitmap without a moveDylan Katz
Previously, Button::set_icon required moving the bitmap into the button, preventing the same bitmap from being used by multiple buttons at once. While this works for buttons that are created once, any button that is dynamically added would require the same bitmap to be loaded every single time. In addition to being ineffecient, this also makes error checking more difficult. With this change, a bitmap can be loaded once, and passed to multiple buttons.
2022-01-20TextEditor: Use FileSystemAccessClient::try_* APIsMustafa Quraish
2022-01-20Userland: Add horizontal mouse scroll supportDmitry Petrov
2022-01-18LibGUI: Use autoscroll from AbstractView when rubberbanding in IconViewMarcus Nilsson
We can re-use the logic used for automatic scrolling in AbstractView when we're doing rubberband scrolling in IconView. This removes some duplicated code.
2022-01-18LibGUI: Add a GitCommit SyntaxHighlighter implementationBrian Gianforcaro
This highlighter just syntax highlights the commented lines in your git commit message. It could potentially be enhanced to handle the rebase UI or other more advanced cases in the future.
2022-01-18EmojiInputDialog: Increase size of buttons and dialogLady Gegga
Display some emojis earlier hidden behind "..." and add spacing.
2022-01-16LibGUI: Allow selecting glyphs by dragging in GlyphMapWidgetthankyouverycool
2022-01-16LibGUI+FontEditor: Move seek-prev/next-glyph logic into GlyphMapWidgetSam Atkins
2022-01-16LibGUI: Add on_glyph_double_clicked() callback to GlyphMapWidgetSam Atkins
This will be used by CharacterMap. In implementing this, extracted the logic for finding which glyph is at a given position within the widget.
2022-01-16LibGUI: Preserve glyph selection when changing fontSam Atkins
2022-01-16LibGUI: Remove unused method definitions from GlyphMapWidgetSam Atkins
These got added recently but were never implemented, so let's remove them. :^)
2022-01-16LibGUI: Recalculate GlyphMapWidget content size when changing fontSam Atkins
Previously, if it was displaying N glyphs per line, then you changed font to one that was a drastically different size, it would continue to display N glyphs per line until you resized the window. Now, we immediately recalculate how many to show, so that they fill the available width. :^)
2022-01-16LibGUI: Make GlyphMapWidget work with vector fontsSam Atkins
This basically just meant replacing the `m_font` field with the one inherited from Widget.
2022-01-16LibGUI+FontEditor: Move GlyphMapWidget to LibGUISam Atkins
This will allow us to use this in other apps, such as the upcoming Character Map. :^)
2022-01-16LibGUI: Make button icons settable in GMLSam Atkins
`Widget::load_from_gml()` doesn't yet return `ErrorOr`, so we log a warning message if loading the icon fails.
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2022-01-14LibGUI: Add `AbstractZoomPanWidget` widget :^)Mustafa Quraish
This is an abstract widget that is meant to handle all the panning / zooming functionality so that all applications implementing it do not have to try to do their own coordinate math.
2022-01-12LibGUI: Print error when failing to load thumbnail in FileSystemModelMarcus Nilsson
If a thumbnail cannot load it's a good opportunity to print out the error message. On top of that, we still want to update m_thumbnail_progress so that the progress bar doesn't get stuck instead of returning early from the lambda.
2022-01-12LibGUI: Add existing children widgets when layout manager changedMatt Jacobson
If a widget gains a layout manager after it already has child widgets, the existing widgets are unknown to the layout. Additionally, if a layout is reused, it may end up managing children of multiple different widgets. To simplify this, clear the entries of a layout manager when its owner changes, and add any existing children when a new owner comes along.
2022-01-12Base+Browser: Add Browser iconselectrikmilk
Add some missing icons to the brower.
2022-01-11LibGUI: Don't paint text cursor if TextEditor is disabledMarcus Nilsson
This looked a bit odd in the rare case of disabling a focused TextEditor.
2022-01-11LibGUI: Change gradient colors when ValueSlider is disabledMarcus Nilsson
Make it more obivous when ValueSlider is disabled by changing the gradient colors.
2022-01-11LibGUI: Make Tableview handle multi-selected indexes when deletingGlenford Williams
Previously when the delete key was pressed, only the first selected cell index would have been deleted. This commit remedies that by first checking when more than a single index is selected.
2022-01-10LibGUI+AK: Add DRAG_DEBUG opt and put drag operations behind dbgln_ifMarcus Nilsson
No need to have this enabled all the time.
2022-01-09LibGUI: Show hours and minutes in "unsaved changes" dialogsRafał Babiarz
2022-01-09LibGUI: Add Menu::set_children_actions_enabled() helperMarcus Nilsson
This adds a helper function to Menu that allows us to set all the children enabled/disabled.
2022-01-09LibGUI+WindowServer: Flash menubar menu when using a keyboard shortcutbugreport0
Briefly flash the menubar menu containing the keyboard shortcut action to give the user immediate visual feedback on their interaction with the system.
2022-01-08LibGUI: Add missing altgr() modifier keyJean-Paul Balabanian
2022-01-07EmojiInputDialog: Ensure that all buttons are equal widthFiliph Sandström
Previously we only set the min size which meant that some emoji buttons was larger than others :^)
2022-01-06LibGUI: Avoid double hash lookup in ModelSelection::add()Andreas Kling
2022-01-06LibGUI: Update the AboutDialog copyright year :^)sin-ack
2022-01-06LibGUI: Move rotate cw/ccw to CommonActionsMarcus Nilsson
The rotate clockwise/rotate counterclockwise actions can be added to CommonActions since they are repeated in FontEditor, ImageViewer and PixelPaint. This keeps the shortcuts and icons consistent across applications.
2022-01-06LibGUI: Calculate row position for scroll into viewmartinfalisse
When a user is navigating a table view with arrow keys and a row is outside of the current view, then scroll_into_view is called, and the position of the rectangle passed to this should take into account the column headers. This can be seen making more pleasant the navigation in the System Monitor in the Processes view, for example.
2022-01-06LibGUI: Table View navigating with arrow keys continuity after updatemartinfalisse
When a user is navigating a table view with arrow keys and a row is outside of the current view, then scroll_into_view is called, and the position of the rectangle passed to this should take into account the column headers. This can be seen making more pleasant the navigation in the System Monitor in the Processes view, for example.
2022-01-05LibGUI: Rename ModelSelection::remove_matching => remove_all_matchingAndreas Kling
Let's be consistent with how Vector, HashTable and HashMap names these.
2022-01-05LibGUI: Use HashTable::remove_all_matching() in GUI::ModelSelectionAndreas Kling
2022-01-05LibGUI: Consume initial spaces when going to next/prev word breakMathieu PATUREL
This impacts text editors' ctrl+left, ctrl+shift+right, ctrl+backspace, etc.. For example, consider the text "Hello world |", pressing ctrl+backspace each time. Before: "hello world |" "hello world|" "hello |" "hello|" "|" After: "hello world |" "hello|" "|" Note that this breaks a nice symmetry. Doing ctrl+left and then ctrl+right doesn't necessarily get you to the same place like it use to. Before: " hello |" " hello| " " hello |" // same as initial After: " hello |" "|hello " " hello| " // different from initial
2022-01-05Base+LibGUI: Add unique "Save As" iconthankyouverycool
Icon by: Mustafa Quraish <mustafaq9@gmail.com>
2022-01-04LibGUI: Don't show "last saved" information for never-saved documentsAndreas Kling
When showing the "unsaved changes" dialog for an empty path, we should say "last saved at ..." since that would be a lie.
2022-01-04LibGUI: Add optional unmodified timestamp to "unsaved changes" dialogsAndreas Kling
This allows us to show "last saved N seconds ago" when asking the user what to do. :^)
2022-01-04LibGUI: Make GUI::UndoStack remember time it was last set to unmodifiedAndreas Kling
This can be used to determine how much time has passed since a document was saved. :^)
2022-01-04LibGUI: Add GUI::MessageBox::ask_about_unsaved_changes()Andreas Kling
This is a static helper function for asking the user what they want to do about unsaved changes. It behaves as a standard Yes/No/Cancel box with text and buttons tailored to the typical unsaved changes use case.
2022-01-04Userland: Resolve -Woverloaded-virtual in LibGUI and SoundPlayerAndrew Kaster
Enable the warning project-wide. It catches when a non-virtual method creates an overload set with a virtual method. This might cause surprising overload resolution depending on how the method is invoked.
2022-01-03LibGUI: Bring entire cell into view after auto scroll into viewmartinfalisse
On account of row and column headers, when a user navigates to a cell (for example in the spreadsheet application) that is outside of the view, the cell is not properly aligned and so is partially cut-off. This fix takes into account the row and column headers when calculating the Rect to pass to the scroll_into_view function.
2022-01-02LibGUI: Increase vertical padding on GUI::IconView item labels by 2pxAndreas Kling
Let's give the text a tiny bit of breathing room.
2022-01-01Theming: Add alignment sectionFiliph Sandström
This commit removes the IsTitleCenter property and replaces it with the TitleAlignment property that supports "Left", "Right" & "Center".
2022-01-01LibGUI: Avoid unnecessary copies in FileIconProviderBen Wiederhake
2022-01-01WindowsServer+LibGUI: Avoid getting color under cursor outside screennetworkException
This patch fixes a crash in ColorPicker caused by the ColorSelectOverlay trying to request the color for a pixel outside the screen rect.
2021-12-30LibGUI: Fix leading whitespaces when text is wrappedYoung-Jin Park
This commit should fix a bug where using leading whitespaces when a line is wrapped results in a crash. Now it should correctly highlight the leading whitespaces even when the leading whitespaces are longer than a line.