[gimp] app: Custom gui for channel mixer
- From: Alexia Death <alexiade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Custom gui for channel mixer
- Date: Sun, 7 Dec 2014 18:34:52 +0000 (UTC)
commit 44be17a8c10b95c161b9a69f79aba07d5afc8308
Author: Alexia Death <alexiadeath gmail com>
Date: Sun Dec 7 19:25:11 2014 +0200
app: Custom gui for channel mixer
app/widgets/gimppropgui-constructors.c | 103 ++++++++++++++++++++++++++++++++
app/widgets/gimppropgui-constructors.h | 7 ++
app/widgets/gimppropgui.c | 2 +
3 files changed, 112 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimppropgui-constructors.c b/app/widgets/gimppropgui-constructors.c
index 6d51ca6..ce2d070 100644
--- a/app/widgets/gimppropgui-constructors.c
+++ b/app/widgets/gimppropgui-constructors.c
@@ -521,6 +521,109 @@ _gimp_prop_gui_new_convolution_matrix (GObject *config,
return main_vbox;
}
+GtkWidget *
+_gimp_prop_gui_new_channel_mixer (GObject *config,
+ GParamSpec **param_specs,
+ guint n_param_specs,
+ GimpContext *context,
+ GimpCreatePickerFunc create_picker_func,
+ gpointer picker_creator)
+{
+ GtkWidget *main_vbox;
+ GtkWidget *vbox;
+ GtkWidget *set_label;
+ GtkWidget *checkbox;
+ GtkWidget *scale;
+ const gchar *label;
+
+ g_return_val_if_fail (G_IS_OBJECT (config), NULL);
+ g_return_val_if_fail (param_specs != NULL, NULL);
+ g_return_val_if_fail (n_param_specs > 0, NULL);
+ g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
+
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 1);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
+ gtk_widget_show (vbox);
+
+ checkbox = gimp_prop_widget_new (config, "preserve-luminosity",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), checkbox, TRUE, TRUE, 0);
+ gtk_widget_show (checkbox);
+
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
+ gtk_widget_show (vbox);
+
+ set_label = gtk_label_new (_("Red channel"));
+ gtk_box_pack_start (GTK_BOX (vbox), set_label, FALSE, FALSE, 0);
+ gtk_widget_show (set_label);
+
+ scale = gimp_prop_widget_new (config, "rr-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "rg-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "rb-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
+ gtk_widget_show (vbox);
+
+ set_label = gtk_label_new (_("Green channel"));
+ gtk_box_pack_start (GTK_BOX (vbox), set_label, FALSE, FALSE, 0);
+ gtk_widget_show (set_label);
+
+ scale = gimp_prop_widget_new (config, "gr-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "gg-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "gb-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
+ gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
+ gtk_widget_show (vbox);
+
+ set_label = gtk_label_new (_("Blue channel"));
+ gtk_box_pack_start (GTK_BOX (vbox), set_label, FALSE, FALSE, 0);
+ gtk_widget_show (set_label);
+
+ scale = gimp_prop_widget_new (config, "br-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "bg-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ scale = gimp_prop_widget_new (config, "bb-gain",
+ context, NULL, NULL, &label);
+ gtk_box_pack_start (GTK_BOX (vbox), scale, TRUE, TRUE, 0);
+ gtk_widget_show (scale);
+
+ return main_vbox;
+}
/* private functions */
diff --git a/app/widgets/gimppropgui-constructors.h b/app/widgets/gimppropgui-constructors.h
index 42a8ed6..15eea71 100644
--- a/app/widgets/gimppropgui-constructors.h
+++ b/app/widgets/gimppropgui-constructors.h
@@ -46,5 +46,12 @@ GtkWidget * _gimp_prop_gui_new_convolution_matrix
GimpCreatePickerFunc create_picker_func,
gpointer picker_creator);
+GtkWidget * _gimp_prop_gui_new_channel_mixer
+ (GObject *config,
+ GParamSpec **param_specs,
+ guint n_param_specs,
+ GimpContext *context,
+ GimpCreatePickerFunc create_picker_func,
+ gpointer picker_creator);
#endif /* __GIMP_PROP_GUI_CONSTRUCTORS_H__ */
diff --git a/app/widgets/gimppropgui.c b/app/widgets/gimppropgui.c
index 263f64d..f4b2a5f 100644
--- a/app/widgets/gimppropgui.c
+++ b/app/widgets/gimppropgui.c
@@ -327,6 +327,8 @@ gui_new_funcs[] =
_gimp_prop_gui_new_color_rotate },
{ "GimpGegl-gegl-convolution-matrix-config",
_gimp_prop_gui_new_convolution_matrix },
+ { "GimpGegl-gegl-channel-mixer-config",
+ _gimp_prop_gui_new_channel_mixer },
{ NULL,
_gimp_prop_gui_new_generic }
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]