summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/TabWidget.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-24 22:36:25 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-24 22:36:25 +0200
commitd6bbf12b7c6b56e73408b6528dc4b49cf5b09e06 (patch)
tree6d1752fb979f1c404aa827937391dabc3bdce828 /Libraries/LibGUI/TabWidget.h
parent682f0ac93b91172e87d50bb65f3a7e4b7338de32 (diff)
downloadserenity-d6bbf12b7c6b56e73408b6528dc4b49cf5b09e06.zip
LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
Diffstat (limited to 'Libraries/LibGUI/TabWidget.h')
-rw-r--r--Libraries/LibGUI/TabWidget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibGUI/TabWidget.h b/Libraries/LibGUI/TabWidget.h
index 0bdffad270..85035a95b7 100644
--- a/Libraries/LibGUI/TabWidget.h
+++ b/Libraries/LibGUI/TabWidget.h
@@ -76,6 +76,9 @@ public:
void set_text_alignment(Gfx::TextAlignment alignment) { m_text_alignment = alignment; }
Gfx::TextAlignment text_alignment() const { return m_text_alignment; }
+ void set_uniform_tabs(bool uniform_tabs) { m_uniform_tabs = uniform_tabs; }
+ int uniform_tab_width() const;
+
Function<void(Widget&)> on_change;
protected:
@@ -108,6 +111,7 @@ private:
int m_hovered_tab_index { -1 };
int m_container_padding { 2 };
Gfx::TextAlignment m_text_alignment { Gfx::TextAlignment::Center };
+ bool m_uniform_tabs { false };
};
}