Skip to content

add alert to hazeremoval if HQ processing is disabled #18387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/iop/hazeremoval.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of darktable,
Copyright (C) 2017-2024 darktable developers.
Copyright (C) 2017-2025 darktable developers.

darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -80,6 +80,7 @@ typedef struct dt_iop_hazeremoval_gui_data_t
{
GtkWidget *strength;
GtkWidget *distance;
GtkWidget *alert;
rgb_pixel A0;
float distance_max;
dt_hash_t hash;
Expand Down Expand Up @@ -225,6 +226,8 @@ void gui_update(dt_iop_module_t *self)
g->A0[1] = NAN;
g->A0[2] = NAN;
g->hash = 0;
if(self->dev)
gtk_widget_set_visible(g->alert, !self->dev->late_scaling.enabled);
dt_iop_gui_leave_critical_section(self);
}

Expand Down Expand Up @@ -254,6 +257,12 @@ void gui_init(dt_iop_module_t *self)
dt_bauhaus_slider_set_digits(g->distance, 3);
gtk_widget_set_tooltip_text(g->distance,
_("limit haze removal up to a specific spatial depth"));
g->alert = gtk_label_new(_("HQ processing must be enabled for correct preview"));
gtk_widget_set_name(g->alert,"alert");
gtk_label_set_line_wrap(GTK_LABEL(g->alert), TRUE);
if(self->dev)
gtk_widget_set_visible(g->alert, !self->dev->late_scaling.enabled);
gtk_box_pack_start(GTK_BOX(self->widget), g->alert, TRUE, TRUE, 0);
}


Expand Down
Loading