Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#36 colors not painted correctly on colormap widget

closed
nicolas
None
5
2007-05-25
2007-05-07
nicolas
No

The start of the colormap on the colormap widget is too long (ie an equal proportion blue/white/red colormap appears to have a longer blue section).

on line 110 of gui/appli/display_pref_panel.cpp, replace:

for( int l = 0 ; l < remaining_width; l++ )
colorbox_width[l] = base_width + 1;

for( int j = remaining_width ; j < nb_colors_to_paint; j++ )
colorbox_width[j] = base_width;

by:

while(remaining_width != 0) {
int skip = nb_colors_to_paint / remaining_width;
for( int l = 0 ; l < nb_colors_to_paint; l += skip ) {
colorbox_width[l]++;
remaining_width--;
}

}

Discussion

  • nicolas
    nicolas
    2007-05-25

    • status: open --> closed