Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 296242
Collapse All | Expand All

(-)a/modules/color-selector-cmyk.c (-5 / +9 lines)
Lines 219-242 colorsel_cmyk_adj_update (GtkAdjustment *adj, Link Here
219
{
219
{
220
  GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
220
  GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
221
  gint               i;
221
  gint               i;
222
  gdouble value;
222
223
223
  for (i = 0; i < 4; i++)
224
  for (i = 0; i < 4; i++)
224
    if (module->adj[i] == adj)
225
    if (module->adj[i] == adj)
225
      break;
226
      break;
227
  value = gtk_adjustment_get_value (adj) / 100.0;
226
228
227
  switch (i)
229
  switch (i)
228
    {
230
    {
229
    case 0:
231
    case 0:
230
      module->cmyk.c = adj->value / 100.0;
232
      module->cmyk.c = value;
231
      break;
233
      break;
232
    case 1:
234
    case 1:
233
      module->cmyk.m = adj->value / 100.0;
235
      module->cmyk.m = value;
234
      break;
236
      break;
235
    case 2:
237
    case 2:
236
      module->cmyk.y = adj->value / 100.0;
238
      module->cmyk.y = value;
237
      break;
239
      break;
238
    case 3:
240
    case 3:
239
      module->cmyk.k = adj->value / 100.0;
241
      module->cmyk.k = value;
240
      break;
242
      break;
241
    default:
243
    default:
242
      return;
244
      return;
Lines 253-260 colorsel_cmyk_pullout_update (GtkAdjustment *adj, Link Here
253
                              ColorselCmyk  *module)
255
                              ColorselCmyk  *module)
254
{
256
{
255
  GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
257
  GimpColorSelector *selector = GIMP_COLOR_SELECTOR (module);
258
  gdouble value;
259
  value = gtk_adjustment_get_value (adj) / 100.0;
256
260
257
  module->pullout = adj->value / 100.0;
261
  module->pullout = value;
258
262
259
  gimp_color_selector_set_color (selector, &selector->rgb, &selector->hsv);
263
  gimp_color_selector_set_color (selector, &selector->rgb, &selector->hsv);
260
}
264
}

Return to bug 296242