diff options
Diffstat (limited to 'plugingui/tabwidget.cc')
-rw-r--r-- | plugingui/tabwidget.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugingui/tabwidget.cc b/plugingui/tabwidget.cc index b18f62f..7ba39c9 100644 --- a/plugingui/tabwidget.cc +++ b/plugingui/tabwidget.cc @@ -50,6 +50,16 @@ void TabWidget::addTab(const std::string& title, Widget* widget) sizeChanged(width(), height()); } +void TabWidget::setTabWidth(std::size_t width) +{ + tab_width = width; +} + +std::size_t TabWidget::getTabWidth() const +{ + return tab_width; +} + std::size_t TabWidget::getBarHeight() const { return topbar.height(); @@ -94,7 +104,7 @@ void TabWidget::sizeChanged(int width, int height) { std::size_t pos = 0; - int button_width = 1; + int button_width = tab_width; int bar_height = 25; int button_border_width = 10; |