Commit graph

14 commits

Author SHA1 Message Date
networkException
2161f20aa6 LibGUI: Call on_segment_change handler from on_{click,focus_change}
The on_segment_change handler introduced in
a00fa793b3 was only getting called by
programmatically setting the segment, not by clicking a button or using
tab navigation.
2022-08-23 12:50:20 +02:00
networkException
c1c11df3b8 LibGUI: Don't call on_segment_change handler if the index did not change
This patch makes the handler's behavior closer to what can be expected
from it's name by not handling set_selected_segment if the segment is
already selected.
2022-08-23 12:50:20 +02:00
Jannis Weis
32205495e6 LibGUI: Clear selected index of Breadcrumbbar if segment is removed
If the segment corresponding to the selected index is removed the index
is no longer valid.
2022-08-22 12:48:11 +02:00
Jannis Weis
a00fa793b3 LibGUI: Add on_segment_change handler to Breadcrumbbar
This allows programs to respond to any selection changes of the
Breadcrumbbar, not just ones made by clicking one of the buttons.
2022-08-22 12:48:11 +02:00
Andreas Kling
ff37ce7408 LibGUI: Make Breadcrumbbar remember the selected segment index
We had a selected_segment() accessor, but the member it returned was
never actually updated.
2022-08-18 20:43:39 +02:00
Simon Wanner
206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Lenny Maiorani
fe3b846ac8 Libraries: Use default constructors/destructors in LibGUI
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-12 14:44:43 -08:00
networkException
4dc23c9b24 LibGUI: Allow breadcrumbbar segment activation using the keyboard
We now interpret a breadcrumbbar segment gaining focus just as clicking
on the segment, allowing keyboard navigation using the arrow keys.
2022-02-13 12:39:44 +01:00
Sam Atkins
e2c32a6c65 Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
Marcus Nilsson
71f345bbb8 LibGUI: Adjust BreadcrumbButtons width on resize
This commit relayouts the BreadcrumbButtons on resize to a shrunken
state if they don't fit. It also caps the button width to 100px to
avoid overflowing the widget.
2021-09-01 01:21:51 +02:00
Sam Atkins
d8e0535116 LibGUI: Add search/removal methods to Breadcrumbbar
Both are used by FileManager in the next commit.

find_segment_with_data() was previously a single-use lambda in
FileManager, but making it a method of Breadcrumbbar means we can
re-use it more easily.
2021-07-01 17:15:26 +04:30
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
a2baab38fd Everywhere: It's now "Foobar", not "FooBar", and not "foo bar"
I hereby declare these to be full nouns that we don't split,
neither by space, nor by underscore:

- Breadcrumbbar
- Coolbar
- Menubar
- Progressbar
- Scrollbar
- Statusbar
- Taskbar
- Toolbar

This patch makes everything consistent by replacing every other variant
of these with the proper one. :^)
2021-04-13 16:58:15 +02:00
Renamed from Userland/Libraries/LibGUI/BreadcrumbBar.cpp (Browse further)