mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-08 16:37:44 +02:00
Allow small color differences
Makes the theme respond better to system colors Signed-off-by: akleja <storspov@gmail.com>
This commit is contained in:
parent
c3c5765a92
commit
cc7c659d6e
@ -353,18 +353,12 @@ void ThemeBase::RecolourTheme()
|
|||||||
#else
|
#else
|
||||||
wxColour To = wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE );
|
wxColour To = wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE );
|
||||||
#endif
|
#endif
|
||||||
// only recolour if recolouring is slight.
|
|
||||||
int d = ColourDistance( From, To );
|
|
||||||
|
|
||||||
// Don't recolour if difference is too big.
|
// Don't recolour if difference is too big.
|
||||||
|
int d = ColourDistance( From, To );
|
||||||
if( d > 120 )
|
if( d > 120 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// A minor tint difference from standard does not need
|
|
||||||
// to be recouloured either. Includes case of d==0 which is nothing
|
|
||||||
// needs to be done.
|
|
||||||
if( d < 40 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Colour( clrMedium ) = To;
|
Colour( clrMedium ) = To;
|
||||||
RecolourBitmap( bmpUpButtonLarge, From, To );
|
RecolourBitmap( bmpUpButtonLarge, From, To );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user