mirror of https://github.com/GNOME/gimp.git
Build with GSEAL_ENABLE
This commit is contained in:
parent
fa21f2da5b
commit
fb1fdf49b4
|
@ -397,8 +397,8 @@ gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
|
|||
gimp_color_frame_set_color (GIMP_COLOR_FRAME (picker_tool->color_frame2),
|
||||
sample_type, color, color_index);
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (picker_tool->dialog))
|
||||
gdk_window_show (picker_tool->dialog->window);
|
||||
if (gtk_widget_get_visible (picker_tool->dialog))
|
||||
gdk_window_show (gtk_widget_get_window (picker_tool->dialog));
|
||||
else
|
||||
gtk_widget_show (picker_tool->dialog);
|
||||
}
|
||||
|
|
|
@ -860,10 +860,15 @@ gimp_levels_tool_config_notify (GObject *object,
|
|||
! strcmp (pspec->name, "low-input") ||
|
||||
! strcmp (pspec->name, "high-input"))
|
||||
{
|
||||
tool->low_input->upper = 255;
|
||||
tool->high_input->lower = 0;
|
||||
tool->gamma_linear->lower = 0;
|
||||
tool->gamma_linear->upper = 255;
|
||||
g_object_freeze_notify (G_OBJECT (tool->low_input));
|
||||
g_object_freeze_notify (G_OBJECT (tool->high_input));
|
||||
g_object_freeze_notify (G_OBJECT (tool->gamma_linear));
|
||||
|
||||
gtk_adjustment_set_upper (tool->low_input, 255);
|
||||
gtk_adjustment_set_lower (tool->high_input, 0);
|
||||
|
||||
gtk_adjustment_set_lower (tool->gamma_linear, 0);
|
||||
gtk_adjustment_set_upper (tool->gamma_linear, 255);
|
||||
|
||||
gtk_adjustment_set_value (tool->low_input,
|
||||
config->low_input[config->channel] * 255.0);
|
||||
|
@ -872,13 +877,19 @@ gimp_levels_tool_config_notify (GObject *object,
|
|||
gtk_adjustment_set_value (tool->high_input,
|
||||
config->high_input[config->channel] * 255.0);
|
||||
|
||||
tool->low_input->upper = gtk_adjustment_get_value (tool->high_input);
|
||||
tool->high_input->lower = gtk_adjustment_get_value (tool->low_input);
|
||||
tool->gamma_linear->lower = gtk_adjustment_get_value (tool->low_input);
|
||||
tool->gamma_linear->upper = gtk_adjustment_get_value (tool->high_input);
|
||||
gtk_adjustment_changed (tool->low_input);
|
||||
gtk_adjustment_changed (tool->high_input);
|
||||
gtk_adjustment_changed (tool->gamma_linear);
|
||||
gtk_adjustment_set_upper (tool->low_input,
|
||||
gtk_adjustment_get_value (tool->high_input));
|
||||
gtk_adjustment_set_lower (tool->high_input,
|
||||
gtk_adjustment_get_value (tool->low_input));
|
||||
|
||||
gtk_adjustment_set_lower (tool->gamma_linear,
|
||||
gtk_adjustment_get_value (tool->low_input));
|
||||
gtk_adjustment_set_upper (tool->gamma_linear,
|
||||
gtk_adjustment_get_value (tool->high_input));
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (tool->low_input));
|
||||
g_object_thaw_notify (G_OBJECT (tool->high_input));
|
||||
g_object_thaw_notify (G_OBJECT (tool->gamma_linear));
|
||||
|
||||
levels_update_input_bar (tool);
|
||||
}
|
||||
|
@ -1055,10 +1066,8 @@ levels_low_input_changed (GtkAdjustment *adjustment,
|
|||
GimpLevelsConfig *config = tool->config;
|
||||
gint value = ROUND (gtk_adjustment_get_value (adjustment));
|
||||
|
||||
tool->high_input->lower = value;
|
||||
tool->gamma_linear->lower = value;
|
||||
gtk_adjustment_changed (tool->high_input);
|
||||
gtk_adjustment_changed (tool->gamma_linear);
|
||||
gtk_adjustment_set_lower (tool->high_input, value);
|
||||
gtk_adjustment_set_lower (tool->gamma_linear, value);
|
||||
|
||||
if (config->low_input[config->channel] != value / 255.0)
|
||||
{
|
||||
|
@ -1094,10 +1103,8 @@ levels_high_input_changed (GtkAdjustment *adjustment,
|
|||
GimpLevelsConfig *config = tool->config;
|
||||
gint value = ROUND (gtk_adjustment_get_value (adjustment));
|
||||
|
||||
tool->low_input->upper = value;
|
||||
tool->gamma_linear->upper = value;
|
||||
gtk_adjustment_changed (tool->low_input);
|
||||
gtk_adjustment_changed (tool->gamma_linear);
|
||||
gtk_adjustment_set_upper (tool->low_input, value);
|
||||
gtk_adjustment_set_upper (tool->gamma_linear, value);
|
||||
|
||||
if (config->high_input[config->channel] != value / 255.0)
|
||||
{
|
||||
|
|
|
@ -978,8 +978,8 @@ gimp_measure_tool_dialog_update (GimpMeasureTool *measure,
|
|||
gtk_label_set_text (GTK_LABEL (measure->unit_label[3]), NULL);
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (measure->dialog))
|
||||
gdk_window_show (measure->dialog->window);
|
||||
if (gtk_widget_get_visible (measure->dialog))
|
||||
gdk_window_show (gtk_widget_get_window (measure->dialog));
|
||||
else
|
||||
gtk_widget_show (measure->dialog);
|
||||
}
|
||||
|
|
|
@ -447,17 +447,22 @@ dynamics_check_button_size_allocate (GtkWidget *toggle,
|
|||
GtkAllocation *allocation,
|
||||
GtkWidget *label)
|
||||
{
|
||||
GtkWidget *fixed = label->parent;
|
||||
gint x, y;
|
||||
GtkWidget *fixed = gtk_widget_get_parent (label);
|
||||
GtkAllocation label_allocation;
|
||||
GtkAllocation fixed_allocation;
|
||||
gint x, y;
|
||||
|
||||
gtk_widget_get_allocation (label, &label_allocation);
|
||||
gtk_widget_get_allocation (fixed, &fixed_allocation);
|
||||
|
||||
if (gtk_widget_get_direction (label) == GTK_TEXT_DIR_LTR)
|
||||
x = allocation->x;
|
||||
else
|
||||
x = allocation->x + allocation->width - label->allocation.width;
|
||||
x = allocation->x + allocation->width - label_allocation.width;
|
||||
|
||||
x -= fixed->allocation.x;
|
||||
x -= fixed_allocation.x;
|
||||
|
||||
y = fixed->allocation.height - label->allocation.height;
|
||||
y = fixed_allocation.height - label_allocation.height;
|
||||
|
||||
gtk_fixed_move (GTK_FIXED (fixed), label, x, y);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue