Link updating of hex value and opacity slider.

This commit is contained in:
Jeff Young 2021-08-31 21:03:11 +01:00
parent 3e32c2e5a7
commit a5e11111a4
2 changed files with 5 additions and 1 deletions

View File

@ -511,7 +511,9 @@ void DIALOG_COLOR_PICKER::SetEditVals( CHANGED_COLOR aChanged, bool aCheckTransp
if( aChanged != VAL_CHANGED )
m_sliderBrightness->SetValue(normalizeToInt( m_val ) );
if( aChanged != HEX_CHANGED )
if( aChanged == HEX_CHANGED )
m_sliderTransparency->SetValue( normalizeToInt( m_newColor4D.a, ALPHA_MAX ) );
else
m_colorValue->ChangeValue( m_newColor4D.ToHexString() );
}
@ -731,6 +733,7 @@ void DIALOG_COLOR_PICKER::OnChangeAlpha( wxScrollEvent& event )
updatePreview( m_NewColorRect, m_newColor4D );
m_NewColorRect->Thaw();
m_NewColorRect->Refresh();
SetEditVals( ALPHA_CHANGED, false );
}

View File

@ -71,6 +71,7 @@ enum CHANGED_COLOR
RED_CHANGED,
BLUE_CHANGED,
GREEN_CHANGED,
ALPHA_CHANGED,
HUE_CHANGED,
SAT_CHANGED,
VAL_CHANGED,