no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / theme_blond / blondtheme.C
index 10f4285b972b34fe7a04f338985b01c7f2323bc8..ea04e1c5988523d19d00eb01c07676cc46036655 100644 (file)
@@ -53,12 +53,6 @@ PluginClient* new_plugin(PluginServer *server)
        return new BlondThemeMain(server);
 }
 
-
-
-
-
-
-
 BlondThemeMain::BlondThemeMain(PluginServer *server)
  : PluginTClient(server)
 {
@@ -78,13 +72,6 @@ Theme* BlondThemeMain::new_theme()
        return theme;
 }
 
-
-
-
-
-
-
-
 BlondTheme::BlondTheme()
  : Theme()
 {
@@ -124,7 +111,7 @@ void BlondTheme::initialize()
        resources->popup_title_text = 0x000000;
        resources->menu_item_text = 0x000000;
        resources->menu_highlighted_fontcolor = WHITE;
-       resources->generic_button_margin = 30;
+       resources->generic_button_margin = xS(30);
        resources->pot_needle_color = resources->text_default;
        resources->pot_offset = 1;
        resources->progress_text = resources->text_default;
@@ -135,13 +122,13 @@ void BlondTheme::initialize()
        resources->menu_down = 0x4b4b4b;
        resources->menu_up = 0x4b4b4b;
        resources->menu_shadow = 0x202020;
-       resources->popupmenu_margin = 15;
-       resources->popupmenu_triangle_margin = 15;
+       resources->popupmenu_margin = xS(15);
+       resources->popupmenu_triangle_margin = xS(15);
 
        resources->listbox_title_color = 0x000000;
 
-       resources->listbox_title_margin = 20;
-       resources->listbox_title_hotspot = 20;
+       resources->listbox_title_margin = xS(20);
+       resources->listbox_title_hotspot = xS(20);
        resources->listbox_border1 = 0x1a1a1a;
        resources->listbox_border2 = 0xcecea2;
        resources->listbox_border3 = 0xcecea2;
@@ -151,7 +138,7 @@ void BlondTheme::initialize()
        resources->listbox_bg = 0;
        resources->listbox_text = 0x000000;
 
-       resources->filebox_margin = 130;
+       resources->filebox_margin = yS(130);
        resources->file_color = 0x000000;
        resources->directory_color = 0xa0a0ff;
 
@@ -205,14 +192,28 @@ void BlondTheme::initialize()
                "loadmode_dn.png",
                "loadmode_checkedhi.png",
                "loadmode_resource");
-       new_toggle("loadmode_nested.png",
+
+       new_toggle("loadmode_edl_clip.png",
                "loadmode_up.png",
                "loadmode_hi.png",
                "loadmode_checked.png",
                "loadmode_dn.png",
                "loadmode_checkedhi.png",
-               "loadmode_nested");
-
+               "loadmode_edl_clip");
+       new_toggle("loadmode_edl_nested.png",
+               "loadmode_up.png",
+               "loadmode_hi.png",
+               "loadmode_checked.png",
+               "loadmode_dn.png",
+               "loadmode_checkedhi.png",
+               "loadmode_edl_nested");
+       new_toggle("loadmode_edl_fileref.png",
+               "loadmode_up.png",
+               "loadmode_hi.png",
+               "loadmode_checked.png",
+               "loadmode_dn.png",
+               "loadmode_checkedhi.png",
+               "loadmode_edl_fileref");
 
        resources->filebox_icons_images = new_button("icons.png",
                "fileboxbutton_up.png",
@@ -282,6 +283,18 @@ void BlondTheme::initialize()
                "reset_dn.png",
                "reset_button");
 
+       new_button("unclear.png",
+               "unclear_up.png",
+               "unclear_hi.png",
+               "unclear_dn.png",
+               "unclear_button");
+
+       new_button("keyframe.png",
+               "keyframe_up.png",
+               "keyframe_hi.png",
+               "keyframe_dn.png",
+               "keyframe_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -294,32 +307,95 @@ void BlondTheme::initialize()
                "new_bigbutton_dn.png",
                "new_cancel_images");
 
+       new_button("mask_pnt_linear.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_pnt_linear_images");
+       new_button("mask_crv_linear.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_crv_linear_images");
+       new_button("mask_all_linear.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_all_linear_images");
+
+       new_button("mask_pnt_smooth.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_pnt_smooth_images");
+       new_button("mask_crv_smooth.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_crv_smooth_images");
+       new_button("mask_all_smooth.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_all_smooth_images");
+
+       new_button("mask_prst_sqr.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_sqr_images");
+       new_button("mask_prst_crc.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_crc_images");
+       new_button("mask_prst_tri.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_tri_images");
+       new_button("mask_prst_ovl.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_ovl_images");
+
+       new_button("mask_prst_load.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_load_images");
+       new_button("mask_prst_save.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_save_images");
+       new_button("mask_prst_trsh.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_prst_trsh_images");
+
+       new_button("mask_pstn_cen.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_pstn_cen_images");
+       new_button("mask_pstn_nrm.png",
+               "mask_button_up.png",
+               "mask_button_hi.png",
+               "mask_button_dn.png",
+               "mask_pstn_nrm_images");
+
        resources->medium_7segment = new_image_set(TOTAL_7SEGMENT,
-               "0.png",
-               "1.png",
-               "2.png",
-               "3.png",
-               "4.png",
-               "5.png",
-               "6.png",
-               "7.png",
-               "8.png",
-               "9.png",
-               "colon.png",
-               "period.png",
-               "a.png",
-               "b.png",
-               "c.png",
-               "d.png",
-               "e.png",
-               "f.png",
-               "space.png",
-               "dash.png");
+               "0.png", "1.png", "2.png", "3.png", "4.png", "5.png", "6.png", "7.png",
+               "8.png", "9.png", "colon.png", "period.png", "a.png", "b.png", "c.png",
+               "d.png", "e.png", "f.png", "space.png", "dash.png");
 
        resources->bar_data = new_image("bar", "bar.png");
        resources->check = new_image("check", "check.png");
 
-       resources->min_menu_w = 96;
+       resources->min_menu_w = xS(96);
        resources->menu_popup_bg = new_image("menu_popup_bg.png");
        resources->menu_item_bg = new_image_set(3,
                "menuitem_up.png",
@@ -370,6 +446,11 @@ void BlondTheme::initialize()
                "tumble_hi.png",
                "tumble_bottom.png",
                "tumble_top.png");
+       new_image_set("tumblepatch_data", 4,
+               "tumblepatch_up.png",
+               "tumblepatch_hi.png",
+               "tumblepatch_bottom.png",
+               "tumblepatch_top.png");
        resources->listbox_button = new_button4("listbox_button.png",
                "editpanel_up.png",
                "editpanel_hi.png",
@@ -451,7 +532,7 @@ void BlondTheme::initialize()
                        "vscroll_right_up.png",
                        "vscroll_right_hi.png",
                        "vscroll_right_dn.png");
-       resources->scroll_minhandle = 20;
+       resources->scroll_minhandle = xS(20);
 
 
        new_button("prevtip.png", "tipbutton_up.png", "tipbutton_hi.png", "tipbutton_dn.png", "prev_tip");
@@ -469,17 +550,17 @@ void BlondTheme::initialize()
 
        preferences_category_overlap = 0;
        preferencescategory_x = 0;
-       preferencescategory_y = 5;
-       preferencestitle_x = 5;
-       preferencestitle_y = 10;
-       preferencesoptions_x = 5;
+       preferencescategory_y = yS(5);
+       preferencestitle_x = xS(5);
+       preferencestitle_y = yS(10);
+       preferencesoptions_x = xS(5);
        preferencesoptions_y = 0;
 
 // MWindow
        message_normal = resources->text_default;
        audio_color = GREEN;
-       mtransport_margin = 10;
-       toggle_margin = 10;
+       mtransport_margin = xS(10);
+       toggle_margin = xS(10);
 
        new_button("pane.png", "pane_up.png", "pane_hi.png", "pane_dn.png", "pane");
        new_image_set("xpane", 3, "xpane_up.png", "xpane_hi.png", "xpane_dn.png");
@@ -495,6 +576,7 @@ void BlondTheme::initialize()
 
        new_image_set("zoombar_menu", 3, "zoompopup_up.png", "zoompopup_hi.png", "zoompopup_dn.png");
        new_image_set("zoombar_tumbler", 4, "zoomtumble_up.png", "zoomtumble_hi.png", "zoomtumble_bottom.png", "zoomtumble_top.png");
+       new_image_set("auto_range", 4, "autorange_up.png", "autorange_hi.png", "autorange_bottom.png", "autorange_top.png");
 
        new_image_set("mode_popup", 3, "mode_up.png", "mode_hi.png", "mode_dn.png");
        new_image("mode_add", "mode_add.png");
@@ -530,22 +612,22 @@ void BlondTheme::initialize()
 
        setformat_w = get_image("setformat_bg")->get_w();
        setformat_h = get_image("setformat_bg")->get_h();
-       setformat_x1 = 15;
-       setformat_x2 = 110;
+       setformat_x1 = xS(15);
+       setformat_x2 = xS(110);
 
-       setformat_x3 = 315;
-       setformat_x4 = 425;
-       setformat_y1 = 20;
-       setformat_y2 = 85;
-       setformat_y3 = 125;
-       setformat_margin = 30;
-       setformat_channels_x = 25;
-       setformat_channels_y = 242;
-       setformat_channels_w = 250;
-       setformat_channels_h = 250;
+       setformat_x3 = xS(315);
+       setformat_x4 = xS(425);
+       setformat_y1 = xS(20);
+       setformat_y2 = xS(85);
+       setformat_y3 = xS(125);
+       setformat_margin = xS(30);
+       setformat_channels_x = xS(25);
+       setformat_channels_y = yS(242);
+       setformat_channels_w = xS(250);
+       setformat_channels_h = yS(250);
 
-       loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10;
-       browse_pad = 20;
+       loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + yS(10);
+       browse_pad = yS(20);
 
 
        new_toggle("playpatch.png",
@@ -580,6 +662,14 @@ void BlondTheme::initialize()
                "patch_checkedhi.png",
                "drawpatch_data");
 
+       new_toggle("masterpatch.png",
+               "patch_up.png",
+               "patch_hi.png",
+               "patch_checked.png",
+               "patch_dn.png",
+               "patch_checkedhi.png",
+               "masterpatch_data");
+
 
        new_image_set("mutepatch_data",
                5,
@@ -752,10 +842,27 @@ void BlondTheme::initialize()
        splice_data = new_button("splice.png", editpanel_up, editpanel_hi, editpanel_dn, "slicebutton");
        new_button("toclip.png", editpanel_up, editpanel_hi, editpanel_dn, "toclip");
        new_button("goto.png", editpanel_up, editpanel_hi, editpanel_dn, "goto");
+       new_button("clapper.png", editpanel_up, editpanel_hi, editpanel_dn, "clapperbutton");
        new_button("top_justify.png", editpanel_up, editpanel_hi, editpanel_dn, "top_justify");
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -807,6 +914,7 @@ void BlondTheme::initialize()
 
        new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
        new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+       new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
        new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
        new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
        new_toggle("blank30x30.png",
@@ -816,6 +924,9 @@ void BlondTheme::initialize()
                   new_image("locklabels_dn.png"), // can't have seperate down for each!!??
                   new_image("locklabels_unlockedhi.png"),
                   "locklabels");
+       new_toggle("gang0.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang0");
+       new_toggle("gang1.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang1");
+       new_toggle("gang2.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "gang2");
 
        VFrame *cpanel_up = new_image("cpanel_up.png");
        VFrame *cpanel_hi = new_image("cpanel_hi.png");
@@ -838,7 +949,19 @@ void BlondTheme::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
-
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
+
+       new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
+               "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
+               "mask_scale_x");
+       new_toggle("mask_scale_y.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
+               "mask_scale_chkd.png",  "mask_scale_ydown.png",  "mask_scale_chkdhi.png",
+               "mask_scale_y");
+       new_toggle("mask_scale_xy.png",  "mask_scale_up.png",   "mask_scale_uphi.png",
+               "mask_scale_chkd.png", "mask_scale_xydown.png", "mask_scale_chkdhi.png",
+               "mask_scale_xy");
 
        flush_images();
 
@@ -848,13 +971,13 @@ void BlondTheme::initialize()
        recordgui_variable_color = RED;
 
        channel_position_color = MEYELLOW;
-       resources->meter_title_w = 25;
+       resources->meter_title_w = xS(28);
 
         // (asset) edit info text color
         edit_font_color = YELLOW;
 }
 
-#define VWINDOW_METER_MARGIN 5
+#define VWINDOW_METER_MARGIN xS(5)
 
 
 void BlondTheme::build_bg_data()
@@ -863,12 +986,12 @@ void BlondTheme::build_bg_data()
        channel_position_data = new VFramePng(get_image_data("channel_position.png"));
 
 // Track bitmaps
-       new_image("resource1024", "resource1024.png");
-       new_image("resource512", "resource512.png");
-       new_image("resource256", "resource256.png");
-       new_image("resource128", "resource128.png");
-       new_image("resource64", "resource64.png");
-       new_image("resource32", "resource32.png");
+       new_image1("resource1024", "resource1024.png");
+       new_image1("resource512", "resource512.png");
+       new_image1("resource256", "resource256.png");
+       new_image1("resource128", "resource128.png");
+       new_image1("resource64", "resource64.png");
+       new_image1("resource32", "resource32.png");
        new_image("plugin_bg_data", "plugin_bg.png");
        new_image("title_bg_data", "title_bg.png");
        new_image("vtimebar_bg_data", "vwindow_timebar.png");
@@ -889,18 +1012,18 @@ void BlondTheme::build_overlays()
 void BlondTheme::draw_rwindow_bg(RecordGUI *gui)
 {
 //     int y;
-//     int margin = 50;
-//     int margin2 = 80;
+//     int margin = xS(50);
+//     int margin2 = xS(80);
 //     gui->draw_9segment(recordgui_batch_x - margin,
 //             0,
 //             mwindow->session->rwindow_w - recordgui_status_x + margin,
 //             recordgui_buttons_y,
 //             rgui_batch);
 //     gui->draw_3segmenth(recordgui_options_x - margin2,
-//             recordgui_buttons_y - 5,
+//             recordgui_buttons_y - yS(5),
 //             mwindow->session->rwindow_w - recordgui_options_x + margin2,
 //             rgui_controls);
-//     y = recordgui_buttons_y - 5 + rgui_controls->get_h();
+//     y = recordgui_buttons_y - yS(5) + rgui_controls->get_h();
 //     gui->draw_9segment(0,
 //             y,
 //             mwindow->session->rwindow_w,
@@ -910,27 +1033,21 @@ void BlondTheme::draw_rwindow_bg(RecordGUI *gui)
 
 void BlondTheme::draw_rmonitor_bg(RecordMonitorGUI *gui)
 {
-//     int margin = 45;
-//     int panel_w = 300;
+//     int margin = xS(45);
+//     int panel_w = xS(300);
 //     int x = rmonitor_meter_x - margin;
 //     int w = mwindow->session->rmonitor_w - x;
 //     if(w < rmonitor_meters->get_w()) w = rmonitor_meters->get_w();
-//     gui->clear_box(0,
-//             0,
+//     gui->clear_box(0, 0,
 //             mwindow->session->rmonitor_w,
 //             mwindow->session->rmonitor_h);
-//     gui->draw_9segment(x,
-//             0,
+//     gui->draw_9segment(x, 0,
 //             w,
 //             mwindow->session->rmonitor_h,
 //             rmonitor_meters);
 }
 
 
-
-
-
-
 void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
 {
 // Button bar
@@ -942,18 +1059,19 @@ void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
        x += 9 * get_image("play")->get_w();
        x += mtransport_margin;                                       // the control buttons
 
+       int xs2 = xS(2);
        gui->draw_vframe(get_image("panel_divider"),
-               x - toggle_margin / 2 - pdw / 2 + 2,
+               x - toggle_margin / 2 - pdw / 2 + xs2,
                mbuttons_y - 1);
        x += 2 * get_image("arrow")->get_w() + toggle_margin;           // the mode buttons
 
        gui->draw_vframe(get_image("panel_divider"),
-               x - toggle_margin / 2 - pdw / 2 + 2,
+               x - toggle_margin / 2 - pdw / 2 + xs2,
                mbuttons_y - 1);
 
-       x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
+       x += 3 * get_image("autokeyframe")->get_w() + toggle_margin;    // the state toggle buttons
        gui->draw_vframe(get_image("panel_divider"),
-               x - toggle_margin / 2 - pdw / 2 + 2,
+               x - toggle_margin / 2 - pdw / 2 + xs2,
                mbuttons_y - 1);
 
 // Clock
@@ -963,10 +1081,8 @@ void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
                get_image("clock_bg"));
 
 // Patchbay
-       gui->draw_3segmentv(patchbay_x,
-               patchbay_y,
-               patchbay_h,
-               get_image("patchbay_bg"));
+       gui->draw_3segmentv(patchbay_x, patchbay_y,
+               patchbay_h, get_image("patchbay_bg"));
 
 // Track canvas
        gui->set_color(BLACK);
@@ -976,17 +1092,13 @@ void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
                mcanvas_h - BC_ScrollBar::get_span(SCROLL_HORIZ) - mtimebar_h);
 
 // Timebar
-       gui->draw_3segmenth(mtimebar_x,
-               mtimebar_y,
-               mtimebar_w,
-               get_image("timebar_bg"));
+       gui->draw_3segmenth(mtimebar_x, mtimebar_y,
+               mtimebar_w, get_image("timebar_bg"));
 
 // Zoombar
        gui->set_color(0xcecea2);
-       gui->draw_box(mzoom_x,
-               mzoom_y,
-               mwindow->session->mwindow_w,
-               25);
+       gui->draw_box(mzoom_x, mzoom_y,
+               mwindow->session->mwindow_w, yS(25));
 
 // Scrollbar filler
 //     gui->draw_vframe(get_image("mscroll_filler"),
@@ -998,8 +1110,6 @@ void BlondTheme::draw_mwindow_bg(MWindowGUI *gui)
                mzoom_y,
                mzoom_w,
                get_image("statusbar"));
-
-
 }
 
 void BlondTheme::draw_cwindow_bg(CWindowGUI *gui)
@@ -1024,42 +1134,36 @@ void BlondTheme::draw_cwindow_bg(CWindowGUI *gui)
        {
                gui->draw_3segmenth(cstatus_x,
                        ccomposite_h,
-                       cmeter_x - widget_border - cstatus_x + 100,
+                       cmeter_x - widget_border - cstatus_x + xS(100),
                        get_image("cbuttons_right"));
        }
 }
 
 void BlondTheme::draw_vwindow_bg(VWindowGUI *gui)
 {
-       gui->draw_3segmenth(0,
-               vcanvas_h,
+       gui->draw_3segmenth(0, vcanvas_h,
                vdivision_x,
                get_image("vbuttons_left"));
        if(mwindow->edl->session->vwindow_meter)
        {
-               gui->draw_3segmenth(vdivision_x,
-                       vcanvas_h,
+               gui->draw_3segmenth(vdivision_x, vcanvas_h,
                        vmeter_x - widget_border - vdivision_x,
                        get_image("cbuttons_right"));
-               gui->draw_9segment(vmeter_x - widget_border,
-                       0,
+               gui->draw_9segment(vmeter_x - widget_border, 0,
                        mwindow->session->vwindow_w - vmeter_x + widget_border,
                        mwindow->session->vwindow_h,
                        get_image("cmeter_bg"));
        }
        else
        {
-               gui->draw_3segmenth(vdivision_x,
-                       vcanvas_h,
-                       vmeter_x - widget_border - vdivision_x + 100,
+               gui->draw_3segmenth(vdivision_x, vcanvas_h,
+                       vmeter_x - widget_border - vdivision_x + xS(100),
                        get_image("cbuttons_right"));
        }
 
 // Clock border
-       gui->draw_3segmenth(vtime_x - 20,
-               vtime_y - 1,
-               vtime_w + 40,
-               get_image("vclock"));
+       gui->draw_3segmenth(vtime_x - xS(20), vtime_y - 1,
+               vtime_w + xS(40), get_image("vclock"));
 }
 
 void BlondTheme::draw_preferences_bg(PreferencesWindow *gui)