X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fzoombar.C;h=6fee32b14ef371ca5aaa3d93b515092e0594262f;hb=318256a48938064b695268d03396977739ef4724;hp=7730d918bc675df3403a1bfcc917bbdad55c95cd;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/zoombar.C b/cinelerra-5.1/cinelerra/zoombar.C index 7730d918..6fee32b1 100644 --- a/cinelerra-5.1/cinelerra/zoombar.C +++ b/cinelerra-5.1/cinelerra/zoombar.C @@ -88,7 +88,12 @@ void ZoomBar::create_objects() track_zoom->zoom_tumbler->set_tooltip(_("Height of tracks in the timeline")); x += track_zoom->get_w() + 10; - add_subwindow(auto_type = new AutoTypeMenu(mwindow, this, x, y)); + int wid = 120; + for( int i=AUTOGROUPTYPE_AUDIO_FADE; i<=AUTOGROUPTYPE_Y; ++i ) { + int ww = BC_GenericButton::calculate_w(this, AutoTypeMenu::to_text(i)); + if( ww > wid ) wid = ww; + } + add_subwindow(auto_type = new AutoTypeMenu(mwindow, this, x, y, wid)); auto_type->create_objects(); x += auto_type->get_w() + 10; #define DEFAULT_TEXT "000.00 to 000.00" @@ -179,6 +184,7 @@ void ZoomBar::update_autozoom() mwindow->edl->local_session->automation_maxs[mwindow->edl->local_session->zoombar_showautotype]); break; case AUTOGROUPTYPE_ZOOM: + case AUTOGROUPTYPE_SPEED: sprintf(string, "%0.03f to %0.03f\n", mwindow->edl->local_session->automation_mins[mwindow->edl->local_session->zoombar_showautotype], mwindow->edl->local_session->automation_maxs[mwindow->edl->local_session->zoombar_showautotype]); @@ -447,8 +453,8 @@ int AutoZoom::handle_down_event() -AutoTypeMenu::AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar, int x, int y) - : BC_PopupMenu(x, y, 120,to_text(mwindow->edl->local_session->zoombar_showautotype), 1) +AutoTypeMenu::AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int wid) + : BC_PopupMenu(x, y, wid, to_text(mwindow->edl->local_session->zoombar_showautotype), 1) { this->mwindow = mwindow; this->zoombar = zoombar; @@ -460,6 +466,7 @@ void AutoTypeMenu::create_objects() add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_AUDIO_FADE))); add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_VIDEO_FADE))); add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_ZOOM))); + add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_SPEED))); add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_X))); add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_Y))); } @@ -470,6 +477,7 @@ const char* AutoTypeMenu::to_text(int mode) case AUTOGROUPTYPE_AUDIO_FADE: return _("Audio Fade:"); case AUTOGROUPTYPE_VIDEO_FADE: return _("Video Fade:"); case AUTOGROUPTYPE_ZOOM: return _("Zoom:"); + case AUTOGROUPTYPE_SPEED: return _("Speed:"); case AUTOGROUPTYPE_X: return "X:"; case AUTOGROUPTYPE_Y: return "Y:"; } @@ -478,16 +486,12 @@ const char* AutoTypeMenu::to_text(int mode) int AutoTypeMenu::from_text(char *text) { - if(!strcmp(text, to_text(AUTOGROUPTYPE_AUDIO_FADE))) - return AUTOGROUPTYPE_AUDIO_FADE; - if(!strcmp(text, to_text(AUTOGROUPTYPE_VIDEO_FADE))) - return AUTOGROUPTYPE_VIDEO_FADE; - if(!strcmp(text, to_text(AUTOGROUPTYPE_ZOOM))) - return AUTOGROUPTYPE_ZOOM; - if(!strcmp(text, to_text(AUTOGROUPTYPE_X))) - return AUTOGROUPTYPE_X; - if(!strcmp(text, to_text(AUTOGROUPTYPE_Y))) - return AUTOGROUPTYPE_Y; + if(!strcmp(text, to_text(AUTOGROUPTYPE_AUDIO_FADE))) return AUTOGROUPTYPE_AUDIO_FADE; + if(!strcmp(text, to_text(AUTOGROUPTYPE_VIDEO_FADE))) return AUTOGROUPTYPE_VIDEO_FADE; + if(!strcmp(text, to_text(AUTOGROUPTYPE_ZOOM))) return AUTOGROUPTYPE_ZOOM; + if(!strcmp(text, to_text(AUTOGROUPTYPE_SPEED))) return AUTOGROUPTYPE_SPEED; + if(!strcmp(text, to_text(AUTOGROUPTYPE_X))) return AUTOGROUPTYPE_X; + if(!strcmp(text, to_text(AUTOGROUPTYPE_Y))) return AUTOGROUPTYPE_Y; return AUTOGROUPTYPE_INT255; }