added alpha option for transparent
This commit is contained in:
parent
10c972f7f7
commit
261ae69cd1
2 changed files with 15 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
// 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 @@ FbWinFrameTheme::FbWinFrameTheme(int screen_num):
|
|||
|
||||
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 @@ FbWinFrameTheme::~FbWinFrameTheme() {
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// 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 @@ public:
|
|||
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 @@ private:
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue