diff options
author | Thorsten Wagner <thorsten.wagner.4@gmail.com> | 2020-02-23 21:11:05 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-03-06 20:36:23 +0100 |
commit | 8d11b953c0a69f4f5eb5ca42dec3812a62d0cd0f (patch) | |
tree | 4061d4c9cd64871154a1fc843eae5cfbb6d22788 /vcl/osx | |
parent | 4ba09be7e260ce2a79a23465db7b2837422cde30 (diff) |
tdf#125532: White text on default/action buttons and selected tabs on macOS
Change-Id: I58ce75e711504553c8fc606382866754286f1aa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89313
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/osx')
-rw-r--r-- | vcl/osx/salframe.cxx | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index dc012aa1d07b..9539fb26401d 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1090,13 +1090,13 @@ OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode ) if( it != aKeyMap.end() ) { if( (nKeyCode & KEY_SHIFT) != 0 ) - aResult.append( u'\x21e7' ); //⇧ + aResult.append( u'\x21e7' ); // shift if( (nKeyCode & KEY_MOD1) != 0 ) - aResult.append( u'\x2318' ); //⌘ + aResult.append( u'\x2318' ); // command if( (nKeyCode & KEY_MOD2) != 0 ) - aResult.append( u'\x2325' ); //⌥ + aResult.append( u'\x2325' ); // alternate if( (nKeyCode & KEY_MOD3) != 0 ) - aResult.append( u'\x2303' ); //⌃ + aResult.append( u'\x2303' ); // control aResult.append( it->second ); } @@ -1280,6 +1280,32 @@ SAL_WNODEPRECATED_DECLARATIONS_POP aStyleSettings.SetMenuBarRolloverTextColor( aMenuTextColor ); aStyleSettings.SetMenuBarHighlightTextColor(aStyleSettings.GetMenuHighlightTextColor()); + // Set text colors for buttons and their different status according to OS settings, typically white for selected buttons, + // black otherwise + + Color aControlTextColor(getColor([NSColor controlTextColor], COL_BLACK, mpNSWindow)); + Color aSelectedControlTextColor(getColor([NSColor alternateSelectedControlTextColor], COL_WHITE, mpNSWindow)); + aStyleSettings.SetDefaultButtonTextColor(aSelectedControlTextColor); + aStyleSettings.SetButtonTextColor(aControlTextColor); + aStyleSettings.SetDefaultActionButtonTextColor(aSelectedControlTextColor); + aStyleSettings.SetActionButtonTextColor(aControlTextColor); + aStyleSettings.SetFlatButtonTextColor(aControlTextColor); + aStyleSettings.SetDefaultButtonRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetButtonRolloverTextColor(aControlTextColor); + aStyleSettings.SetDefaultActionButtonRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetActionButtonRolloverTextColor(aControlTextColor); + aStyleSettings.SetFlatButtonRolloverTextColor(aControlTextColor); + aStyleSettings.SetDefaultButtonPressedRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetButtonPressedRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetDefaultActionButtonPressedRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetActionButtonPressedRolloverTextColor(aSelectedControlTextColor); + aStyleSettings.SetFlatButtonPressedRolloverTextColor(aControlTextColor); + + // Set text colors for tabs according to OS settings, typically white for selected buttons, black otherwise + + aStyleSettings.SetTabTextColor(aControlTextColor); + aStyleSettings.SetTabHighlightTextColor(aSelectedControlTextColor); + aStyleSettings.SetCursorBlinkTime( 500 ); // no mnemonics on macOS |