add BC_SCALE env var for hi def monitors, cleanup theme data
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcprogressbox.C
index fde9580411c60e4e7b1266a16d51e9e7bfedfe5f..1fe29fda5993f2163e88178ba588a1eca2b20ed4 100644 (file)
@@ -116,13 +116,8 @@ void BC_ProgressBox::unlock_window()
 
 BC_ProgressWindow::BC_ProgressWindow(int x, int y)
  : BC_Window(_("Progress"),
-       x,
-       y,
-       340,
-       100 + get_resources()->ok_images[0]->get_h(),
-       0,
-       0,
-       0)
+       x, y, xS(340), yS(100) + get_resources()->ok_images[0]->get_h(),
+       0, 0, 0)
 {
 }
 
@@ -132,13 +127,13 @@ BC_ProgressWindow::~BC_ProgressWindow()
 
 int BC_ProgressWindow::create_objects(const char *text, int64_t length)
 {
-       int x = 10, y = 10;
+       int x = xS(10), y = yS(10);
        lock_window("BC_ProgressWindow::create_objects");
 // Recalculate width based on text
        if(text)
        {
                int text_w = get_text_width(MEDIUMFONT, text);
-               int new_w = text_w + x + 10, scr_w = get_screen_w(0, -1);
+               int new_w = text_w + x + xS(10), scr_w = get_screen_w(0, -1);
                if(new_w > scr_w) new_w = scr_w;
                if(new_w > get_w()) {
                        resize_window(new_w, get_h());
@@ -147,14 +142,11 @@ int BC_ProgressWindow::create_objects(const char *text, int64_t length)
 
        this->text = text;
        add_tool(caption = new BC_Title(x, y, text));
-       y += caption->get_h() + 20;
-       add_tool(bar = new BC_ProgressBar(x, y, get_w() - 20, length));
+       y += caption->get_h() + yS(20);
+       add_tool(bar = new BC_ProgressBar(x, y, get_w() - xS(20), length));
        add_tool(new BC_CancelButton(this));
        show_window(1);
        unlock_window();
        return 0;
 }
 
-
-
-