From e048bdfd7a2ee472285f2243ba37efcb7b479681 Mon Sep 17 00:00:00 2001 From: Matteo Galiazzo Date: Tue, 15 Apr 2008 01:55:14 -0700 Subject: system tray border patch from matteo --- src/SystemTray.cc | 2 +- src/SystemTray.hh | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/SystemTray.cc b/src/SystemTray.cc index 5aa7323..4275099 100644 --- a/src/SystemTray.cc +++ b/src/SystemTray.cc @@ -155,7 +155,7 @@ private: }; SystemTray::SystemTray(const FbTk::FbWindow& parent, - FbTk::ThemeProxy &theme, BScreen& screen): + FbTk::ThemeProxy &theme, BScreen& screen): ToolbarItem(ToolbarItem::FIXED), m_window(parent, 0, 0, 1, 1, ExposureMask | ButtonPressMask | ButtonReleaseMask | SubstructureNotifyMask | SubstructureRedirectMask), diff --git a/src/SystemTray.hh b/src/SystemTray.hh index 2e3a4ea..3215e31 100644 --- a/src/SystemTray.hh +++ b/src/SystemTray.hh @@ -27,6 +27,7 @@ #include "FbTk/EventHandler.hh" #include "FbTk/Observer.hh" +#include "ToolTheme.hh" #include "ToolbarItem.hh" #include @@ -44,7 +45,7 @@ class SystemTray: public ToolbarItem, public FbTk::EventHandler, public FbTk::Ob public: explicit SystemTray(const FbTk::FbWindow &parent, - FbTk::ThemeProxy &theme, BScreen& screen); + FbTk::ThemeProxy &theme, BScreen& screen); virtual ~SystemTray(); void move(int x, int y); @@ -70,8 +71,13 @@ public: 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 @@ private: void showClient(TrayWindow *traywin); FbTk::FbWindow m_window; - FbTk::ThemeProxy &m_theme; + FbTk::ThemeProxy &m_theme; BScreen& m_screen; Pixmap m_pixmap; -- cgit v0.11.2