X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Ftheme_bright%2Fbrighttheme.C;fp=cinelerra-5.1%2Fplugins%2Ftheme_bright%2Fbrighttheme.C;h=c6a9eb3cfdc30a78bb282c36b0c3980080967282;hp=af0a1565af836dec4f866836f05e60aa86a5277b;hb=0df48ad2d876409c5beeae2e21933a728ea76c33;hpb=bd570c5fa5f5473b670673368dc30356aa6c43fa diff --git a/cinelerra-5.1/plugins/theme_bright/brighttheme.C b/cinelerra-5.1/plugins/theme_bright/brighttheme.C index af0a1565..c6a9eb3c 100644 --- a/cinelerra-5.1/plugins/theme_bright/brighttheme.C +++ b/cinelerra-5.1/plugins/theme_bright/brighttheme.C @@ -44,19 +44,11 @@ #include "vwindowgui.h" - - PluginClient* new_plugin(PluginServer *server) { return new BrightThemeMain(server); } - - - - - - BrightThemeMain::BrightThemeMain(PluginServer *server) : PluginTClient(server) { @@ -77,12 +69,6 @@ Theme* BrightThemeMain::new_theme() } - - - - - - BrightTheme::BrightTheme() : Theme() { @@ -124,7 +110,7 @@ void BrightTheme::initialize() resources->menu_title_text = 0x000000; resources->popup_title_text = 0x000000; resources->menu_item_text = 0x000000; - resources->generic_button_margin = 20; + resources->generic_button_margin = xS(20); resources->pot_needle_color = resources->text_default; resources->pot_offset = 1; resources->progress_text = resources->text_default; @@ -137,14 +123,14 @@ void BrightTheme::initialize() resources->menu_down = 0xc0c0c0; resources->menu_up = 0xffffff; resources->menu_shadow = 0x000000; - resources->popupmenu_margin = 10; - resources->popupmenu_triangle_margin = 15; + resources->popupmenu_margin = xS(10); + resources->popupmenu_triangle_margin = xS(15); resources->listbox_title_color = 0x000000; - resources->listbox_title_overlap = 20; - resources->listbox_title_margin = 20; - resources->listbox_title_hotspot = 20; + resources->listbox_title_overlap = xS(20); + resources->listbox_title_margin = xS(20); + resources->listbox_title_hotspot = xS(20); resources->listbox_border1 = 0x000000; resources->listbox_border2 = 0xffffff; resources->listbox_border3 = 0xffffff; @@ -157,11 +143,11 @@ void BrightTheme::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 = 0x0000ff; - resources->scroll_minhandle = 24; + resources->scroll_minhandle = xS(24); new_toggle("loadmode_new.png", "loadmode_up.png", @@ -401,7 +387,7 @@ void BrightTheme::initialize() resources->bar_data = new_image("bar", "bar.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", @@ -545,18 +531,18 @@ void BrightTheme::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 = 0x00ff00; assetedit_color = BLACK; - mtransport_margin = 20; - toggle_margin = 20; + mtransport_margin = xS(20); + toggle_margin = xS(20); timebar_cursor_color = BLACK; new_image("mbutton_bg", "mbutton_bg.png"); @@ -611,23 +597,21 @@ void BrightTheme::initialize() setformat_w = get_image("setformat_bg")->get_w(); setformat_h = get_image("setformat_bg")->get_h(); - setformat_x1 = 15; - setformat_x2 = 100; - - setformat_x3 = 315; - setformat_x4 = 415; - 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; - - loadfile_pad = get_image_set("loadmode_new")[0]->get_h() + 10; - browse_pad = 20; - + setformat_x1 = xS(15); + setformat_x2 = xS(100); + setformat_x3 = xS(315); + setformat_x4 = xS(415); + setformat_y1 = yS(20); + setformat_y2 = yS(85); + setformat_y3 = yS(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() + yS(10); + browse_pad = yS(20); new_toggle("playpatch.png", "patch_up.png", @@ -855,8 +839,6 @@ void BrightTheme::initialize() new_button("stop.png", transport_up, transport_hi, transport_dn, "stop"); new_button("stop.png", transport_up, transport_hi, transport_dn, "stoprec"); - - // CWindow icons new_image("cwindow_inactive", "cwindow_inactive.png"); new_image("cwindow_active", "cwindow_active.png"); @@ -875,17 +857,12 @@ void BrightTheme::initialize() "preferencesbutton_uphi.png", "preferencesbutton_dnlo.png"); - - new_image_set("color3way_point", 3, "color3way_up.png", "color3way_hi.png", "color3way_dn.png"); - - - 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"); @@ -939,7 +916,7 @@ void BrightTheme::initialize() recordgui_variable_color = BLACK; channel_position_color = BLACK; - resources->meter_title_w = 25; + resources->meter_title_w = xS(25); } @@ -975,30 +952,21 @@ void BrightTheme::build_overlays() } - - - - - - - void BrightTheme::draw_rwindow_bg(RecordGUI *gui) { // int y; -// int margin = 50; -// int margin2 = 80; -// gui->draw_9segment(recordgui_batch_x - margin, -// 0, +// 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(); -// gui->draw_9segment(0, -// y, +// y = recordgui_buttons_y - yS(5) + rgui_controls->get_h(); +// gui->draw_9segment(0, y, // mwindow->session->rwindow_w, // mwindow->session->rwindow_h - y, // rgui_list); @@ -1006,27 +974,21 @@ void BrightTheme::draw_rwindow_bg(RecordGUI *gui) void BrightTheme::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 BrightTheme::draw_mwindow_bg(MWindowGUI *gui) { // Button bar @@ -1034,15 +996,12 @@ void BrightTheme::draw_mwindow_bg(MWindowGUI *gui) gui->menu_w(), get_image("mbutton_bg")); gui->draw_vframe(get_image("panel_divider"), - mbuttons_x + 228, - mbuttons_y - 1); + mbuttons_x + xS(228), mbuttons_y - 1); gui->draw_vframe(get_image("panel_divider"), - mbuttons_x + 294, - mbuttons_y - 1); + mbuttons_x + xS(294), mbuttons_y - 1); gui->draw_vframe(get_image("panel_divider"), - mbuttons_x + 396, - mbuttons_y - 1); + mbuttons_x + xS(396), mbuttons_y - 1); // Clock gui->draw_3segmenth(0, @@ -1071,10 +1030,8 @@ void BrightTheme::draw_mwindow_bg(MWindowGUI *gui) // Zoombar // gui->set_color(0x373737); -// 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"), @@ -1117,7 +1074,7 @@ void BrightTheme::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")); } } @@ -1146,15 +1103,13 @@ void BrightTheme::draw_vwindow_bg(VWindowGUI *gui) { gui->draw_3segmenth(vdivision_x, vcanvas_h, - vmeter_x - widget_border - vdivision_x + 100, + 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")); }