system tray border patch from matteo

This commit is contained in:
Matteo Galiazzo 2008-04-15 01:55:14 -07:00 committed by Mark Tiefenbruck
parent f68c36264b
commit e048bdfd7a
2 changed files with 11 additions and 5 deletions

View file

@ -155,7 +155,7 @@ private:
};
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),

View file

@ -27,6 +27,7 @@
#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::Ob
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 @@ 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<ButtonTheme> &m_theme;
FbTk::ThemeProxy<ToolTheme> &m_theme;
BScreen& m_screen;
Pixmap m_pixmap;