X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=9c29ec997890eb21bcdd92ec752cc1365a2ba26b;hp=062989a2523de2ed498ae69db891f6d4b36f15c6;hb=98e035865979cda9805a58a85d52f8d70a7ec54e;hpb=281532ab870d8f6ded35d8e8555bf974014ace77 diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 062989a2..9c29ec99 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -68,11 +68,7 @@ VWindowGUI::VWindowGUI(MWindow *mwindow, VWindow *vwindow) mwindow->session->vwindow_y, mwindow->session->vwindow_w, mwindow->session->vwindow_h, - 100, - 100, - 1, - 1, - 0) // Hide it + xS(100), yS(100), 1, 1, 0) // Hide it { this->mwindow = mwindow; this->vwindow = vwindow; @@ -367,19 +363,12 @@ int VWindowGUI::keypress_event() case 'Z': mwindow->redo_entry(this); break; - case 'f': - unlock_window(); - if( canvas->get_fullscreen() ) - canvas->stop_fullscreen(); - else - canvas->start_fullscreen(); - lock_window("VWindowGUI::keypress_event 1"); - break; + case 'f': { + int on = canvas->get_fullscreen() ? 0 : 1; + canvas->set_fullscreen(on, 1); + break; } case ESC: - unlock_window(); - if( canvas->get_fullscreen() ) - canvas->stop_fullscreen(); - lock_window("VWindowGUI::keypress_event 2"); + canvas->set_fullscreen(0, 1); break; case KEY_F1: case KEY_F2: @@ -717,13 +706,8 @@ void VWindowEditing::panel_set_labels_follow_edits(int v) {} VWindowSource::VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y) - : BC_PopupTextBox(vwindow, - &vwindow->sources, - "", - x, - y, - 200, - 200) + : BC_PopupTextBox(vwindow, &vwindow->sources, "", + x, y, xS(200), yS(200)) { this->mwindow = mwindow; this->vwindow = vwindow; @@ -824,6 +808,13 @@ void VWindowCanvas::zoom_resize_window(float percentage) gui->resize_event(new_w, new_h); } +void VWindowCanvas::zoom_auto() +{ + EDL *edl = gui->vwindow->get_edl(); + if(!edl) edl = mwindow->edl; + set_zoom(edl, 0); +} + void VWindowCanvas::close_source() { gui->vwindow->interrupt_playback(1); @@ -838,8 +829,9 @@ void VWindowCanvas::draw_refresh(int flush) if( !get_canvas()->get_video_on() ) { int cw = get_canvas()->get_w(), ch = get_canvas()->get_h(); get_canvas()->clear_box(0, 0, cw, ch); - int ow = get_output_w(edl), oh = get_output_h(edl); - if( ow > 0 && oh > 0 && refresh_frame && edl ) { + int ow = edl ? get_output_w(edl) : 0; + int oh = edl ? get_output_h(edl) : 0; + if( ow > 0 && oh > 0 && refresh_frame ) { float in_x1, in_y1, in_x2, in_y2; float out_x1, out_y1, out_x2, out_y2; get_transfers(edl,