confirm prefs update, fix bg_pixmap sz, plugin layout tweaks
authorGood Guy <good1.2guy@gmail.com>
Fri, 25 Oct 2019 00:29:58 +0000 (18:29 -0600)
committerGood Guy <good1.2guy@gmail.com>
Fri, 25 Oct 2019 00:29:58 +0000 (18:29 -0600)
37 files changed:
cinelerra-5.1/cinelerra/gwindowgui.C
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/cinelerra/preferencesthread.h
cinelerra-5.1/cinelerra/preferencesthread.inc
cinelerra-5.1/cinelerra/question.C
cinelerra-5.1/cinelerra/render.C
cinelerra-5.1/guicast/bctheme.C
cinelerra-5.1/guicast/bctheme.h
cinelerra-5.1/guicast/vframe.C
cinelerra-5.1/plugins/audioscope/audioscope.C
cinelerra-5.1/plugins/compressor/compressor.C
cinelerra-5.1/plugins/delayaudio/delayaudio.C
cinelerra-5.1/plugins/denoise/denoise.C
cinelerra-5.1/plugins/graphic/graphic.C
cinelerra-5.1/plugins/loopaudio/loopaudio.C
cinelerra-5.1/plugins/overlayaudio/overlayaudio.C
cinelerra-5.1/plugins/parametric/parametric.C
cinelerra-5.1/plugins/pitch/pitch.C
cinelerra-5.1/plugins/removegaps/removegaps.C
cinelerra-5.1/plugins/resamplert/resamplert.C
cinelerra-5.1/plugins/synthesizer/synthesizer.C
cinelerra-5.1/plugins/synthesizer/synthesizer.h
cinelerra-5.1/plugins/synthesizer/synthesizer.inc
cinelerra-5.1/plugins/synthesizer/synthwindow.inc
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_neophyte/neophyte.C
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/unflattheme.C
cinelerra-5.1/plugins/timestretchrt/timestretchrt.C
cinelerra-5.1/plugins/yuv411/yuv411win.C

index 3bcb853ef4b30e3eef5e88c11823db6639e3f1b3..bc250716b68b3937500159f6c779b21a0499d037 100644 (file)
@@ -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);
index 23494e709b54e2c5bf5fba93c734bf5962e789ea..e273813615b865f617e6af2a8d56f00f1514f9ce 100644 (file)
@@ -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),
index 4cec37ebca162321259848d73064ee3e009ec8a1..98f1400c319737c8247cca448e8849eeb450f1f5 100644 (file)
@@ -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:
index da14e2d03679e787e82cd1d5ca6cc4f9db66a3fb..43faada4c3b585768f1c9de2937dbf956046fa28 100644 (file)
 #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
index e89b9c0f5153e411de8eef7c8ce0ae78c75bc6b2..ccea32c120c8504483553b30b64d27519be19e4a 100644 (file)
@@ -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"),
index 015bebd5fe1102f196a2b3975c2f738b79ba918e..57e724aeda3b5ae5f691feb6836c924542ade1ec 100644 (file)
@@ -222,6 +222,7 @@ Render::Render(MWindow *mwindow)
 
 Render::~Render()
 {
+       stop_operation();
        close_window();
        delete package_lock;
        delete counter_lock;
index c206f258af27131ab8e8dd0a3e1d12a3812444ef..1ec64c7f98eadd675b338715a01aa2629275b8eb 100644 (file)
@@ -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)
 {
index c9addd3c9d918bda1ff7de2adcc9a4e6ef994538..572a77bc307f7fed0df7178183d98640f22c88d2 100644 (file)
@@ -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
index a4a76cc441c8a9f28d76dbce68e8e1759815dbf5..293205821fc9090da5f1a4b136539cc26497c174 100644 (file)
@@ -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);
index d6defad9cce3e2e947ddb4d349b75e7c5bf6fcc3..356f8112516a30e9b4d790dabd9801a423a641e7 100644 (file)
@@ -132,7 +132,7 @@ AudioScopeWindowSize::AudioScopeWindowSize(AudioScope *plugin,
        char *text)
  : BC_PopupMenu(x,
        y,
-       xS(80),
+       xS(110),
        text)
 {
        this->plugin = plugin;
index 486a498e4f3b13116c5b15e50cbb869950bd2f2d..b167c6ee3dfa0d6b64a5212366b183e0c9d3f4d8 100644 (file)
@@ -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)
 {
index 7fa8af607a8deb21876298561f6a756f86067328..22c32f62f5115e91330e13c8008e1cbe2570f892 100644 (file)
@@ -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;
 }
