X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbcprogressbox.C;h=1fe29fda5993f2163e88178ba588a1eca2b20ed4;hb=a6b1f3c0c5c17c3a26758abc46bcb46100308c66;hp=fde9580411c60e4e7b1266a16d51e9e7bfedfe5f;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/guicast/bcprogressbox.C b/cinelerra-5.1/guicast/bcprogressbox.C index fde95804..1fe29fda 100644 --- a/cinelerra-5.1/guicast/bcprogressbox.C +++ b/cinelerra-5.1/guicast/bcprogressbox.C @@ -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; } - - -