diff options
Diffstat (limited to 'vcl/source/control/button.cxx')
-rw-r--r-- | vcl/source/control/button.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index ce37b5b358f6..4c6f535669e3 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -777,7 +777,8 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl if (nButtonFlags & DrawButtonFlags::Pressed) aColor = rStyleSettings.GetButtonPressedRolloverTextColor(); else - aColor = rStyleSettings.GetButtonRolloverTextColor(); + aColor = isAction() ? rStyleSettings.GetActionButtonRolloverTextColor() + : rStyleSettings.GetButtonRolloverTextColor(); } else if ( IsControlForeground() ) aColor = GetControlForeground(); @@ -786,10 +787,16 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl if (nButtonFlags & DrawButtonFlags::Pressed) aColor = rStyleSettings.GetButtonPressedRolloverTextColor(); else - aColor = rStyleSettings.GetButtonRolloverTextColor(); + aColor = isAction() ? rStyleSettings.GetActionButtonRolloverTextColor() + : rStyleSettings.GetButtonRolloverTextColor(); } else - aColor = rStyleSettings.GetButtonTextColor(); + { + aColor = isAction() ? ((ImplGetButtonState() & DrawButtonFlags::Default) + ? rStyleSettings.GetDefaultActionButtonTextColor() + : rStyleSettings.GetActionButtonTextColor()) + : rStyleSettings.GetButtonTextColor(); + } pDev->SetTextColor( aColor ); |