index 4682740e428ac9329388a021839e16eb338c11c6..72c90956639f01e2a93b34882981b522dee42766 100644 (file)
@@ -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;
 }
index 8dcdf979833f058a28ec350c75e2e05c4060876a..16c2f546ad564573c628108b9a2ed1ef8ff0d695 100644 (file)
@@ -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;
index 5974c90ec5a0f631a073b454dd3e0185066b1b6d..dfdaea02354d82574a1ca2730af5d57a3ba39caa 100644 (file)
@@ -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;
index 975b3b31062653665a040d4961b420a4144471a9..b9c774777386b64e137e9fba874849fcd4423e7a 100644 (file)
@@ -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;
index ddc85229a907479256ddb9847d2a8c986655e3d7..ceb7b1d866a8ce676dbb2ace82a4f626b4ffd71e 100644 (file)
@@ -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;
index b858ea283016615c5030c8557fb6f22f2f4eb400..9f1b1b57ca1ea172afb55646eafd79dc5492fb81 100644 (file)
@@ -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;
 }
index 4fff8f2bb35fe685a3393dba7901639a34398db3..cfa530448b3c0c7f4e7ca9c404daf8a67fbc5344 100644 (file)
@@ -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;
index 27f60270f6f14ec1331f147538cddbb6f26b3117..f0c75d8d5daad29102f40bd6ca3f570c7e98bc6c 100644 (file)
@@ -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;
index 909b19282ae71d8fd2b78feca09f91db95c200d4..72ead069b7701bd81b824215a238789e2a513806 100644 (file)
@@ -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;
        }
index 3529ce9e8a2139cf79d32429ce8a965c036408f1..d8d10bd3070602d49799ae1c49ccb989f669afc6 100644 (file)
 #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
index 11f714a8412eacb20702fc0b1b16332d42fe2acc..024c704a918dc215a56e000b98e2094583928148 100644 (file)
@@ -27,6 +27,6 @@
 class Synth;
 class SynthOscillator;
 
-
+#define OSCILLATORHEIGHT yS(40)
 
 #endif
index b8145e1aa34203768e43f6a3bc85bbe01668b2c4..cddf8077ba51a46b865cbc722c5292b423384ebc 100644 (file)
@@ -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
index 0390829e060bfa79d0369834be5770a551765f8d..788a4aaa093c7970abbe43876d25b60838515a6c 100644 (file)
@@ -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");
 }
 
 
index 3e11654dd20efeaa5141b318e7cb16eca0ca679d..de86d4c94952a1cfffff04230542a3b2af6fe522 100644 (file)
@@ -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");
 }
 
 
index 309b0e0680ae276eff0978649d50a0087083b8af..53b6899ace24950bcc9b5fc68d2feaeea63f76f9 100644 (file)
@@ -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()
index 8865fec1857cd5b3f3bb473028275ababe0f1eb0..8f026c6db4367829379bce85234a08ed9b445855 100644 (file)
@@ -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");
 }
 
 
index c6a9eb3cfdc30a78bb282c36b0c3980080967282..613cca73e6b918dd71bb3d6e9f6f0294fa8cf980 100644 (file)
@@ -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");
 }
 
 
index 530b40eb7bb11420195f5685525e3bb6618148da..f7d4faf0acf11ebe7e729f26ff544a5711d9a409 100644 (file)
@@ -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()
 {
index e77e343b4bf75fec1d4e42fe21e3425df250dd9b..f75d58b9295a9df43839faabf8857ddb1ad6c33d 100644 (file)
@@ -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");
 }
 
 
index 019db9de0898510c3b912935074309f6a600f4bc..d30150e083efd9c8e86c9bf3dc892981b1ebd6d8 100644 (file)
@@ -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()
index 4e3d6b15214c13d22d1c86f352f40c0fd4355a65..558b14f1300efb3ce25f9ebfddd1f302459e5b41 100644 (file)
@@ -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()
index 251d25803268b72ac8e078dd3df67782b42681f5..91b9c198a667ec341293103ddb7950173ec98d76 100644 (file)
@@ -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");
 }
 
 
index 8f10237b9ef8652b60f4b6dbc79fc41e0afc605c..f835312cf3362917c8ced353af7a7b6c10bef26d 100644 (file)
@@ -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()
index c84dca49b06d78cc41e3108f365ed35a88c23040..5deb8c9ab785f1e46abdee2fc9936338e6c617b5 100644 (file)
@@ -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;
index 056f68bf04ca0148bdaba419a60d57333c2d573d..271389a9de3e6ca2af00f82473be830fcd957dff 100644 (file)
@@ -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;