mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:17:34 +00:00
LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
This commit is contained in:
parent
682f0ac93b
commit
d6bbf12b7c
3 changed files with 17 additions and 5 deletions
|
@ -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 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue