summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/BreadcrumbBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-20 14:23:21 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-20 14:23:21 +0100
commit85271a4dd8b21cd877791530293151ec94b0df99 (patch)
treea649e5e4437181cd7933c3bdd4e885f7cc734743 /Userland/Libraries/LibGUI/BreadcrumbBar.cpp
parent4853576db7f467df27173773d69a5b4fcff8123e (diff)
downloadserenity-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.cpp3
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);