FbWinFrame should not depend on class Fluxbox
This commit is contained in:
parent
1cdeabc7fc
commit
98209ba704
3 changed files with 6 additions and 5 deletions
|
@ -32,7 +32,6 @@
|
||||||
#include "FbTk/Transparent.hh"
|
#include "FbTk/Transparent.hh"
|
||||||
#include "CompareWindow.hh"
|
#include "CompareWindow.hh"
|
||||||
#include "FbWinFrameTheme.hh"
|
#include "FbWinFrameTheme.hh"
|
||||||
#include "fluxbox.hh"
|
|
||||||
|
|
||||||
#include "Container.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,
|
FbTk::TextButton *button = new FbTk::TextButton(m_tab_container,
|
||||||
theme().font(),
|
theme().font(),
|
||||||
title);
|
title);
|
||||||
|
@ -346,7 +346,7 @@ FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Comma
|
||||||
FbTk::RefCount<FbTk::Command> refcmd(command);
|
FbTk::RefCount<FbTk::Command> refcmd(command);
|
||||||
button->setOnClick(refcmd);
|
button->setOnClick(refcmd);
|
||||||
|
|
||||||
button->setTextPadding(Fluxbox::instance()->getTabsPadding());
|
button->setTextPadding(tabs_padding);
|
||||||
button->setJustify(theme().justify());
|
button->setJustify(theme().justify());
|
||||||
|
|
||||||
m_tab_container.insertItem(button);
|
m_tab_container.insertItem(button);
|
||||||
|
|
|
@ -110,7 +110,7 @@ public:
|
||||||
/// remove all buttons from titlebar
|
/// remove all buttons from titlebar
|
||||||
void removeAllButtons();
|
void removeAllButtons();
|
||||||
/// adds a button to label window with specified title and command
|
/// 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);
|
// void addLabelButton(FbTk::TextButton &btn);
|
||||||
/// removes a specific button from label window
|
/// removes a specific button from label window
|
||||||
void removeTab(ButtonId id);
|
void removeTab(ButtonId id);
|
||||||
|
|
|
@ -3950,7 +3950,8 @@ void FluxboxWindow::ungrabPointer(Time time) {
|
||||||
void FluxboxWindow::associateClient(WinClient &client) {
|
void FluxboxWindow::associateClient(WinClient &client) {
|
||||||
|
|
||||||
FbWinFrame::ButtonId btn = frame().createTab(client.title(),
|
FbWinFrame::ButtonId btn = frame().createTab(client.title(),
|
||||||
new SetClientCmd(client));
|
new SetClientCmd(client),
|
||||||
|
Fluxbox::instance()->getTabsPadding());
|
||||||
|
|
||||||
m_labelbuttons[&client] = btn;
|
m_labelbuttons[&client] = btn;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue