diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-20 14:23:21 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-20 14:23:21 +0100 |
commit | 85271a4dd8b21cd877791530293151ec94b0df99 (patch) | |
tree | a649e5e4437181cd7933c3bdd4e885f7cc734743 /Userland/Libraries/LibGUI/BreadcrumbBar.cpp | |
parent | 4853576db7f467df27173773d69a5b4fcff8123e (diff) | |
download | serenity-85271a4dd8b21cd877791530293151ec94b0df99.zip |
LibGUI: Allow setting a tooltip on BreadcrumbBar segments
Diffstat (limited to 'Userland/Libraries/LibGUI/BreadcrumbBar.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/BreadcrumbBar.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/BreadcrumbBar.cpp b/Userland/Libraries/LibGUI/BreadcrumbBar.cpp index 9df961dc7d..b95e756c86 100644 --- a/Userland/Libraries/LibGUI/BreadcrumbBar.cpp +++ b/Userland/Libraries/LibGUI/BreadcrumbBar.cpp @@ -92,12 +92,13 @@ void BreadcrumbBar::clear_segments() remove_all_children(); } -void BreadcrumbBar::append_segment(const String& text, const Gfx::Bitmap* icon, const String& data) +void BreadcrumbBar::append_segment(String text, const Gfx::Bitmap* icon, String data, String tooltip) { auto& button = add<BreadcrumbButton>(); button.set_button_style(Gfx::ButtonStyle::CoolBar); button.set_text(text); button.set_icon(icon); + button.set_tooltip(move(tooltip)); button.set_focus_policy(FocusPolicy::TabFocus); button.set_checkable(true); button.set_exclusive(true); |