all repos — fluxbox @ e048bdfd7a2ee472285f2243ba37efcb7b479681

custom fork of the fluxbox windowmanager

system tray border patch from matteo
Matteo Galiazzo matteo@maltesenarrazioni.it
commit

e048bdfd7a2ee472285f2243ba37efcb7b479681

parent

f68c36264ba0c3732ac4c72ced387a5b5fe1b489

2 files changed, 11 insertions(+), 5 deletions(-)

jump to
M src/SystemTray.ccsrc/SystemTray.cc

@@ -155,7 +155,7 @@ SystemTray &m_tray;

}; SystemTray::SystemTray(const FbTk::FbWindow& parent, - FbTk::ThemeProxy<ButtonTheme> &theme, BScreen& screen): + FbTk::ThemeProxy<ToolTheme> &theme, BScreen& screen): ToolbarItem(ToolbarItem::FIXED), m_window(parent, 0, 0, 1, 1, ExposureMask | ButtonPressMask | ButtonReleaseMask | SubstructureNotifyMask | SubstructureRedirectMask),
M src/SystemTray.hhsrc/SystemTray.hh

@@ -27,6 +27,7 @@ #include "FbTk/FbWindow.hh"

#include "FbTk/EventHandler.hh" #include "FbTk/Observer.hh" +#include "ToolTheme.hh" #include "ToolbarItem.hh" #include <list>

@@ -44,7 +45,7 @@ class SystemTray: public ToolbarItem, public FbTk::EventHandler, public FbTk::Observer {

public: explicit SystemTray(const FbTk::FbWindow &parent, - FbTk::ThemeProxy<ButtonTheme> &theme, BScreen& screen); + FbTk::ThemeProxy<ToolTheme> &theme, BScreen& screen); virtual ~SystemTray(); void move(int x, int y);

@@ -70,8 +71,13 @@

int numClients() const { return m_clients.size(); } const FbTk::FbWindow &window() const { return m_window; } - void renderTheme(unsigned char alpha) { m_window.setAlpha(alpha); update(0); } - void updateSizing() {} + void renderTheme(unsigned char alpha) { + m_window.setBorderWidth(m_theme->border().width()); + m_window.setBorderColor(m_theme->border().color()); + m_window.setAlpha(alpha); + update(0); + } + void updateSizing() { m_window.setBorderWidth(m_theme->border().width()); } void parentMoved() { m_window.parentMoved(); }

@@ -90,7 +96,7 @@ void hideClient(TrayWindow *traywin, bool destroyed = false);

void showClient(TrayWindow *traywin); FbTk::FbWindow m_window; - FbTk::ThemeProxy<ButtonTheme> &m_theme; + FbTk::ThemeProxy<ToolTheme> &m_theme; BScreen& m_screen; Pixmap m_pixmap;