X-Git-Url: https://cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fappearanceprefs.C;h=4ca46b2d8b24c04b63e88fda55a99aa8e9981d66;hb=75267dc010a3c3f351a2312469deb5b419fae819;hp=0fb0ba3f82a0273dc444d5c5825fb48ed2a5750a;hpb=f4cba337b328ed1842085076c3e2c8244e3a94bd;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/appearanceprefs.C b/cinelerra-5.1/cinelerra/appearanceprefs.C index 0fb0ba3f..4ca46b2d 100644 --- a/cinelerra-5.1/cinelerra/appearanceprefs.C +++ b/cinelerra-5.1/cinelerra/appearanceprefs.C @@ -93,7 +93,7 @@ void AppearancePrefs::create_objects() thumbnail_size = new ViewThumbnailSize(pwindow, this, x2, y); thumbnail_size->create_objects(); y += thumbnail_size->get_h() + 5; - add_subwindow(new BC_Title(x1, y, _("Vicon memory size:"))); + add_subwindow(new BC_Title(x1, y, _("Vicon quality:"))); vicon_size = new ViewViconSize(pwindow, this, x2, y); vicon_size->create_objects(); y += vicon_size->get_h() + 5; @@ -165,6 +165,15 @@ void AppearancePrefs::create_objects() char hex_color[BCSTRLEN]; sprintf(hex_color, "%06x", preferences->highlight_inverse); add_subwindow(new HighlightInverseColor(pwindow, x, y, hex_color)); + x2 = x; x = x0; + y += 35; + add_subwindow(title = new BC_Title(x, y, _("Composer BG Color:"))); + int clr_color = pwindow->thread->edl->session->cwindow_clear_color; + int clr_alpha = pwindow->thread->edl->session->cwindow_clear_alpha; + add_subwindow(cwdw_bg_color = new Composer_BG_Color(pwindow, + x2, y, 80, 24, clr_color, clr_alpha)); + draw_3d_border(x2-2,y-2, 80+4,24+4, 1); + cwdw_bg_color->create_objects(); y += 35; x = x0; @@ -219,6 +228,9 @@ void AppearancePrefs::create_objects() CtrlToggle *ctrl_toggle = new CtrlToggle(x1, y1, pwindow); add_subwindow(ctrl_toggle); y1 += ctrl_toggle->get_h() + 5; + RectifyAudioToggle *rect_toggle = new RectifyAudioToggle(x1, y1, pwindow); + add_subwindow(rect_toggle); + y1 += rect_toggle->get_h() + 5; if( y < y1 ) y = y1; } @@ -777,3 +789,44 @@ int CtrlToggle::handle_event() return 1; } +RectifyAudioToggle::RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow) + : BC_CheckBox(x, y, + pwindow->thread->preferences->rectify_audio, _("Timeline Rectify Audio")) +{ + this->pwindow = pwindow; +} + +int RectifyAudioToggle::handle_event() +{ + pwindow->thread->preferences->rectify_audio = get_value(); + return 1; +} + +Composer_BG_Color::Composer_BG_Color(PreferencesWindow *pwindow, + int x, int y, int w, int h, int color, int alpha) + : ColorBoxButton(_("Composer BG color"), x, y, w, h, color, alpha, 1) +{ + this->pwindow = pwindow; +} + +Composer_BG_Color::~Composer_BG_Color() +{ +} + +void Composer_BG_Color::handle_done_event(int result) +{ + if( result ) { + pwindow->lock_window("Composer_BG_Color::handle_done_event"); + update_gui(orig_color, orig_alpha); + pwindow->unlock_window(); + handle_new_color(orig_color, orig_alpha); + } +} + +int Composer_BG_Color::handle_new_color(int color, int alpha) +{ + pwindow->thread->edl->session->cwindow_clear_color = color; + pwindow->thread->edl->session->cwindow_clear_alpha = alpha; + return 1; +} +