X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Ftheme.C;h=d89c789f76cb95018e954fc1f0d65002c16e0d7c;hb=1db0dacec8f9d7f5687e582bd282d9bf83bd58f0;hp=20e6668889b0b1cd23f14155cb64654042d735a6;hpb=b5bfe3e40a7255ae60a21d885587ada6e145e3d5;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C index 20e66688..d89c789f 100644 --- a/cinelerra-5.1/cinelerra/theme.C +++ b/cinelerra-5.1/cinelerra/theme.C @@ -24,6 +24,7 @@ #include "clip.h" #include "bccolors.h" #include "cwindowgui.h" +#include "edit.h" #include "edl.h" #include "edlsession.h" #include "keyframegui.h" @@ -46,6 +47,7 @@ #include "resourcepixmap.h" #include "statusbar.h" #include "theme.h" +#include "track.h" #include "timebar.h" #include "trackcanvas.h" #include "vframe.h" @@ -177,6 +179,7 @@ Theme::Theme() statusbar_cancel_data = 0; timebar_view_data = 0; transition_data = 0; + tumblepatch_data = 0; uptriangle_data = 0; viewasset_data = 0; vtimebar_bg_data = 0; @@ -708,7 +711,7 @@ void Theme::draw_mwindow_bg(MWindowGUI *gui) void Theme::get_cwindow_sizes(CWindowGUI *gui, int cwindow_controls) { - int total_buttons = !use_commercials ? 17 : 18; + 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,35 +733,37 @@ SET_TRACE } else { - cmeter_x = mwindow->session->cwindow_w + widget_border; + cmeter_x = mwindow->session->cwindow_w; } - int edit_panel_h = EditPanel::calculate_h(mwindow); - int buttons_h = 0; - if( edit_w + widget_border * 2 + transport_w + widget_border + - zoom_w + widget_border + division_w + status_w > cmeter_x ) { - buttons_h = (widget_border + edit_panel_h) * 2; - ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - buttons_h; + + 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; + 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 = ctransport_y + edit_panel_h + widget_border; + cedit_y = panel_y; } else { - buttons_h = widget_border + edit_panel_h; ctransport_x = widget_border; - ctransport_y = mwindow->session->cwindow_h - buttons_h; + 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 = ctransport_y; + czoom_y = panel_y; + cstatus_x = czoom_x + zoom_w + division_w; + cstatus_y = panel_y; } - buttons_h += ctimebar_h + widget_border; - - cstatus_x = mwindow->session->cwindow_w - xS(50); - cstatus_y = mwindow->session->cwindow_h - - get_image("cwindow_active")->get_h() - yS(5); + buttons_h += ctimebar_h; ccomposite_x = xS(0); ccomposite_y = yS(5); @@ -869,12 +874,13 @@ void Theme::draw_rwindow_bg(RecordGUI *gui) } -void Theme::draw_resource_bg(TrackCanvas *canvas, ResourcePixmap *pixmap, int color, - int edit_x, int edit_w, int pixmap_x, int x1, int y1, int x2, int y2) +void Theme::draw_resource_bg(TrackCanvas *canvas, ResourcePixmap *pixmap, + int color, Edit *edit, int edit_x, int edit_w, + int pixmap_x, int x1, int y1, int x2, int y2) { VFrame *image = 0; - - switch(mwindow->edl->local_session->zoom_track) { + int data_h = edit->track->data_h; + switch( data_h ) { case 1024: image = get_image("resource1024"); break; case 512: image = get_image("resource512"); break; case 256: image = get_image("resource256"); break; @@ -906,14 +912,13 @@ void Theme::get_vwindow_sizes(VWindowGUI *gui) 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 - @@ -923,55 +928,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; @@ -981,7 +970,6 @@ void Theme::get_vwindow_sizes(VWindowGUI *gui) vtimebar_x = 0; vtimebar_y = vcanvas_y + vcanvas_h; vtimebar_w = vmeter_x - widget_border; - }