X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftheme.C;h=1700a5b371ea91257d4ae738d381aeb4174ef283;hb=a76213673ecbfe4d860fb20de1b79ebc0d99c004;hp=efb513f052a58ec582a1d65878e9ca25f06f618a;hpb=5d8a7826b0f80f00622e46baf75453995a76e343;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index efb513f0..1700a5b3 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -708,7 +708,7 @@ void Theme::draw_mwindow_bg(MWindowGUI *gui) void Theme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls) { - int total_buttons = !use_commercials ? 15 : 16; + int total_buttons = !use_commercials ? 16 : 17; int edit_w = EditPanel::calculate_w(mwindow, 1, total_buttons); int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin; int zoom_w = ZoomPanel::calculate_w(czoom_w); @@ -730,60 +730,37 @@ SET_TRACE } else { - cmeter_x = mwindow->session->cwindow_w + widget_border; + cmeter_x = mwindow->session->cwindow_w; } - int buttons_h; - - if(edit_w + - widget_border * 2 + - transport_w + widget_border + - zoom_w + widget_border + - division_w + - status_w > cmeter_x) - { - buttons_h = get_image("cbuttons_left")->get_h(); - - cedit_x = widget_border; - cedit_y = mwindow->session->cwindow_h - - buttons_h + - ctimebar_h + - widget_border; - - ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - - get_image_set("autokeyframe")[0]->get_h() - - widget_border; + int buttons_h = get_image("rewind")->get_h() + widget_border; + int panel_y = mwindow->session->cwindow_h - buttons_h + yS(4); + ctransport_x = widget_border; + if( ctransport_x + transport_w + widget_border + + edit_w + widget_border + zoom_w + widget_border + + division_w + status_w > cmeter_x ) { + ctransport_y = panel_y; czoom_x = ctransport_x + transport_w + widget_border; - czoom_y = ctransport_y + widget_border; - - cstatus_x = xS(426); - cstatus_y = mwindow->session->cwindow_h - - get_image("cwindow_active")->get_h() - yS(30); + czoom_y = panel_y; + cstatus_x = xS(440); + cstatus_y = panel_y - yS(2); + int edit_h = EditPanel::calculate_h(mwindow) + widget_border; + buttons_h += edit_h; panel_y -= edit_h; + cedit_x = widget_border; + cedit_y = panel_y; } - else - { - buttons_h = ctimebar_h + - widget_border + - EditPanel::calculate_h(mwindow) + - widget_border; + else { ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - - buttons_h + - ctimebar_h + - widget_border; - + ctransport_y = panel_y; cedit_x = ctransport_x + transport_w + widget_border; - cedit_y = ctransport_y; - + cedit_y = panel_y; czoom_x = cedit_x + edit_w + widget_border; - czoom_y = cedit_y + widget_border; -//printf("Theme::get_cwindow_sizes %d %d %d\n", __LINE__, czoom_x, zoom_w); + czoom_y = panel_y; cstatus_x = czoom_x + zoom_w + division_w; - cstatus_y = ctransport_y; + cstatus_y = panel_y; } - + buttons_h += ctimebar_h; ccomposite_x = xS(0); ccomposite_y = yS(5); @@ -927,18 +904,17 @@ void Theme::draw_resource_bg(TrackCanvas *canvas, ResourcePixmap *pixmap, int co void Theme::get_vwindow_sizes(VWindowGUI *gui) { - int edit_w = EditPanel::calculate_w(mwindow, 0, 10); + int edit_w = EditPanel::calculate_w(mwindow, 0, 12); int transport_w = PlayTransport::get_transport_width(mwindow) + toggle_margin; // Space between buttons & time int division_w = xS(30); - vtime_w = xS(150); + vtime_w = xS(120); vtimebar_h = yS(16); int vtime_border = xS(15); vmeter_y = widget_border; vmeter_h = mwindow->session->vwindow_h - cmeter_y - widget_border; - int buttons_h; if(mwindow->edl->session->vwindow_meter) { vmeter_x = mwindow->session->vwindow_w - @@ -948,55 +924,39 @@ void Theme::get_vwindow_sizes(VWindowGUI *gui) } else { - vmeter_x = mwindow->session->vwindow_w + widget_border; + vmeter_x = mwindow->session->vwindow_w; } vcanvas_x = 0; vcanvas_y = 0; vcanvas_w = vmeter_x - vcanvas_x - widget_border; - if(edit_w + - widget_border * 2 + - transport_w + widget_border + - vtime_w + division_w + - vtime_border > vmeter_x) - { - buttons_h = get_image("vbuttons_left")->get_h(); + int buttons_h = get_image("rewind")->get_h() + widget_border; + int panel_y = mwindow->session->vwindow_h - buttons_h + yS(4); + vtransport_x = widget_border; + if( vtransport_x + transport_w + widget_border + + edit_w + widget_border + vtime_w + xS(40) + widget_border > vmeter_x ) { + vtransport_y = panel_y; + vzoom_x = vtransport_x + transport_w + widget_border; + vzoom_y = panel_y; + vdivision_x = xS(320); + vtime_x = vdivision_x; + vtime_y = panel_y; + int edit_h = EditPanel::calculate_h(mwindow) + widget_border; + buttons_h += edit_h; panel_y -= edit_h; vedit_x = widget_border; - vedit_y = mwindow->session->vwindow_h - - buttons_h + - vtimebar_h + - widget_border; - - vtransport_x = widget_border; - vtransport_y = mwindow->session->vwindow_h - - get_image_set("autokeyframe")[0]->get_h() - - widget_border; - - vdivision_x = xS(280); - vtime_x = vedit_x + xS(20); //vdivision_x; - vtime_y = vedit_y + yS(30); //+ yS(20); + vedit_y = panel_y; } - else - { - buttons_h = vtimebar_h + - widget_border + - EditPanel::calculate_h(mwindow) + - widget_border; + else { vtransport_x = widget_border; - vtransport_y = mwindow->session->vwindow_h - - buttons_h + - vtimebar_h + - widget_border; - + vtransport_y = panel_y; vedit_x = vtransport_x + transport_w + widget_border; - vedit_y = vtransport_y; - + vedit_y = panel_y; vdivision_x = vedit_x + edit_w + division_w; vtime_x = vdivision_x + vtime_border; - vtime_y = vedit_y + widget_border; + vtime_y = panel_y; } - + buttons_h += vtimebar_h; // vtimebar_x = vcanvas_x; // vtimebar_y = vcanvas_y + vcanvas_h; @@ -1006,7 +966,6 @@ void Theme::get_vwindow_sizes(VWindowGUI *gui) vtimebar_x = 0; vtimebar_y = vcanvas_y + vcanvas_h; vtimebar_w = vmeter_x - widget_border; - }