aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-26 12:34:48 (GMT)
committerfluxgen <fluxgen>2003-04-26 12:34:48 (GMT)
commiteb9b2363e3ea8601b09599d444a2486a904e39ac (patch)
tree5b066dceae3aae6dedf42cac63147e7c46d56356
parent007fb25e821c0ea8fb6419626464a8d9d79aa9b2 (diff)
downloadfluxbox_paul-eb9b2363e3ea8601b09599d444a2486a904e39ac.zip
fluxbox_paul-eb9b2363e3ea8601b09599d444a2486a904e39ac.tar.bz2
minor transparent fixes
-rw-r--r--src/FbTk/Menu.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 0db0548..1882be6 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.15 2003/04/25 16:23:59 fluxgen Exp $ 25// $Id: Menu.cc,v 1.16 2003/04/26 12:34:48 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -87,7 +87,9 @@ Menu::Menu(MenuTheme &tm, int screen_num, ImageControl &imgctrl):
87 m_screen_height(DisplayHeight(m_display, screen_num)), 87 m_screen_height(DisplayHeight(m_display, screen_num)),
88 m_alignment(ALIGNDONTCARE), 88 m_alignment(ALIGNDONTCARE),
89 m_border_width(0), 89 m_border_width(0),
90 m_themeobserver(*this), m_trans(new Transparent(0, 0, 255, screen_num)), 90 m_themeobserver(*this),
91 m_trans(new Transparent(getRootPixmap(screen_num), 0,
92 s_alpha, screen_num)),
91 m_need_update(true) { 93 m_need_update(true) {
92 94
93 // make sure we get updated when the theme is reloaded 95 // make sure we get updated when the theme is reloaded
@@ -177,7 +179,7 @@ Menu::~Menu() {
177 menu.window.hide(); 179 menu.window.hide();
178 180
179 if (shown && shown->window() == window()) 181 if (shown && shown->window() == window())
180 shown = (Menu *) 0; 182 shown = 0;
181 183
182 while (!menuitems.empty()) { 184 while (!menuitems.empty()) {
183 delete menuitems.back(); 185 delete menuitems.back();
@@ -369,11 +371,9 @@ void Menu::update() {
369 const FbTk::Texture &frame_tex = m_theme.frameTexture(); 371 const FbTk::Texture &frame_tex = m_theme.frameTexture();
370 if (frame_tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { 372 if (frame_tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
371 menu.frame_pixmap = None; 373 menu.frame_pixmap = None;
372 // menu.frame.setBackgroundColor(frame_tex.color());
373 } else { 374 } else {
374 menu.frame_pixmap = 375 menu.frame_pixmap =
375 m_image_ctrl.renderImage(menu.width, menu.frame_h, frame_tex); 376 m_image_ctrl.renderImage(menu.width, menu.frame_h, frame_tex);
376 // menu.frame.setBackgroundPixmap(menu.frame_pixmap);
377 } 377 }
378 378
379 if (tmp) 379 if (tmp)
@@ -548,8 +548,6 @@ void Menu::redrawTitle() {
548 text, len, // text string with lenght 548 text, len, // text string with lenght
549 dx, font.ascent() + menu.bevel_w); // position 549 dx, font.ascent() + menu.bevel_w); // position
550 if (m_trans.get()) { 550 if (m_trans.get()) {
551 if (m_trans->alpha() != s_alpha)
552 m_trans->setAlpha(s_alpha);
553 551
554 if (m_trans->alpha() != 255) { 552 if (m_trans->alpha() != 255) {
555 Pixmap root_pm = getRootPixmap(menu.window.screenNumber()); 553 Pixmap root_pm = getRootPixmap(menu.window.screenNumber());
@@ -839,9 +837,9 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_
839 item_x, item_y, 837 item_x, item_y,
840 menu.item_w, menu.item_h, False); 838 menu.item_w, menu.item_h, False);
841 839
840 if (m_trans->alpha() != s_alpha)
841 m_trans->setAlpha(s_alpha);
842 if (m_trans.get() && render_trans) { 842 if (m_trans.get() && render_trans) {
843 if (m_trans->alpha() != s_alpha)
844 m_trans->setAlpha(s_alpha);
845 843
846 if (m_trans->alpha() != 255) { 844 if (m_trans->alpha() != 255) {
847 Pixmap root_pm = getRootPixmap(menu.window.screenNumber()); 845 Pixmap root_pm = getRootPixmap(menu.window.screenNumber());
@@ -983,8 +981,6 @@ void Menu::buttonReleaseEvent(XButtonEvent &re) {
983 } 981 }
984 } else 982 } else
985 drawItem(p, false, true, true); 983 drawItem(p, false, true, true);
986
987
988 } 984 }
989} 985}
990 986