added one more render option for renderButton, force render of focused. Listening to attention signal from Window.
This commit is contained in:
parent
35934ff23e
commit
4d48f7576b
1 changed files with 20 additions and 6 deletions
|
@ -596,6 +596,14 @@ void IconbarTool::update(FbTk::Subject *subj) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
} else if (subj == &(winsubj->win().attentionSig())) {
|
||||||
|
// render with titlebar focus, on attention
|
||||||
|
IconButton *button = findButton(winsubj->win());
|
||||||
|
if (button) {
|
||||||
|
renderButton(*button, true,
|
||||||
|
winsubj->win().frame().focused() ? 1 : 0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
// signal not handled
|
// signal not handled
|
||||||
return;
|
return;
|
||||||
|
@ -659,14 +667,14 @@ IconButton *IconbarTool::findButton(FluxboxWindow &win) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void IconbarTool::renderWindow(FluxboxWindow &win) {
|
void IconbarTool::renderWindow(FluxboxWindow &win) {
|
||||||
IconButton *button = findButton(win);
|
IconButton *button = findButton(win);
|
||||||
if (button == 0)
|
if (button == 0)
|
||||||
return;
|
return;
|
||||||
renderButton(*button);
|
renderButton(*button);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
void IconbarTool::updateSizing() {
|
void IconbarTool::updateSizing() {
|
||||||
m_icon_container.setBorderWidth(m_theme.border().width());
|
m_icon_container.setBorderWidth(m_theme.border().width());
|
||||||
|
|
||||||
|
@ -771,7 +779,8 @@ void IconbarTool::renderTheme() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IconbarTool::renderButton(IconButton &button, bool clear) {
|
void IconbarTool::renderButton(IconButton &button, bool clear,
|
||||||
|
int focusOption) {
|
||||||
|
|
||||||
button.setPixmap(*m_rc_use_pixmap);
|
button.setPixmap(*m_rc_use_pixmap);
|
||||||
button.setAlpha(m_alpha);
|
button.setAlpha(m_alpha);
|
||||||
|
@ -788,8 +797,13 @@ void IconbarTool::renderButton(IconButton &button, bool clear) {
|
||||||
// button.height() != m_icon_container.back()->height());
|
// button.height() != m_icon_container.back()->height());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (button.win().isFocused()) { // focused texture
|
if (focusOption == 1 ||
|
||||||
m_icon_container.setSelected(m_icon_container.find(&button));
|
(focusOption == -1 &&
|
||||||
|
button.win().isFocused())) {
|
||||||
|
|
||||||
|
// focused texture
|
||||||
|
if (button.win().isFocused())
|
||||||
|
m_icon_container.setSelected(m_icon_container.find(&button));
|
||||||
|
|
||||||
button.setGC(m_theme.focusedText().textGC());
|
button.setGC(m_theme.focusedText().textGC());
|
||||||
button.setFont(m_theme.focusedText().font());
|
button.setFont(m_theme.focusedText().font());
|
||||||
|
@ -891,7 +905,7 @@ void IconbarTool::addWindow(FluxboxWindow &win) {
|
||||||
win.dieSig().attach(this);
|
win.dieSig().attach(this);
|
||||||
win.workspaceSig().attach(this);
|
win.workspaceSig().attach(this);
|
||||||
win.stateSig().attach(this);
|
win.stateSig().attach(this);
|
||||||
|
win.attentionSig().attach(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IconbarTool::updateIcons() {
|
void IconbarTool::updateIcons() {
|
||||||
|
|
Loading…
Reference in a new issue