X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fbrightness%2Fbrightnesswindow.C;h=5a455e0189548a27ebbaa5dd0fdadeec7f7374e4;hp=73542ca3dd6a0b9534286070cda2a786c42f032c;hb=1c6e05239a27d92813c27c697ccac25378b9efa0;hpb=da82546b4d3b6b056c6c333b2d52fba1bdcb1f50;ds=sidebyside diff --git a/cinelerra-5.1/plugins/brightness/brightnesswindow.C b/cinelerra-5.1/plugins/brightness/brightnesswindow.C index 73542ca3..5a455e01 100644 --- a/cinelerra-5.1/plugins/brightness/brightnesswindow.C +++ b/cinelerra-5.1/plugins/brightness/brightnesswindow.C @@ -68,10 +68,21 @@ void BrightnessWindow::create_objects() add_tool(luma = new BrightnessLuma(client, x, y)); + + y += 35; + add_subwindow(reset = new BrightnessReset(client, this, x, y)); + show_window(); flush(); } +// for Reset button +void BrightnessWindow::update() +{ + brightness->update(client->config.brightness); + contrast->update(client->config.contrast); + luma->update(client->config.luma); +} BrightnessSlider::BrightnessSlider(BrightnessMain *client, float *output, @@ -138,3 +149,22 @@ int BrightnessLuma::handle_event() client->send_configure_change(); return 1; } + + +BrightnessReset::BrightnessReset(BrightnessMain *client, BrightnessWindow *window, int x, int y) + : BC_GenericButton(x, y, _("Reset")) +{ + this->client = client; + this->window = window; +} +BrightnessReset::~BrightnessReset() +{ +} +int BrightnessReset::handle_event() +{ + client->config.reset(); + window->update(); + client->send_configure_change(); + return 1; +} +