FbWinFrame should not depend on class Fluxbox
fluxgen fluxgen
3 files changed,
6 insertions(+),
5 deletions(-)
M
src/FbWinFrame.cc
→
src/FbWinFrame.cc
@@ -32,7 +32,6 @@ #include "FbTk/Compose.hh"
#include "FbTk/Transparent.hh" #include "CompareWindow.hh" #include "FbWinFrameTheme.hh" -#include "fluxbox.hh" #include "Container.hh"@@ -332,7 +331,8 @@ m_buttons_right.pop_back();
} } -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 @@
FbTk::RefCount<FbTk::Command> refcmd(command); button->setOnClick(refcmd); - button->setTextPadding(Fluxbox::instance()->getTabsPadding()); + button->setTextPadding(tabs_padding); button->setJustify(theme().justify()); m_tab_container.insertItem(button);
M
src/FbWinFrame.hh
→
src/FbWinFrame.hh
@@ -110,7 +110,7 @@ void addRightButton(FbTk::Button *btn);
/// 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);
M
src/Window.cc
→
src/Window.cc
@@ -3950,7 +3950,8 @@
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;