X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fguicast%2Fbcpopupmenu.C;h=e65b40d6552b11d7ecfb5ee0f507376c9148ba7e;hb=39d4e483b6daeb2d0eb2a6eec5b2e96552e22c5b;hp=486c0f5022611c7d9848a6b043725d0cdba9fa74;hpb=2d99bb8ce591f05a31464b517d85dc2bc35b2abe;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/guicast/bcpopupmenu.C b/cinelerra-5.0/guicast/bcpopupmenu.C index 486c0f50..e65b40d6 100644 --- a/cinelerra-5.0/guicast/bcpopupmenu.C +++ b/cinelerra-5.0/guicast/bcpopupmenu.C @@ -74,7 +74,7 @@ BC_PopupMenu::BC_PopupMenu(int x, const char *text, int use_title, VFrame **data) - : BC_SubWindow(x, y, w, -1, -1) + : BC_SubWindow(x, y, 0, -1, -1) { highlighted = popup_down = 0; menu_popup = 0; @@ -86,7 +86,7 @@ BC_PopupMenu::BC_PopupMenu(int x, images[i] = 0; } this->data = data; - this->w_argument = 0; + this->w_argument = -1; status = BUTTON_UP; } @@ -166,7 +166,7 @@ int BC_PopupMenu::set_images(VFrame **data) images[i] = new BC_Pixmap(parent_window, data[i], PIXMAP_ALPHA); } - if(w_argument > 0) + if(w_argument >= 0) w = w_argument + margin + resources->popupmenu_triangle_margin; @@ -257,9 +257,9 @@ int BC_PopupMenu::draw_title(int flush) get_h() / 2 - icon->get_h() / 2 + offset); } - draw_triangle_down_flat(get_w() - margin - resources->popupmenu_triangle_margin, - get_h() / 2 - TRIANGLE_H / 2, - TRIANGLE_W, TRIANGLE_H); + if( use_title >= 0 ) + draw_triangle_down_flat(get_w() - margin - resources->popupmenu_triangle_margin, + get_h() / 2 - TRIANGLE_H / 2, TRIANGLE_W, TRIANGLE_H); flash(flush); return 0;