X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcpopupmenu.C;h=a502ee084abd8686e74637a2689adfc8d5346dd1;hb=a362e21c488404bdafd832c23d03bdfca6a87b80;hp=ee78dbb371179e6770f8e73a97ab376c71d10798;hpb=05a3780d6edd6a792f0dde46ed69e4b740af5a51;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcpopupmenu.C b/cinelerra-5.1/guicast/bcpopupmenu.C index ee78dbb3..a502ee08 100644 --- a/cinelerra-5.1/guicast/bcpopupmenu.C +++ b/cinelerra-5.1/guicast/bcpopupmenu.C @@ -37,8 +37,8 @@ #define TOTAL_IMAGES 3 -#define TRIANGLE_W 10 -#define TRIANGLE_H 10 +#define TRIANGLE_W xS(10) +#define TRIANGLE_H yS(10) BC_PopupMenu::BC_PopupMenu(int x, int y, int w, const char *text, @@ -118,8 +118,8 @@ int BC_PopupMenu::initialize() } else { // Move outside window if no title - x = -10; y = -10; - w = 10; h = 10; + x = -TRIANGLE_W; y = -TRIANGLE_H; + w = TRIANGLE_W; h = TRIANGLE_H; } BC_SubWindow::initialize(); @@ -216,13 +216,13 @@ int BC_PopupMenu::draw_face(int dx, int color) int available_w = get_w() - calculate_w(margin, 0, use_title); if( !icon ) { - char truncated[BCTEXTLEN]; - truncate_text(truncated, text, available_w); + char *truncated = get_truncated_text(MEDIUMFONT, text, available_w); set_font(MEDIUMFONT); BC_WindowBase::draw_center_text( dx + available_w/2 + margin + offset, (int)((float)get_h()/2 + get_text_ascent(MEDIUMFONT)/2 - 2) + offset, truncated); + delete [] truncated; } if( icon ) { @@ -293,7 +293,7 @@ int BC_PopupMenu::menu_activate() w, h, 0, 1); } else - menu_popup->activate_menu(x+3, y+3, w, h, 0, 1); + menu_popup->activate_menu(x+xS(3), y+yS(3), w, h, 0, 1); popup_down = 1; if( use_title ) draw_title(1); }