From: Good Guy Date: Fri, 25 Oct 2019 00:29:58 +0000 (-0600) Subject: confirm prefs update, fix bg_pixmap sz, plugin layout tweaks X-Git-Tag: 2019-10~4 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=5ec378f09aeeb646705fdb8035b39a186374fba0;p=goodguy%2Fcinelerra.git confirm prefs update, fix bg_pixmap sz, plugin layout tweaks --- diff --git a/cinelerra-5.1/cinelerra/gwindowgui.C b/cinelerra-5.1/cinelerra/gwindowgui.C index 3bcb853e..bc250716 100644 --- a/cinelerra-5.1/cinelerra/gwindowgui.C +++ b/cinelerra-5.1/cinelerra/gwindowgui.C @@ -268,6 +268,7 @@ void GWindowGUI::create_objects() } if( !vframe ) { int wh = toggle->get_h() - yS(4); + if( wh < 1 ) wh = 1; GWindowColorButton *color_button = new GWindowColorButton(toggle, get_w()-wh-ys10, y+yS(2), wh, color); add_tool(color_button); diff --git a/cinelerra-5.1/cinelerra/preferencesthread.C b/cinelerra-5.1/cinelerra/preferencesthread.C index 23494e70..e2738136 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.C +++ b/cinelerra-5.1/cinelerra/preferencesthread.C @@ -52,7 +52,9 @@ #include "playbackengine.h" #include "playbackprefs.h" #include "preferences.h" +#include "record.h" #include "recordprefs.h" +#include "render.h" #include "shbtnprefs.h" #include "theme.h" #include "trackcanvas.h" @@ -100,10 +102,12 @@ PreferencesThread::PreferencesThread(MWindow *mwindow) this->mwindow = mwindow; window = 0; thread_running = 0; + confirm_dialog = 0; } PreferencesThread::~PreferencesThread() { + delete confirm_dialog; close_window(); } @@ -364,6 +368,23 @@ int PreferencesThread::apply_settings() return 0; } +const char *PreferencesThread::busy() +{ + if( mwindow->render->thread->running() ) + return _("render"); + Record *record = mwindow->gui->record; + if( record->capturing || record->recording || record->writing_file ) + return _("record"); + return 0; +} + +void PreferencesThread::confirm_update(const char *reason, int close) +{ + delete confirm_dialog; + confirm_dialog = new PreferencesConfirmDialog(this, reason, close); + confirm_dialog->start(); +} + const char* PreferencesThread::category_to_text(int category) { PlaybackConfig *playback_config = edl->session->playback_config; @@ -630,8 +651,13 @@ PreferencesApply::PreferencesApply(MWindow *mwindow, PreferencesThread *thread) } int PreferencesApply::handle_event() { - thread->apply_settings(); - mwindow->save_defaults(); + const char *reason = thread->busy(); + if( reason ) + thread->confirm_update(reason, 0); + else { + thread->apply_settings(); + mwindow->save_defaults(); + } return 1; } int PreferencesApply::resize_event(int w, int h) @@ -649,18 +675,24 @@ PreferencesOK::PreferencesOK(MWindow *mwindow, PreferencesThread *thread) this->mwindow = mwindow; this->thread = thread; } +PreferencesOK::~PreferencesOK() +{ +} + int PreferencesOK::keypress_event() { - if(get_keypress() == RETURN) - { - thread->window->set_done(0); - return 1; - } + if( get_keypress() == RETURN ) + return handle_event(); return 0; } + int PreferencesOK::handle_event() { - thread->window->set_done(0); + const char *reason = mwindow->restart() ? _("restart") : thread->busy(); + if( reason ) + thread->confirm_update(reason, 1); + else + thread->window->set_done(0); return 1; } int PreferencesOK::resize_event(int w, int h) @@ -670,6 +702,45 @@ int PreferencesOK::resize_event(int w, int h) } +PreferencesConfirmDialog::PreferencesConfirmDialog(PreferencesThread *thread, + const char *reason, int close) +{ + this->thread = thread; + this->close = close; + sprintf(query, _("Busy: %s in progress. Are you sure?"), reason); +} +PreferencesConfirmDialog::~PreferencesConfirmDialog() +{ +} +BC_Window *PreferencesConfirmDialog::new_gui() +{ + qwindow = new PreferencesConfirmWindow(this); + qwindow->create_objects(query, 0); + return qwindow; +} +void PreferencesConfirmDialog::handle_done_event(int result) +{ + if( !result ) return; // no + if( !close ) { + thread->window->lock_window("PreferencesConfirmDialog::handle_done_event"); + thread->apply_settings(); + thread->mwindow->save_defaults(); + thread->window->unlock_window(); + } + else + thread->window->set_done(0); +} + +PreferencesConfirmWindow::PreferencesConfirmWindow(PreferencesConfirmDialog *dialog) + : QuestionWindow(dialog->thread->mwindow) +{ + this->dialog = dialog; +} +PreferencesConfirmWindow::~PreferencesConfirmWindow() +{ +} + + PreferencesCancel::PreferencesCancel(MWindow *mwindow, PreferencesThread *thread) : BC_GenericButton(thread->window->get_w() - BC_GenericButton::calculate_w(thread->window, _("Cancel")) - xS(10), thread->window->get_h() - BC_GenericButton::calculate_h() - yS(10), diff --git a/cinelerra-5.1/cinelerra/preferencesthread.h b/cinelerra-5.1/cinelerra/preferencesthread.h index 4cec37eb..98f1400c 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.h +++ b/cinelerra-5.1/cinelerra/preferencesthread.h @@ -27,6 +27,7 @@ #include "guicast.h" #include "mutex.inc" #include "mwindow.inc" +#include "question.h" #include "preferences.inc" #include "preferencesthread.inc" @@ -59,6 +60,10 @@ public: const char* category_to_text(int category); int text_to_category(const char *category); + const char *busy(); + void confirm_update(const char *reason, int close); + PreferencesConfirmDialog *confirm_dialog; + int current_dialog; int thread_running; int redraw_indexes; @@ -175,13 +180,40 @@ class PreferencesOK : public BC_GenericButton { public: PreferencesOK(MWindow *mwindow, PreferencesThread *thread); + ~PreferencesOK(); int keypress_event(); int handle_event(); int resize_event(int w, int h); MWindow *mwindow; PreferencesThread *thread; + PreferencesConfirmDialog *confirm_dialog; +}; + +class PreferencesConfirmDialog : public BC_DialogThread +{ +public: + PreferencesConfirmDialog(PreferencesThread *thread, + const char *reason, int close); + ~PreferencesConfirmDialog(); + BC_Window *new_gui(); + void handle_done_event(int result); + + PreferencesThread *thread; + PreferencesConfirmWindow *qwindow; + char query[BCTEXTLEN]; + int close; }; +class PreferencesConfirmWindow : public QuestionWindow +{ +public: + PreferencesConfirmWindow(PreferencesConfirmDialog *dialog); + ~PreferencesConfirmWindow(); + + PreferencesConfirmDialog *dialog; +}; + + class PreferencesCancel : public BC_GenericButton { public: diff --git a/cinelerra-5.1/cinelerra/preferencesthread.inc b/cinelerra-5.1/cinelerra/preferencesthread.inc index da14e2d0..43faada4 100644 --- a/cinelerra-5.1/cinelerra/preferencesthread.inc +++ b/cinelerra-5.1/cinelerra/preferencesthread.inc @@ -22,9 +22,18 @@ #ifndef PREFERENCESTHREAD_INC #define PREFERENCESTHREAD_INC -class PreferencesDialog; -class PreferencesMenuItem; +class PreferencesMenuitem; class PreferencesThread; +class PreferencesDialog; +class PreferencesCategory; +class PreferencesButton; class PreferencesWindow; +class PreferencesButton; +class PreferencesCategory; +class PreferencesApply; +class PreferencesOK; +class PreferencesConfirmDialog; +class PreferencesConfirmWindow; +class PreferencesCancel; #endif diff --git a/cinelerra-5.1/cinelerra/question.C b/cinelerra-5.1/cinelerra/question.C index e89b9c0f..ccea32c1 100644 --- a/cinelerra-5.1/cinelerra/question.C +++ b/cinelerra-5.1/cinelerra/question.C @@ -28,7 +28,7 @@ #include "ctype.h" #define WIDTH xS(375) -#define HEIGHT yS(160) +#define HEIGHT yS(120) QuestionWindow::QuestionWindow(MWindow *mwindow) : BC_Window(_(PROGRAM_NAME ": Question"), diff --git a/cinelerra-5.1/cinelerra/render.C b/cinelerra-5.1/cinelerra/render.C index 015bebd5..57e724ae 100644 --- a/cinelerra-5.1/cinelerra/render.C +++ b/cinelerra-5.1/cinelerra/render.C @@ -222,6 +222,7 @@ Render::Render(MWindow *mwindow) Render::~Render() { + stop_operation(); close_window(); delete package_lock; delete counter_lock; diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index c206f258..1ec64c7f 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -79,6 +79,17 @@ VFrame* BC_Theme::new_image(const char *path) return new_image("", path); } +VFrame* BC_Theme::new_image1(const char *title, const char *path) +{ + VFrame *existing_image = title[0] ? get_image(title, 0) : 0; + if( existing_image ) return existing_image; + + BC_ThemeSet *result = new BC_ThemeSet(1, 0, title); + result->data[0] = new VFramePng(get_image_data(path), 1.); + add_image_set(result); + return result->data[0]; +} + // These create image sets which are stored in the image_sets table. VFrame** BC_Theme::new_image_set(const char *title, int total, va_list *args) { diff --git a/cinelerra-5.1/guicast/bctheme.h b/cinelerra-5.1/guicast/bctheme.h index c9addd3c..572a77bc 100644 --- a/cinelerra-5.1/guicast/bctheme.h +++ b/cinelerra-5.1/guicast/bctheme.h @@ -103,6 +103,8 @@ public: // Decompresses image and puts on images table before returning it. VFrame* new_image(const char *title, const char *path); VFrame* new_image(const char *path); +// xy_scale = 1 + VFrame* new_image1(const char *title, const char *path); // These retrieve images based on case sensitive title diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C index a4a76cc4..29320582 100644 --- a/cinelerra-5.1/guicast/vframe.C +++ b/cinelerra-5.1/guicast/vframe.C @@ -824,6 +824,8 @@ int VFramePng::read_png(const unsigned char *data, long sz, double xscale, doubl return 1; } int ww = w * xscale, hh = h * yscale; + if( ww < 1 ) ww = 1; + if( hh < 1 ) hh = 1; if( ww != w || hh != h ) { VFrame vframe(*this); reallocate(NULL, -1, 0, 0, 0, ww, hh, color_model, -1); diff --git a/cinelerra-5.1/plugins/audioscope/audioscope.C b/cinelerra-5.1/plugins/audioscope/audioscope.C index d6defad9..356f8112 100644 --- a/cinelerra-5.1/plugins/audioscope/audioscope.C +++ b/cinelerra-5.1/plugins/audioscope/audioscope.C @@ -132,7 +132,7 @@ AudioScopeWindowSize::AudioScopeWindowSize(AudioScope *plugin, char *text) : BC_PopupMenu(x, y, - xS(80), + xS(110), text) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/compressor/compressor.C b/cinelerra-5.1/plugins/compressor/compressor.C index 486a498e..b167c6ee 100644 --- a/cinelerra-5.1/plugins/compressor/compressor.C +++ b/cinelerra-5.1/plugins/compressor/compressor.C @@ -1342,7 +1342,7 @@ int CompressorTrigger::button_press_event() CompressorInput::CompressorInput(CompressorEffect *plugin, int x, int y) : BC_PopupMenu(x, y, - xS(100), + xS(120), CompressorInput::value_to_text(plugin->config.input), 1) { diff --git a/cinelerra-5.1/plugins/delayaudio/delayaudio.C b/cinelerra-5.1/plugins/delayaudio/delayaudio.C index 7fa8af60..22c32f62 100644 --- a/cinelerra-5.1/plugins/delayaudio/delayaudio.C +++ b/cinelerra-5.1/plugins/delayaudio/delayaudio.C @@ -205,7 +205,7 @@ void DelayAudio::update_gui() DelayAudioWindow::DelayAudioWindow(DelayAudio *plugin) - : PluginClientWindow(plugin, xS(285), yS(80), xS(285), yS(80), 0) + : PluginClientWindow(plugin, xS(200), yS(80), xS(200), yS(80), 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/denoise/denoise.C b/cinelerra-5.1/plugins/denoise/denoise.C index 4682740e..72c90956 100644 --- a/cinelerra-5.1/plugins/denoise/denoise.C +++ b/cinelerra-5.1/plugins/denoise/denoise.C @@ -754,7 +754,7 @@ void DenoiseConfig::interpolate(DenoiseConfig &prev, DenoiseWindow::DenoiseWindow(DenoiseEffect *plugin) - : PluginClientWindow(plugin, xS(280), yS(50), xS(280), yS(50), 0) + : PluginClientWindow(plugin, xS(200), yS(60), xS(200), yS(60), 0) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/graphic/graphic.C b/cinelerra-5.1/plugins/graphic/graphic.C index 8dcdf979..16c2f546 100644 --- a/cinelerra-5.1/plugins/graphic/graphic.C +++ b/cinelerra-5.1/plugins/graphic/graphic.C @@ -699,7 +699,7 @@ int GraphicReset::handle_event() GraphicSize::GraphicSize(GraphicGUI *window, GraphicEQ *plugin, int x, int y) - : BC_PopupMenu(x, y, xS(100), "4096", 1) + : BC_PopupMenu(x, y, xS(120), "4096", 1) { this->plugin = plugin; this->window = window; diff --git a/cinelerra-5.1/plugins/loopaudio/loopaudio.C b/cinelerra-5.1/plugins/loopaudio/loopaudio.C index 5974c90e..dfdaea02 100644 --- a/cinelerra-5.1/plugins/loopaudio/loopaudio.C +++ b/cinelerra-5.1/plugins/loopaudio/loopaudio.C @@ -103,10 +103,10 @@ LoopAudioConfig::LoopAudioConfig() LoopAudioWindow::LoopAudioWindow(LoopAudio *plugin) : PluginClientWindow(plugin, - xS(210), - yS(160), - xS(200), - yS(160), + xS(180), + yS(65), + xS(180), + yS(65), 0) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/overlayaudio/overlayaudio.C b/cinelerra-5.1/plugins/overlayaudio/overlayaudio.C index 975b3b31..b9c77477 100644 --- a/cinelerra-5.1/plugins/overlayaudio/overlayaudio.C +++ b/cinelerra-5.1/plugins/overlayaudio/overlayaudio.C @@ -185,10 +185,10 @@ const char* OverlayAudioConfig::mode_to_text(int mode) OverlayAudioWindow::OverlayAudioWindow(OverlayAudio *plugin) : PluginClientWindow(plugin, - xS(400), - yS(100), - xS(400), - yS(100), + xS(300), + yS(70), + xS(300), + yS(70), 0) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/parametric/parametric.C b/cinelerra-5.1/plugins/parametric/parametric.C index ddc85229..ceb7b1d8 100644 --- a/cinelerra-5.1/plugins/parametric/parametric.C +++ b/cinelerra-5.1/plugins/parametric/parametric.C @@ -360,7 +360,7 @@ int ParametricWetness::handle_event() ParametricSize::ParametricSize(ParametricWindow *window, ParametricEQ *plugin, int x, int y) - : BC_PopupMenu(x, y, xS(100), "4096", 1) + : BC_PopupMenu(x, y, xS(120), "4096", 1) { this->plugin = plugin; this->window = window; diff --git a/cinelerra-5.1/plugins/pitch/pitch.C b/cinelerra-5.1/plugins/pitch/pitch.C index b858ea28..9f1b1b57 100644 --- a/cinelerra-5.1/plugins/pitch/pitch.C +++ b/cinelerra-5.1/plugins/pitch/pitch.C @@ -465,7 +465,7 @@ int PitchScale::handle_event() PitchSize::PitchSize(PitchWindow *window, PitchEffect *plugin, int x, int y) - : BC_PopupMenu(x, y, xS(100), "4096", 1) + : BC_PopupMenu(x, y, xS(110), "4096", 1) { this->plugin = plugin; } diff --git a/cinelerra-5.1/plugins/removegaps/removegaps.C b/cinelerra-5.1/plugins/removegaps/removegaps.C index 4fff8f2b..cfa53044 100644 --- a/cinelerra-5.1/plugins/removegaps/removegaps.C +++ b/cinelerra-5.1/plugins/removegaps/removegaps.C @@ -85,9 +85,9 @@ void RemoveGapsConfig::boundaries() RemoveGapsWindow::RemoveGapsWindow(RemoveGaps *plugin) : PluginClientWindow(plugin, xS(320), - yS(160), + yS(100), xS(320), - yS(160), + yS(100), 0) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/resamplert/resamplert.C b/cinelerra-5.1/plugins/resamplert/resamplert.C index 27f60270..f0c75d8d 100644 --- a/cinelerra-5.1/plugins/resamplert/resamplert.C +++ b/cinelerra-5.1/plugins/resamplert/resamplert.C @@ -79,10 +79,10 @@ void ResampleRTConfig::boundaries() ResampleRTWindow::ResampleRTWindow(ResampleRT *plugin) : PluginClientWindow(plugin, - xS(210), - yS(160), - xS(200), - yS(160), + xS(180), + yS(110), + xS(180), + yS(110), 0) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/synthesizer/synthesizer.C b/cinelerra-5.1/plugins/synthesizer/synthesizer.C index 909b1928..72ead069 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthesizer.C +++ b/cinelerra-5.1/plugins/synthesizer/synthesizer.C @@ -255,9 +255,7 @@ double Synth::solve_eqn(double *output, for(sample = 0; sample < length; sample++) { output[sample] += sin((x + phase_offset) / - period * - 2 * - M_PI) * power; + period * 2 * M_PI) * power; x += step; } break; @@ -327,25 +325,18 @@ double Synth::get_oscillator_point(float x, { case DC: return power; - break; case SINE: return sin((x + config->phase) * config->freq_factor * 2 * M_PI) * power; - break; case SAWTOOTH: return function_sawtooth((x + config->phase) * config->freq_factor) * power; - break; case SQUARE: return function_square((x + config->phase) * config->freq_factor) * power; - break; case TRIANGLE: return function_triangle((x + config->phase) * config->freq_factor) * power; - break; case PULSE: return function_pulse((x + config->phase) * config->freq_factor) * power; - break; case NOISE: return function_noise() * power; - break; } return 0; } @@ -425,11 +416,7 @@ int Synth::overlay_synth(double freq, { double normalize_constant = 1.0 / get_total_power(); for(int i = 0; i < config.oscillator_config.total; i++) - solve_eqn(output, - length, - freq, - normalize_constant, - i); + solve_eqn(output, length, freq, normalize_constant, i); return length; } @@ -501,39 +488,9 @@ void Synth::delete_freqs() } - - - - - - - - - - - - - - - - - - - - - - - - - - SynthWindow::SynthWindow(Synth *synth) - : PluginClientWindow(synth, - synth->window_w, - synth->window_h, - xS(400), - yS(350), - 1) + : PluginClientWindow(synth, synth->window_w, synth->window_h, + xS(400), yS(350), 1) { this->synth = synth; white_key[0] = 0; @@ -675,9 +632,9 @@ void SynthWindow::create_objects() black_key[4] = new VFramePng(black_checkedhi_png); - add_subwindow(note_subwindow = new BC_SubWindow(x1, + add_subwindow(note_subwindow = new BC_SubWindow(x1+xS(20), y, - get_w() - x1, + get_w() - (x1+xS(20)), white_key[0]->get_h() + MARGIN + get_text_height(MEDIUMFONT) + MARGIN + get_text_height(MEDIUMFONT) + MARGIN)); @@ -687,14 +644,12 @@ void SynthWindow::create_objects() note_subwindow->get_y() + note_subwindow->get_h(), note_subwindow->get_w())); - add_subwindow(momentary = new SynthMomentary(this, - x1, + add_subwindow(momentary = new SynthMomentary(this, x1, note_scroll->get_y() + note_scroll->get_h() + MARGIN, _("Momentary notes"))); - add_subwindow(note_instructions = new BC_Title( - x1, + add_subwindow(note_instructions = new BC_Title( x1, momentary->get_y() + momentary->get_h() + MARGIN, _("Ctrl or Shift to select multiple notes."))); @@ -987,7 +942,7 @@ void SynthWindow::update_oscillators() { gui = oscillators.values[i]; - gui->title->reposition_window(gui->title->get_x(), y + 15); + gui->title->reposition_window(gui->title->get_x(), y + yS(15)); gui->level->reposition_window(gui->level->get_x(), y); gui->level->update(config->level); @@ -1026,10 +981,7 @@ int SynthWindow::waveform_to_text(char *text, int waveform) SynthMomentary::SynthMomentary(SynthWindow *window, int x, int y, char *text) - : BC_CheckBox(x, - y, - window->synth->config.momentary_notes, - text) + : BC_CheckBox(x, y, window->synth->config.momentary_notes, text) { this->window = window; } @@ -1044,15 +996,8 @@ int SynthMomentary::handle_event() -SynthNote::SynthNote(SynthWindow *window, - VFrame **images, - int number, - int x, - int y) - : BC_Toggle(x, - y, - images, - window->synth->freq_exists(keyboard_freqs[number])) +SynthNote::SynthNote(SynthWindow *window, VFrame **images, int number, int x, int y) + : BC_Toggle(x, y, images, window->synth->freq_exists(keyboard_freqs[number])) { this->window = window; this->number = number; @@ -1237,11 +1182,6 @@ int SynthNote::draw_face(int flash, int flush) } - - - - - SynthOscGUI::SynthOscGUI(SynthWindow *window, int number) { this->window = window; @@ -1260,7 +1200,7 @@ void SynthOscGUI::create_objects(int y) { char text[BCTEXTLEN]; sprintf(text, "%d:", number + 1); - window->osc_subwindow->add_subwindow(title = new BC_Title(10, y + 15, text)); + window->osc_subwindow->add_subwindow(title = new BC_Title(xS(10), y+yS(15), text)); window->osc_subwindow->add_subwindow(level = new SynthOscGUILevel(window->synth, this, y)); window->osc_subwindow->add_subwindow(phase = new SynthOscGUIPhase(window->synth, this, y)); @@ -1271,11 +1211,9 @@ void SynthOscGUI::create_objects(int y) SynthOscGUILevel::SynthOscGUILevel(Synth *synth, SynthOscGUI *gui, int y) - : BC_FPot(50, - y, + : BC_FPot(xS(50), y, synth->config.oscillator_config.values[gui->number]->level, - INFINITYGAIN, - 0) + INFINITYGAIN, 0) { this->synth = synth; this->gui = gui; @@ -1297,11 +1235,9 @@ int SynthOscGUILevel::handle_event() SynthOscGUIPhase::SynthOscGUIPhase(Synth *synth, SynthOscGUI *gui, int y) - : BC_IPot(125, - y, + : BC_IPot(xS(125), y, (int64_t)(synth->config.oscillator_config.values[gui->number]->phase * 360), - 0, - 360) + 0, 360) { this->synth = synth; this->gui = gui; @@ -1323,11 +1259,9 @@ int SynthOscGUIPhase::handle_event() SynthOscGUIFreq::SynthOscGUIFreq(Synth *synth, SynthOscGUI *gui, int y) - : BC_IPot(200, - y, + : BC_IPot(xS(200), y, (int64_t)(synth->config.oscillator_config.values[gui->number]->freq_factor), - 1, - 100) + 1, 100) { this->synth = synth; this->gui = gui; @@ -1347,11 +1281,6 @@ int SynthOscGUIFreq::handle_event() } - - - - - SynthAddOsc::SynthAddOsc(Synth *synth, SynthWindow *window, int x, int y) : BC_GenericButton(x, y, _("Add")) { @@ -1372,7 +1301,6 @@ int SynthAddOsc::handle_event() } - SynthDelOsc::SynthDelOsc(Synth *synth, SynthWindow *window, int x, int y) : BC_GenericButton(x, y, _("Delete")) { @@ -1393,18 +1321,11 @@ int SynthDelOsc::handle_event() } -OscScroll::OscScroll(Synth *synth, - SynthWindow *window, - int x, - int y, - int h) - : BC_ScrollBar(x, - y, - SCROLL_VERT, - h, +OscScroll::OscScroll(Synth *synth, SynthWindow *window, + int x, int y, int h) + : BC_ScrollBar(x, y, SCROLL_VERT, h, synth->config.oscillator_config.total * OSCILLATORHEIGHT, - 0, - window->osc_subwindow->get_h()) + 0, window->osc_subwindow->get_h()) { this->synth = synth; this->window = window; @@ -1422,18 +1343,11 @@ int OscScroll::handle_event() -NoteScroll::NoteScroll(Synth *synth, - SynthWindow *window, - int x, - int y, - int w) - : BC_ScrollBar(x, - y, - SCROLL_HORIZ, - w, +NoteScroll::NoteScroll(Synth *synth, SynthWindow *window, + int x, int y, int w) + : BC_ScrollBar(x, y, SCROLL_HORIZ, w, window->white_key[0]->get_w() * TOTALNOTES * 7 / 12 + window->white_key[0]->get_w(), - 0, - window->note_subwindow->get_w()) + 0, window->note_subwindow->get_w()) { this->synth = synth; this->window = window; @@ -1450,18 +1364,6 @@ int NoteScroll::handle_event() } - - - - - - - - - - - - SynthClear::SynthClear(Synth *synth, int x, int y) : BC_GenericButton(x, y, _("Clear")) { @@ -1479,10 +1381,6 @@ int SynthClear::handle_event() } - - - - SynthWaveForm::SynthWaveForm(Synth *synth, int x, int y, char *text) : BC_PopupMenu(x, y, xS(120), text) { @@ -1526,11 +1424,7 @@ int SynthWaveFormItem::handle_event() SynthWetness::SynthWetness(Synth *synth, int x, int y) - : BC_FPot(x, - y, - synth->config.wetness, - INFINITYGAIN, - 0) + : BC_FPot(x, y, synth->config.wetness, INFINITYGAIN, 0) { this->synth = synth; } @@ -1595,17 +1489,9 @@ int SynthBaseFreq::handle_event() -SynthCanvas::SynthCanvas(Synth *synth, - SynthWindow *window, - int x, - int y, - int w, - int h) - : BC_SubWindow(x, - y, - w, - h, - BLACK) +SynthCanvas::SynthCanvas(Synth *synth, SynthWindow *window, + int x, int y, int w, int h) + : BC_SubWindow(x, y, w, h, BLACK) { this->synth = synth; this->window = window; @@ -1640,12 +1526,6 @@ int SynthCanvas::update() } - - - - - - // ======================= level calculations SynthLevelZero::SynthLevelZero(Synth *synth) : BC_MenuItem(_("Zero")) @@ -2016,7 +1896,8 @@ int SynthFreqFibonacci::handle_event() for(int i = 0; i < synth->config.oscillator_config.total; i++) { synth->config.oscillator_config.values[i]->freq_factor = last_value1 + last_value2; - if(synth->config.oscillator_config.values[i]->freq_factor > 100) synth->config.oscillator_config.values[i]->freq_factor = 100; + if(synth->config.oscillator_config.values[i]->freq_factor > 100) + synth->config.oscillator_config.values[i]->freq_factor = 100; last_value1 = last_value2; last_value2 = synth->config.oscillator_config.values[i]->freq_factor; } diff --git a/cinelerra-5.1/plugins/synthesizer/synthesizer.h b/cinelerra-5.1/plugins/synthesizer/synthesizer.h index 3529ce9e..d8d10bd3 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthesizer.h +++ b/cinelerra-5.1/plugins/synthesizer/synthesizer.h @@ -28,12 +28,10 @@ #include "guicast.h" #include "mutex.h" #include "pluginaclient.h" +#include "synthesizer.inc" #include "vframe.inc" -class Synth; -class SynthWindow; - // Frequency table for piano float keyboard_freqs[] = { @@ -109,12 +107,11 @@ float keyboard_freqs[] = #define MAX_FREQS 16 #define TOTALOSCILLATORS 1 -#define OSCILLATORHEIGHT 40 #define TOTALNOTES ((int)(sizeof(keyboard_freqs) / sizeof(float))) #define MIDDLE_C 24 #define FIRST_TITLE (MIDDLE_C - 12) #define LAST_TITLE (MIDDLE_C + 12) -#define MARGIN 10 +#define MARGIN yS(10) #define SINE 0 #define SAWTOOTH 1 diff --git a/cinelerra-5.1/plugins/synthesizer/synthesizer.inc b/cinelerra-5.1/plugins/synthesizer/synthesizer.inc index 11f714a8..024c704a 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthesizer.inc +++ b/cinelerra-5.1/plugins/synthesizer/synthesizer.inc @@ -27,6 +27,6 @@ class Synth; class SynthOscillator; - +#define OSCILLATORHEIGHT yS(40) #endif diff --git a/cinelerra-5.1/plugins/synthesizer/synthwindow.inc b/cinelerra-5.1/plugins/synthesizer/synthwindow.inc index b8145e1a..cddf8077 100644 --- a/cinelerra-5.1/plugins/synthesizer/synthwindow.inc +++ b/cinelerra-5.1/plugins/synthesizer/synthwindow.inc @@ -22,8 +22,6 @@ #ifndef SYNTHWINDOW_INC #define SYNTHWINDOW_INC - - class SynthThread; class SynthOscGUI; class SynthOscGUILevel; @@ -40,7 +38,4 @@ class SynthSubWindow; class SynthScroll; class SynthClear; -#define OSCILLATORHEIGHT 40 - - #endif diff --git a/cinelerra-5.1/plugins/theme_blond/blondtheme.C b/cinelerra-5.1/plugins/theme_blond/blondtheme.C index 0390829e..788a4aaa 100644 --- a/cinelerra-5.1/plugins/theme_blond/blondtheme.C +++ b/cinelerra-5.1/plugins/theme_blond/blondtheme.C @@ -935,15 +935,15 @@ 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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C b/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C index 3e11654d..de86d4c9 100644 --- a/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C +++ b/cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C @@ -1244,15 +1244,15 @@ void BlondCVTheme::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_blue/bluetheme.C b/cinelerra-5.1/plugins/theme_blue/bluetheme.C index 309b0e06..53b6899a 100644 --- a/cinelerra-5.1/plugins/theme_blue/bluetheme.C +++ b/cinelerra-5.1/plugins/theme_blue/bluetheme.C @@ -932,15 +932,15 @@ void BlueDotTheme::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } void BlueDotTheme::build_overlays() diff --git a/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C b/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C index 8865fec1..8f026c6d 100644 --- a/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C +++ b/cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C @@ -1281,16 +1281,16 @@ void BlueDotTheme::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"); //Graphic Copied from default. Improve!! - new_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.png"); + new_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_bright/brighttheme.C b/cinelerra-5.1/plugins/theme_bright/brighttheme.C index c6a9eb3c..613cca73 100644 --- a/cinelerra-5.1/plugins/theme_bright/brighttheme.C +++ b/cinelerra-5.1/plugins/theme_bright/brighttheme.C @@ -927,15 +927,15 @@ void BrightTheme::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C b/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C index 530b40eb..f7d4faf0 100644 --- a/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C +++ b/cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C @@ -1083,15 +1083,15 @@ void CAKEWALKTHEME::get_vwindow_sizes(VWindowGUI *gui) void CAKEWALKTHEME::build_bg_data() { channel_position_data = new VFramePng(get_image_data("channel_position.png")); - 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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } void CAKEWALKTHEME::build_overlays() { diff --git a/cinelerra-5.1/plugins/theme_hulk/hulktheme.C b/cinelerra-5.1/plugins/theme_hulk/hulktheme.C index e77e343b..f75d58b9 100644 --- a/cinelerra-5.1/plugins/theme_hulk/hulktheme.C +++ b/cinelerra-5.1/plugins/theme_hulk/hulktheme.C @@ -933,15 +933,15 @@ void HULKTHEME::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_neophyte/neophyte.C b/cinelerra-5.1/plugins/theme_neophyte/neophyte.C index 019db9de..d30150e0 100644 --- a/cinelerra-5.1/plugins/theme_neophyte/neophyte.C +++ b/cinelerra-5.1/plugins/theme_neophyte/neophyte.C @@ -1260,15 +1260,15 @@ void NEOPHYTETHEME::build_bg_data() // Audio settings 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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } void NEOPHYTETHEME::build_overlays() diff --git a/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C b/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C index 4e3d6b15..558b14f1 100644 --- a/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C +++ b/cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C @@ -931,15 +931,15 @@ void PINKLADY::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } void PINKLADY::build_overlays() diff --git a/cinelerra-5.1/plugins/theme_suv/suv.C b/cinelerra-5.1/plugins/theme_suv/suv.C index 251d2580..91b9c198 100644 --- a/cinelerra-5.1/plugins/theme_suv/suv.C +++ b/cinelerra-5.1/plugins/theme_suv/suv.C @@ -920,15 +920,15 @@ void SUV::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } diff --git a/cinelerra-5.1/plugins/theme_unflat/unflattheme.C b/cinelerra-5.1/plugins/theme_unflat/unflattheme.C index 8f10237b..f835312c 100644 --- a/cinelerra-5.1/plugins/theme_unflat/unflattheme.C +++ b/cinelerra-5.1/plugins/theme_unflat/unflattheme.C @@ -926,15 +926,15 @@ void UNFLATTHEME::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_image("plugin_bg_data", "plugin_bg.png"); - new_image("title_bg_data", "title_bg.png"); - new_image("vtimebar_bg_data", "vwindow_timebar.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_image1("plugin_bg_data", "plugin_bg.png"); + new_image1("title_bg_data", "title_bg.png"); + new_image1("vtimebar_bg_data", "vwindow_timebar.png"); } void UNFLATTHEME::build_overlays() diff --git a/cinelerra-5.1/plugins/timestretchrt/timestretchrt.C b/cinelerra-5.1/plugins/timestretchrt/timestretchrt.C index c84dca49..5deb8c9a 100644 --- a/cinelerra-5.1/plugins/timestretchrt/timestretchrt.C +++ b/cinelerra-5.1/plugins/timestretchrt/timestretchrt.C @@ -93,10 +93,10 @@ void TimeStretchRTConfig::boundaries() TimeStretchRTWindow::TimeStretchRTWindow(TimeStretchRT *plugin) : PluginClientWindow(plugin, - xS(210), - yS(200), - xS(200), - yS(210), + xS(180), + yS(160), + xS(180), + yS(160), 0) { this->plugin = plugin; diff --git a/cinelerra-5.1/plugins/yuv411/yuv411win.C b/cinelerra-5.1/plugins/yuv411/yuv411win.C index 056f68bf..271389a9 100644 --- a/cinelerra-5.1/plugins/yuv411/yuv411win.C +++ b/cinelerra-5.1/plugins/yuv411/yuv411win.C @@ -3,7 +3,7 @@ #include "language.h" yuv411Window::yuv411Window(yuv411Main *client) - : PluginClientWindow(client, xS(250), yS(255), xS(250), yS(255), 0) + : PluginClientWindow(client, xS(260), yS(230), xS(260), yS(230), 0) { this->client = client; } @@ -15,7 +15,7 @@ yuv411Window::~yuv411Window() void yuv411Window::create_objects() { int xs10 = xS(10), xs90 = xS(90); - int ys10 = yS(10), ys30 = yS(30), ys35 = yS(35); + int ys10 = yS(10), ys30 = yS(30); int x = xs10, y = ys10, x1=xs90; add_tool(avg_vertical = new yuv411Toggle(client, &(client->config.avg_vertical), @@ -44,7 +44,7 @@ void yuv411Window::create_objects() add_subwindow(new BC_Title(x, y, _("Bias:"))); add_subwindow(bias=new yuv411Bias(client,x1,y)); y += ys30; - add_subwindow(reset = new yuv411Reset(client, this, x, y+ys35)); + add_subwindow(reset = new yuv411Reset(client, this, x, y+ys10)); show_window(); flush(); @@ -87,7 +87,7 @@ int yuv411Toggle::handle_event() } yuv411Offset::yuv411Offset(yuv411Main *client, int x, int y) - : BC_FSlider(x, y, 0, xS(100), yS(100), (float)0, (float)2, + : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)0, (float)2, (float)client->config.offset) { this->client = client; @@ -101,7 +101,7 @@ int yuv411Offset::handle_event() } yuv411Thresh::yuv411Thresh(yuv411Main *client, int x, int y) - : BC_FSlider(x, y, 0, xS(100), yS(100), (float)1, (float)100, + : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)1, (float)100, (float)client->config.thresh) { this->client = client; @@ -115,7 +115,7 @@ int yuv411Thresh::handle_event() } yuv411Bias::yuv411Bias(yuv411Main *client, int x, int y) - : BC_FSlider(x, y, 0, xS(100), yS(100), (float)0, (float)25, + : BC_FSlider(x+xS(60), y, 0, xS(100), yS(100), (float)0, (float)25, (float)client->config.bias) { this->client = client;