X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fdeinterlace-cv%2Fdeinterwindow-cv.C;h=bd090e4754df22b356114f4f0bcd07944ea76760;hb=255d67d0fcabfbcd208f2587a9a75697a15d6349;hp=d3be67af40818311bd57e6e04bb8408154e88bd0;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/plugins/deinterlace-cv/deinterwindow-cv.C b/cinelerra-5.1/plugins/deinterlace-cv/deinterwindow-cv.C index d3be67af..bd090e47 100644 --- a/cinelerra-5.1/plugins/deinterlace-cv/deinterwindow-cv.C +++ b/cinelerra-5.1/plugins/deinterlace-cv/deinterwindow-cv.C @@ -27,10 +27,10 @@ DeInterlaceWindow::DeInterlaceWindow(DeInterlaceMain *client) : PluginClientWindow(client, - 400, - 200, - 400, - 200, + xS(400), + yS(200), + xS(400), + yS(200), 0) { this->client = client; @@ -44,21 +44,23 @@ DeInterlaceWindow::~DeInterlaceWindow() void DeInterlaceWindow::create_objects() { - int x = 10, y = 10; + int xs10 = xS(10); + int ys10 = yS(10), ys25 = yS(25); + int x = xs10, y = ys10; add_tool(new BC_Title(x, y, _("Select deinterlacing mode"))); - y += 25; + y += ys25; add_tool(mode = new DeInterlaceMode(client, this, x, y)); mode->create_objects(); - y += 25; + y += ys25; optional_controls_x=x; optional_controls_y=y; - y += 125; + y += yS(125); char string[BCTEXTLEN]; get_status_string(string, 0); add_tool(status = new BC_Title(x, y, string)); flash(); show_window(); - set_mode(client->config.mode,0); + set_mode(client->config.mode, 1); } void DeInterlaceWindow::get_status_string(char *string, int changed_rows) @@ -85,27 +87,27 @@ int DeInterlaceWindow::set_mode(int mode, int recursive) case DEINTERLACE_KEEP: case DEINTERLACE_BOBWEAVE: add_subwindow(dominance_top = new DeInterlaceDominanceTop(client, this, x, y, _("Keep top field"))); - y+=25; + y+=yS(25); add_subwindow(dominance_bottom = new DeInterlaceDominanceBottom(client, this, x, y, _("Keep bottom field"))); - y+=25; + y+=yS(25); break; case DEINTERLACE_AVG_1F: add_subwindow(dominance_top = new DeInterlaceDominanceTop(client, this, x, y, _("Average top fields"))); - y+=25; + y+=yS(25); add_subwindow(dominance_bottom = new DeInterlaceDominanceBottom(client, this, x, y,_("Average bottom fields"))); - y+=25; + y+=yS(25); break; case DEINTERLACE_SWAP: add_subwindow(dominance_top = new DeInterlaceDominanceTop(client, this, x, y, _("Top field first"))); - y+=25; + y+=yS(25); add_subwindow(dominance_bottom = new DeInterlaceDominanceBottom(client, this, x, y, _("Bottom field first"))); - y+=25; + y+=yS(25); break; case DEINTERLACE_TEMPORALSWAP: add_subwindow(dominance_top = new DeInterlaceDominanceTop(client, this, x, y, _("Top field first"))); - y+=25; + y+=yS(25); add_subwindow(dominance_bottom = new DeInterlaceDominanceBottom(client, this, x, y, _("Bottom field first"))); - y+=25; + y+=yS(25); break; case DEINTERLACE_NONE: case DEINTERLACE_AVG: @@ -123,13 +125,15 @@ int DeInterlaceWindow::set_mode(int mode, int recursive) case DEINTERLACE_AVG_1F: add_subwindow(adaptive = new DeInterlaceAdaptive(client, x, y)); - add_subwindow(threshold = new DeInterlaceThreshold(client, x + 150, y)); - add_subwindow(threshold->title_caption=new BC_Title(x+150, y + 50, _("Threshold"))); + add_subwindow(threshold = new DeInterlaceThreshold(client, x + xS(150), y)); + add_subwindow(threshold->title_caption=new BC_Title(x+xS(150), y + yS(50), _("Threshold"))); + threshold->show_window(0); adaptive->update(client->config.adaptive?BC_Toggle::TOGGLE_CHECKED:0); break; case DEINTERLACE_BOBWEAVE: - add_subwindow(threshold = new DeInterlaceThreshold(client, x + 150, y)); - add_subwindow(threshold->title_caption=new BC_Title(x+150, y + 50, _("Bob Threshold"))); + add_subwindow(threshold = new DeInterlaceThreshold(client, x + xS(150), y)); + add_subwindow(threshold->title_caption=new BC_Title(x+xS(150), y + yS(50), _("Bob Threshold"))); + threshold->show_window(0); break; case DEINTERLACE_NONE: case DEINTERLACE_KEEP: @@ -237,7 +241,7 @@ DeInterlaceMode::DeInterlaceMode(DeInterlaceMain*plugin, DeInterlaceWindow *gui, int x, int y) - : BC_PopupMenu(x, y, 200, to_text(plugin->config.mode), 1) + : BC_PopupMenu(x, y, xS(200), to_text(plugin->config.mode), 1) { this->plugin = plugin; this->gui = gui;