From: vsr Date: Sat, 24 Sep 2011 17:32:30 +0000 (+0000) Subject: Issue 0021285: EDF 1877 SMESH: Color of groups is only visible on one side X-Git-Tag: V6_4_0a1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66306c4e89d32d25cf748bb3b38363057f72c4d1;p=modules%2Fgui.git Issue 0021285: EDF 1877 SMESH: Color of groups is only visible on one side --- diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index 3c9f8caa5..a877c5c2a 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -1196,7 +1196,12 @@ QColor Qtx::mainColorToSecondary( const QColor& color, int delta ) if ( cs.isValid() ) { int val = qMin( 255, qMax( cs.value() + delta, 0 ) ); int sat = qMin( 255, qMax( cs.saturation() + delta-(val-cs.value()), 0 ) ); - cs.setHsv( cs.hue(), sat, val ); +#ifdef BICOLOR_CHANGE_HUE + int hue = qMin( 359, qMax( cs.hue() + delta-(val-cs.value())-(sat-cs.saturation()), 0 ) ); +#else + int hue = cs.hue(); +#endif + cs.setHsv( hue, sat, val ); } return cs; }