From 98209ba704e047c8f8f7df08fbb5849e3294cc68 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 19 Feb 2006 11:44:57 +0000 Subject: FbWinFrame should not depend on class Fluxbox --- src/FbWinFrame.cc | 6 +++--- src/FbWinFrame.hh | 2 +- src/Window.cc | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 02af8d3..8e7c455 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -32,7 +32,6 @@ #include "FbTk/Transparent.hh" #include "CompareWindow.hh" #include "FbWinFrameTheme.hh" -#include "fluxbox.hh" #include "Container.hh" @@ -332,7 +331,8 @@ void FbWinFrame::removeAllButtons() { } } -FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Command *command) { +FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Command *command, + int tabs_padding) { FbTk::TextButton *button = new FbTk::TextButton(m_tab_container, theme().font(), title); @@ -346,7 +346,7 @@ FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Comma FbTk::RefCount refcmd(command); button->setOnClick(refcmd); - button->setTextPadding(Fluxbox::instance()->getTabsPadding()); + button->setTextPadding(tabs_padding); button->setJustify(theme().justify()); m_tab_container.insertItem(button); diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 71aed58..bc4c1be 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -110,7 +110,7 @@ public: /// remove all buttons from titlebar void removeAllButtons(); /// adds a button to label window with specified title and command - ButtonId createTab(const std::string &title, FbTk::Command *cmd); + ButtonId createTab(const std::string &title, FbTk::Command *cmd, int tab_padding); // void addLabelButton(FbTk::TextButton &btn); /// removes a specific button from label window void removeTab(ButtonId id); diff --git a/src/Window.cc b/src/Window.cc index 5ef606b..a3b20f9 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -3950,7 +3950,8 @@ void FluxboxWindow::ungrabPointer(Time time) { void FluxboxWindow::associateClient(WinClient &client) { FbWinFrame::ButtonId btn = frame().createTab(client.title(), - new SetClientCmd(client)); + new SetClientCmd(client), + Fluxbox::instance()->getTabsPadding()); m_labelbuttons[&client] = btn; -- cgit v0.11.2