all repos — fluxbox @ 261ae69cd1fefeb053390853c5cfc83a5a576298

custom fork of the fluxbox windowmanager

added alpha option for transparent
fluxgen fluxgen
commit

261ae69cd1fefeb053390853c5cfc83a5a576298

parent

10c972f7f790fa3d48d9f41abe4cce2933e8f5e3

2 files changed, 15 insertions(+), 3 deletions(-)

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

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.cc,v 1.6 2003/07/10 14:17:18 fluxgen Exp $ +// $Id: FbWinFrameTheme.cc,v 1.7 2003/08/04 12:49:20 fluxgen Exp $ #include "FbWinFrameTheme.hh" #include "App.hh"

@@ -57,7 +57,9 @@ m_button_unfocus_color(*this, "window.button.unfocus.picColor", "Window.Button.Unfocus.PicColor"),

m_font(*this, "window.font", "Window.Font"), m_textjustify(*this, "window.justify", "Window.Justify"), - m_shape_place(*this, "window.roundCorners", "Window.RoundCorners") { + m_shape_place(*this, "window.roundCorners", "Window.RoundCorners"), + + m_alpha(*this, "window.alpha", "Window.Alpha") { // create GCs Display *disp = FbTk::App::instance()->display();

@@ -83,6 +85,10 @@ XFreeGC(disp, m_button_pic_unfocus_gc);

} void FbWinFrameTheme::reconfigTheme() { + if (*m_alpha > 255) + *m_alpha = 255; + else if (*m_alpha < 0) + *m_alpha = 0; XGCValues gcv; unsigned long gc_value_mask = GCForeground;
M src/FbWinFrameTheme.hhsrc/FbWinFrameTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrameTheme.hh,v 1.6 2003/07/10 11:38:12 fluxgen Exp $ +// $Id: FbWinFrameTheme.hh,v 1.7 2003/08/04 12:49:20 fluxgen Exp $ #ifndef FBWINFRAMETHEME_HH #define FBWINFRAMETHEME_HH

@@ -88,6 +88,9 @@ inline Cursor lowerLeftAngleCursor() const { return m_cursor_lower_left_angle; }

inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; } inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } + + unsigned char alpha() const { return *m_alpha; } + private: FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus; FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus;

@@ -103,8 +106,11 @@ FbTk::ThemeItem<FbTk::Font> m_font;

FbTk::ThemeItem<FbTk::Justify> m_textjustify; FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; + FbTk::ThemeItem<int> m_alpha; + GC m_label_text_focus_gc, m_label_text_unfocus_gc; GC m_button_pic_focus_gc, m_button_pic_unfocus_gc; + FbTk::Subject m_theme_change; Cursor m_cursor_move, m_cursor_lower_left_angle, m_cursor_lower_right_angle;