add BC_SCALE env var for hi def monitors, cleanup theme data
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / resizetrackthread.C
index c929c64baad71146680a3f93c2d68e09fc2af5d2..eb6f295a5e374aa08fdc5f47e34e305dd57d676e 100644 (file)
@@ -96,18 +96,13 @@ void ResizeVTrackThread::run()
 #endif
 }
 
-
-
+#define RSZ_W xS(320)
+#define RSZ_H yS(120)
 
 ResizeVTrackWindow::ResizeVTrackWindow(MWindow *mwindow,
-       ResizeVTrackThread *thread,
-       int x,
-       int y)
- : BC_Window(_(PROGRAM_NAME ": Resize Track"),
-                               x - 320 / 2, y - get_resources()->ok_images[0]->get_h() + 100 / 2,
-                               400, get_resources()->ok_images[0]->get_h() + 100,
-                               400, get_resources()->ok_images[0]->get_h() + 100,
-                               0, 0, 1)
+               ResizeVTrackThread *thread, int x, int y)
+ : BC_Window(_(PROGRAM_NAME ": Resize Track"), x-RSZ_W/2, y-RSZ_H/2,
+               RSZ_W, RSZ_H, RSZ_W, RSZ_H, 0, 0, 1)
 {
        this->mwindow = mwindow;
        this->thread = thread;
@@ -119,27 +114,29 @@ ResizeVTrackWindow::~ResizeVTrackWindow()
 
 void ResizeVTrackWindow::create_objects()
 {
+       int xs5 = xS(5), xs10 = xS(10);
+       int ys10 = yS(10);
        lock_window("ResizeVTrackWindow::create_objects");
-       int x = 10, y = 10;
+       int x = xs10, y = ys10;
        BC_Title *size_title = new BC_Title(x, y, _("Size:"));
        add_subwindow(size_title);
        int x1 = x + size_title->get_w();
-       int y1 = y + size_title->get_h() + 10;
+       int y1 = y + size_title->get_h() + ys10;
        BC_Title *scale_title = new BC_Title(x, y1, _("Scale:"));
        add_subwindow(scale_title);
        int x2 = x + scale_title->get_w();
        if( x2 > x1 ) x1 = x2;
-       x1 += 10;
+       x1 += ys10;
        add_subwindow(w = new ResizeVTrackWidth(this, thread, x1, y));
-       x2 = x1 + w->get_w() + 5;
+       x2 = x1 + w->get_w() + xs5;
        BC_Title *xy = new BC_Title(x2, y, _("x"));
        add_subwindow(xy);
-       int x3 = x2 + xy->get_w() + 5;
+       int x3 = x2 + xy->get_w() + xs5;
        add_subwindow(h = new ResizeVTrackHeight(this, thread, x3, y));
-       x = x3 + h->get_w() + 5;
+       x = x3 + h->get_w() + xs5;
        FrameSizePulldown *pulldown;
        add_subwindow(pulldown = new FrameSizePulldown(mwindow->theme, w, h, x, y));
-       x += pulldown->get_w() + 5;
+       x += pulldown->get_w() + xs5;
        add_subwindow(new ResizeVTrackSwap(this, thread, x, y));
 
        add_subwindow(w_scale = new ResizeVTrackScaleW(this, thread, x1, y1));
@@ -213,7 +210,7 @@ ResizeVTrackWidth::ResizeVTrackWidth(ResizeVTrackWindow *gui,
        ResizeVTrackThread *thread,
        int x,
        int y)
- : BC_TextBox(x, y, 90, 1, thread->w)
+ : BC_TextBox(x, y, xS(90), 1, thread->w)
 {
        this->gui = gui;
        this->thread = thread;
@@ -229,7 +226,7 @@ ResizeVTrackHeight::ResizeVTrackHeight(ResizeVTrackWindow *gui,
        ResizeVTrackThread *thread,
        int x,
        int y)
- : BC_TextBox(x, y, 90, 1, thread->h)
+ : BC_TextBox(x, y, xS(90), 1, thread->h)
 {
        this->gui = gui;
        this->thread = thread;
@@ -246,7 +243,7 @@ ResizeVTrackScaleW::ResizeVTrackScaleW(ResizeVTrackWindow *gui,
        ResizeVTrackThread *thread,
        int x,
        int y)
- : BC_TextBox(x, y, 90, 1, (float)thread->w_scale)
+ : BC_TextBox(x, y, xS(90), 1, (float)thread->w_scale)
 {
        this->gui = gui;
        this->thread = thread;
@@ -262,7 +259,7 @@ ResizeVTrackScaleH::ResizeVTrackScaleH(ResizeVTrackWindow *gui,
        ResizeVTrackThread *thread,
        int x,
        int y)
- : BC_TextBox(x, y, 90, 1, (float)thread->h_scale)
+ : BC_TextBox(x, y, xS(90), 1, (float)thread->h_scale)
 {
        this->gui = gui;
        this->thread = thread;