X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fzoombar.C;h=6ed44a6d1d85d55ff85703c89b878b831e2c96e2;hp=274961c0473df18b7d21dd1742a4d40ae9baa296;hb=cb1a1530246ad67fb9be9aa2dbba5b88eb63e933;hpb=9a7a880b549aed850fd3c29abb152d69a94e23f8 diff --git a/cinelerra-5.1/cinelerra/zoombar.C b/cinelerra-5.1/cinelerra/zoombar.C index 274961c0..6ed44a6d 100644 --- a/cinelerra-5.1/cinelerra/zoombar.C +++ b/cinelerra-5.1/cinelerra/zoombar.C @@ -148,9 +148,22 @@ int ZoomBar::draw() } void ZoomBar::update_autozoom() +{ + update_autozoom(mwindow->edl->local_session->zoombar_showautocolor); +} + +void ZoomBar::update_autozoom(int grouptype, int color) +{ + mwindow->edl->local_session->zoombar_showautotype = grouptype; + update_autozoom(color); +} + +void ZoomBar::update_autozoom(int color) { char string[BCTEXTLEN]; int autogroup_type = mwindow->edl->local_session->zoombar_showautotype; + mwindow->edl->local_session->zoombar_showautocolor = color; + if( color < 0 ) color = get_resources()->default_text_color; switch( autogroup_type ) { case AUTOGROUPTYPE_AUDIO_FADE: case AUTOGROUPTYPE_VIDEO_FADE: @@ -176,6 +189,7 @@ void ZoomBar::update_autozoom() auto_type->set_text(group_name); } + int ZoomBar::update() { sample_zoom->update(mwindow->edl->local_session->zoom_sample); @@ -201,7 +215,7 @@ TitleAlphaBar::TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y) this->mwindow = mwindow; this->zoombar = zoombar; set_precision(0.01); - set_tooltip(_("Title Alpha")); + enable_show_value(0); } int TitleAlphaBar::handle_event() @@ -224,7 +238,7 @@ TitleAlphaText::TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y) int TitleAlphaText::handle_event() { - float v = atof(get_text())*100; + float v = atof(get_text()); mwindow->session->title_bar_alpha = v; zoombar->title_alpha_bar->update(v); mwindow->gui->draw_trackmovement(); @@ -426,7 +440,7 @@ int AutoZoom::handle_down_event() 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) + : BC_PopupMenu(x, y, wid, to_text(mwindow->edl->local_session->zoombar_showautotype), 1) { this->mwindow = mwindow; this->zoombar = zoombar; @@ -467,6 +481,20 @@ int AutoTypeMenu::from_text(char *text) return AUTOGROUPTYPE_INT255; } +int AutoTypeMenu::draw_face(int dx) +{ + BC_PopupMenu::draw_face(dx); + int color = mwindow->edl->local_session->zoombar_showautocolor; + if( color >= 0 ) { + set_color(color); + int margin = get_margin(); + int mx = margin+5, my = 3*margin/8; + int bh = get_h() - 2*my; + draw_box(mx,my, bh,bh); + } + return 1; +} + int AutoTypeMenu::handle_event() { mwindow->edl->local_session->zoombar_showautotype = from_text(this->get_text());