summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/settings.hxx31
-rw-r--r--vcl/headless/CustomWidgetDraw.cxx17
-rw-r--r--vcl/inc/WidgetThemeLibrary.hxx12
-rw-r--r--vcl/inc/widgetdraw/WidgetDefinition.hxx12
-rw-r--r--vcl/osx/salframe.cxx34
-rw-r--r--vcl/qt5/Qt5Frame.cxx11
-rw-r--r--vcl/source/app/settings.cxx192
-rw-r--r--vcl/source/control/button.cxx86
-rw-r--r--vcl/source/gdi/FileDefinitionWidgetDraw.cxx17
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx7
-rw-r--r--vcl/win/window/salframe.cxx37
11 files changed, 373 insertions, 83 deletions
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 347c861bc5aa..6adda0d66fa2 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -245,6 +245,9 @@ public:
void SetDarkShadowColor( const Color& rColor );
const Color& GetDarkShadowColor() const;
+ void SetDefaultButtonTextColor( const Color& rColor );
+ const Color& GetDefaultButtonTextColor() const;
+
void SetButtonTextColor( const Color& rColor );
const Color& GetButtonTextColor() const;
@@ -254,15 +257,39 @@ public:
void SetActionButtonTextColor( const Color& rColor );
const Color& GetActionButtonTextColor() const;
- void SetActionButtonRolloverTextColor( const Color& rColor );
- const Color& GetActionButtonRolloverTextColor() const;
+ void SetFlatButtonTextColor( const Color& rColor );
+ const Color& GetFlatButtonTextColor() const;
+
+ void SetDefaultButtonRolloverTextColor( const Color& rColor );
+ const Color& GetDefaultButtonRolloverTextColor() const;
void SetButtonRolloverTextColor( const Color& rColor );
const Color& GetButtonRolloverTextColor() const;
+ void SetDefaultActionButtonRolloverTextColor( const Color& rColor );
+ const Color& GetDefaultActionButtonRolloverTextColor() const;
+
+ void SetActionButtonRolloverTextColor( const Color& rColor );
+ const Color& GetActionButtonRolloverTextColor() const;
+
+ void SetFlatButtonRolloverTextColor( const Color& rColor );
+ const Color& GetFlatButtonRolloverTextColor() const;
+
+ void SetDefaultButtonPressedRolloverTextColor( const Color& rColor );
+ const Color& GetDefaultButtonPressedRolloverTextColor() const;
+
void SetButtonPressedRolloverTextColor( const Color& rColor );
const Color& GetButtonPressedRolloverTextColor() const;
+ void SetDefaultActionButtonPressedRolloverTextColor( const Color& rColor );
+ const Color& GetDefaultActionButtonPressedRolloverTextColor() const;
+
+ void SetActionButtonPressedRolloverTextColor( const Color& rColor );
+ const Color& GetActionButtonPressedRolloverTextColor() const;
+
+ void SetFlatButtonPressedRolloverTextColor( const Color& rColor );
+ const Color& GetFlatButtonPressedRolloverTextColor() const;
+
void SetRadioCheckTextColor( const Color& rColor );
const Color& GetRadioCheckTextColor() const;
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
index 343f5cd75a4e..600875d5c4ca 100644
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ b/vcl/headless/CustomWidgetDraw.cxx
@@ -344,11 +344,26 @@ bool CustomWidgetDraw::updateSettings(AllSettings& rSettings)
aStyleSet.SetLightBorderColor(aStyle.maLightBorderColor);
aStyleSet.SetShadowColor(aStyle.maShadowColor);
aStyleSet.SetDarkShadowColor(aStyle.maDarkShadowColor);
+ aStyleSet.SetDefaultButtonTextColor(aStyle.maDefaultButtonTextColor);
aStyleSet.SetButtonTextColor(aStyle.maButtonTextColor);
- aStyleSet.SetActionButtonTextColor(aStyle.maActionButtonTextColor);
aStyleSet.SetDefaultActionButtonTextColor(aStyle.maDefaultActionButtonTextColor);
+ aStyleSet.SetActionButtonTextColor(aStyle.maActionButtonTextColor);
+ aStyleSet.SetFlatButtonTextColor(aStyle.maFlatButtonTextColor);
+ aStyleSet.SetDefaultButtonRolloverTextColor(aStyle.maDefaultButtonRolloverTextColor);
aStyleSet.SetButtonRolloverTextColor(aStyle.maButtonRolloverTextColor);
+ aStyleSet.SetDefaultActionButtonRolloverTextColor(
+ aStyle.maDefaultActionButtonRolloverTextColor);
aStyleSet.SetActionButtonRolloverTextColor(aStyle.maActionButtonRolloverTextColor);
+ aStyleSet.SetFlatButtonRolloverTextColor(aStyle.maFlatButtonRolloverTextColor);
+ aStyleSet.SetDefaultButtonPressedRolloverTextColor(
+ aStyle.maDefaultButtonPressedRolloverTextColor);
+ aStyleSet.SetButtonPressedRolloverTextColor(aStyle.maButtonPressedRolloverTextColor);
+ aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(
+ aStyle.maDefaultActionButtonPressedRolloverTextColor);
+ aStyleSet.SetActionButtonPressedRolloverTextColor(
+ aStyle.maActionButtonPressedRolloverTextColor);
+ aStyleSet.SetFlatButtonPressedRolloverTextColor(
+ aStyle.maFlatButtonPressedRolloverTextColor);
aStyleSet.SetRadioCheckTextColor(aStyle.maRadioCheckTextColor);
aStyleSet.SetGroupTextColor(aStyle.maGroupTextColor);
aStyleSet.SetLabelTextColor(aStyle.maLabelTextColor);
diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx
index 404d93159aee..ace74a49a965 100644
--- a/vcl/inc/WidgetThemeLibrary.hxx
+++ b/vcl/inc/WidgetThemeLibrary.hxx
@@ -24,11 +24,21 @@ struct WidgetDrawStyle
uint32_t maLightBorderColor;
uint32_t maShadowColor;
uint32_t maDarkShadowColor;
+ uint32_t maDefaultButtonTextColor;
uint32_t maButtonTextColor;
uint32_t maDefaultActionButtonTextColor;
uint32_t maActionButtonTextColor;
- uint32_t maActionButtonRolloverTextColor;
+ uint32_t maFlatButtonTextColor;
+ uint32_t maDefaultButtonRolloverTextColor;
uint32_t maButtonRolloverTextColor;
+ uint32_t maDefaultActionButtonRolloverTextColor;
+ uint32_t maActionButtonRolloverTextColor;
+ uint32_t maFlatButtonRolloverTextColor;
+ uint32_t maDefaultButtonPressedRolloverTextColor;
+ uint32_t maButtonPressedRolloverTextColor;
+ uint32_t maDefaultActionButtonPressedRolloverTextColor;
+ uint32_t maActionButtonPressedRolloverTextColor;
+ uint32_t maFlatButtonPressedRolloverTextColor;
uint32_t maRadioCheckTextColor;
uint32_t maGroupTextColor;
uint32_t maLabelTextColor;
diff --git a/vcl/inc/widgetdraw/WidgetDefinition.hxx b/vcl/inc/widgetdraw/WidgetDefinition.hxx
index 7e451bbe8834..cc3eb6606557 100644
--- a/vcl/inc/widgetdraw/WidgetDefinition.hxx
+++ b/vcl/inc/widgetdraw/WidgetDefinition.hxx
@@ -223,11 +223,21 @@ public:
Color maLightBorderColor;
Color maShadowColor;
Color maDarkShadowColor;
+ Color maDefaultButtonTextColor;
Color maButtonTextColor;
Color maDefaultActionButtonTextColor;
Color maActionButtonTextColor;
- Color maActionButtonRolloverTextColor;
+ Color maFlatButtonTextColor;
+ Color maDefaultButtonRolloverTextColor;
Color maButtonRolloverTextColor;
+ Color maDefaultActionButtonRolloverTextColor;
+ Color maActionButtonRolloverTextColor;
+ Color maFlatButtonRolloverTextColor;
+ Color maDefaultButtonPressedRolloverTextColor;
+ Color maButtonPressedRolloverTextColor;
+ Color maDefaultActionButtonPressedRolloverTextColor;
+ Color maActionButtonPressedRolloverTextColor;
+ Color maFlatButtonPressedRolloverTextColor;
Color maRadioCheckTextColor;
Color maGroupTextColor;
Color maLabelTextColor;
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
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 8f1594240f46..722dca9467db 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1033,12 +1033,21 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
style.SetActiveTabColor(aBase);
// Buttons
+ style.SetDefaultButtonTextColor(aButn);
style.SetButtonTextColor(aButn);
style.SetDefaultActionButtonTextColor(aButn);
style.SetActionButtonTextColor(aButn);
- style.SetActionButtonRolloverTextColor(aButn);
+ style.SetFlatButtonTextColor(aButn);
+ style.SetDefaultButtonRolloverTextColor(aButn);
style.SetButtonRolloverTextColor(aButn);
+ style.SetDefaultActionButtonRolloverTextColor(aButn);
+ style.SetActionButtonRolloverTextColor(aButn);
+ style.SetFlatButtonRolloverTextColor(aButn);
+ style.SetDefaultButtonPressedRolloverTextColor(aButn);
style.SetButtonPressedRolloverTextColor(aButn);
+ style.SetDefaultActionButtonPressedRolloverTextColor(aButn);
+ style.SetActionButtonPressedRolloverTextColor(aButn);
+ style.SetFlatButtonPressedRolloverTextColor(aButn);
// Tabs
style.SetTabTextColor(aButn);
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 4adc9328a161..f54f05814258 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -81,12 +81,21 @@ struct ImplStyleData
Color maActiveColor;
Color maActiveTextColor;
Color maAlternatingRowColor;
+ Color maDefaultButtonTextColor;
Color maButtonTextColor;
Color maDefaultActionButtonTextColor;
Color maActionButtonTextColor;
- Color maActionButtonRolloverTextColor;
+ Color maFlatButtonTextColor;
+ Color maDefaultButtonRolloverTextColor;
Color maButtonRolloverTextColor;
+ Color maDefaultActionButtonRolloverTextColor;
+ Color maActionButtonRolloverTextColor;
+ Color maFlatButtonRolloverTextColor;
+ Color maDefaultButtonPressedRolloverTextColor;
Color maButtonPressedRolloverTextColor;
+ Color maDefaultActionButtonPressedRolloverTextColor;
+ Color maActionButtonPressedRolloverTextColor;
+ Color maFlatButtonPressedRolloverTextColor;
Color maCheckedColor;
Color maDarkShadowColor;
Color maDeactiveBorderColor;
@@ -492,12 +501,21 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
maActiveColor( rData.maActiveColor ),
maActiveTextColor( rData.maActiveTextColor ),
maAlternatingRowColor( rData.maAlternatingRowColor ),
+ maDefaultButtonTextColor( rData.maDefaultButtonTextColor ),
maButtonTextColor( rData.maButtonTextColor ),
maDefaultActionButtonTextColor( rData.maDefaultActionButtonTextColor ),
maActionButtonTextColor( rData.maActionButtonTextColor ),
- maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
+ maFlatButtonTextColor( rData.maFlatButtonTextColor ),
+ maDefaultButtonRolloverTextColor( rData.maDefaultButtonRolloverTextColor ),
maButtonRolloverTextColor( rData.maButtonRolloverTextColor ),
+ maDefaultActionButtonRolloverTextColor( rData.maDefaultActionButtonRolloverTextColor ),
+ maActionButtonRolloverTextColor( rData.maActionButtonRolloverTextColor ),
+ maFlatButtonRolloverTextColor( rData.maFlatButtonRolloverTextColor ),
+ maDefaultButtonPressedRolloverTextColor( rData.maDefaultButtonPressedRolloverTextColor ),
maButtonPressedRolloverTextColor( rData.maButtonPressedRolloverTextColor ),
+ maDefaultActionButtonPressedRolloverTextColor( rData.maDefaultActionButtonPressedRolloverTextColor ),
+ maActionButtonPressedRolloverTextColor( rData.maActionButtonPressedRolloverTextColor ),
+ maFlatButtonPressedRolloverTextColor( rData.maFlatButtonPressedRolloverTextColor ),
maCheckedColor( rData.maCheckedColor ),
maDarkShadowColor( rData.maDarkShadowColor ),
maDeactiveBorderColor( rData.maDeactiveBorderColor ),
@@ -632,12 +650,23 @@ void ImplStyleData::SetStandardStyles()
maLightBorderColor = COL_LIGHTGRAY;
maShadowColor = COL_GRAY;
maDarkShadowColor = COL_BLACK;
- maButtonTextColor = COL_BLACK;
- maDefaultActionButtonTextColor = COL_BLACK;
- maActionButtonTextColor = COL_BLACK;
- maActionButtonRolloverTextColor = COL_BLACK;
- maButtonRolloverTextColor = COL_BLACK;
- maButtonPressedRolloverTextColor = COL_BLACK;
+
+ maDefaultButtonTextColor = COL_BLACK;
+ maButtonTextColor = COL_BLACK;
+ maDefaultActionButtonTextColor = COL_BLACK;
+ maActionButtonTextColor = COL_BLACK;
+ maFlatButtonTextColor = COL_BLACK;
+ maDefaultButtonRolloverTextColor = COL_BLACK;
+ maButtonRolloverTextColor = COL_BLACK;
+ maDefaultActionButtonRolloverTextColor = COL_BLACK;
+ maActionButtonRolloverTextColor = COL_BLACK;
+ maFlatButtonRolloverTextColor = COL_BLACK;
+ maDefaultButtonPressedRolloverTextColor = COL_BLACK;
+ maButtonPressedRolloverTextColor = COL_BLACK;
+ maDefaultActionButtonPressedRolloverTextColor = COL_BLACK;
+ maActionButtonPressedRolloverTextColor = COL_BLACK;
+ maFlatButtonPressedRolloverTextColor = COL_BLACK;
+
maRadioCheckTextColor = COL_BLACK;
maGroupTextColor = COL_BLACK;
maLabelTextColor = COL_BLACK;
@@ -683,18 +712,18 @@ void ImplStyleData::SetStandardStyles()
maFontColor = COL_BLACK;
maAlternatingRowColor = Color( 0xEE, 0xEE, 0xEE );
- mnTitleHeight = 18;
- mnFloatTitleHeight = 13;
- mbHighContrast = false;
- mbUseSystemUIFonts = true;
- mbUseFontAAFromSystem = true;
- mnUseFlatBorders = false;
- mnUseFlatMenus = false;
- mbPreferredUseImagesInMenus = true;
- mbSkipDisabledInMenus = false;
- mbHideDisabledMenuItems = false;
+ mnTitleHeight = 18;
+ mnFloatTitleHeight = 13;
+ mbHighContrast = false;
+ mbUseSystemUIFonts = true;
+ mbUseFontAAFromSystem = true;
+ mnUseFlatBorders = false;
+ mnUseFlatMenus = false;
+ mbPreferredUseImagesInMenus = true;
+ mbSkipDisabledInMenus = false;
+ mbHideDisabledMenuItems = false;
mbPreferredContextMenuShortcuts = true;
- mbPrimaryButtonWarpsSlider = false;
+ mbPrimaryButtonWarpsSlider = false;
}
StyleSettings::StyleSettings()
@@ -781,6 +810,19 @@ StyleSettings::GetDarkShadowColor() const
}
void
+StyleSettings::SetDefaultButtonTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maDefaultButtonTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetDefaultButtonTextColor() const
+{
+ return mxData->maDefaultButtonTextColor;
+}
+
+void
StyleSettings::SetButtonTextColor( const Color& rColor )
{
CopyData();
@@ -820,16 +862,29 @@ StyleSettings::GetActionButtonTextColor() const
}
void
-StyleSettings::SetActionButtonRolloverTextColor( const Color& rColor )
+StyleSettings::SetFlatButtonTextColor( const Color& rColor )
{
CopyData();
- mxData->maActionButtonRolloverTextColor = rColor;
+ mxData->maFlatButtonTextColor = rColor;
}
const Color&
-StyleSettings::GetActionButtonRolloverTextColor() const
+StyleSettings::GetFlatButtonTextColor() const
{
- return mxData->maActionButtonRolloverTextColor;
+ return mxData->maFlatButtonTextColor;
+}
+
+void
+StyleSettings::SetDefaultButtonRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maDefaultButtonRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetDefaultButtonRolloverTextColor() const
+{
+ return mxData->maDefaultButtonRolloverTextColor;
}
void
@@ -846,6 +901,58 @@ StyleSettings::GetButtonRolloverTextColor() const
}
void
+StyleSettings::SetDefaultActionButtonRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maDefaultActionButtonRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetDefaultActionButtonRolloverTextColor() const
+{
+ return mxData->maDefaultActionButtonRolloverTextColor;
+}
+
+void
+StyleSettings::SetActionButtonRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maActionButtonRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetActionButtonRolloverTextColor() const
+{
+ return mxData->maActionButtonRolloverTextColor;
+}
+
+void
+StyleSettings::SetFlatButtonRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maFlatButtonRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetFlatButtonRolloverTextColor() const
+{
+ return mxData->maFlatButtonRolloverTextColor;
+}
+
+void
+StyleSettings::SetDefaultButtonPressedRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maDefaultButtonPressedRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetDefaultButtonPressedRolloverTextColor() const
+{
+ return mxData->maDefaultButtonPressedRolloverTextColor;
+}
+
+void
StyleSettings::SetButtonPressedRolloverTextColor( const Color& rColor )
{
CopyData();
@@ -859,6 +966,45 @@ StyleSettings::GetButtonPressedRolloverTextColor() const
}
void
+StyleSettings::SetDefaultActionButtonPressedRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maDefaultActionButtonPressedRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetDefaultActionButtonPressedRolloverTextColor() const
+{
+ return mxData->maDefaultActionButtonPressedRolloverTextColor;
+}
+
+void
+StyleSettings::SetActionButtonPressedRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maActionButtonPressedRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetActionButtonPressedRolloverTextColor() const
+{
+ return mxData->maActionButtonPressedRolloverTextColor;
+}
+
+void
+StyleSettings::SetFlatButtonPressedRolloverTextColor( const Color& rColor )
+{
+ CopyData();
+ mxData->maFlatButtonPressedRolloverTextColor = rColor;
+}
+
+const Color&
+StyleSettings::GetFlatButtonPressedRolloverTextColor() const
+{
+ return mxData->maFlatButtonPressedRolloverTextColor;
+}
+
+void
StyleSettings::SetRadioCheckTextColor( const Color& rColor )
{
CopyData();
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index cee637ee8e03..e859625f6d63 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -733,51 +733,67 @@ DrawTextFlags PushButton::ImplGetTextStyle( DrawFlags nDrawFlags ) const
return nTextStyle;
}
-void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFlags,
- const tools::Rectangle& rRect, bool bMenuBtnSep,
+void PushButton::ImplDrawPushButtonContent(OutputDevice *pDev, DrawFlags nDrawFlags,
+ const tools::Rectangle &rRect, bool bMenuBtnSep,
DrawButtonFlags nButtonFlags)
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- tools::Rectangle aInRect = rRect;
- Color aColor;
- DrawTextFlags nTextStyle = ImplGetTextStyle( nDrawFlags );
- DrawSymbolFlags nStyle;
+ const StyleSettings &rStyleSettings = GetSettings().GetStyleSettings();
+ tools::Rectangle aInRect = rRect;
+ Color aColor;
+ DrawTextFlags nTextStyle = ImplGetTextStyle(nDrawFlags);
+ DrawSymbolFlags nStyle;
- if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
- return; // nothing to do
+ if (aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top())
+ return;
- pDev->Push( PushFlags::CLIPREGION );
- pDev->IntersectClipRegion( aInRect );
+ pDev->Push(PushFlags::CLIPREGION);
+ pDev->IntersectClipRegion(aInRect);
- if ( nDrawFlags & DrawFlags::Mono )
+ if (nDrawFlags & DrawFlags::Mono)
aColor = COL_BLACK;
- else if( (nButtonFlags & DrawButtonFlags::Highlight) && IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
- {
- if (nButtonFlags & DrawButtonFlags::Pressed)
- aColor = rStyleSettings.GetButtonPressedRolloverTextColor();
- else
- aColor = isAction() ? rStyleSettings.GetActionButtonRolloverTextColor()
- : rStyleSettings.GetButtonRolloverTextColor();
- }
- else if ( IsControlForeground() )
- aColor = GetControlForeground();
- else if( nButtonFlags & DrawButtonFlags::Highlight )
- {
+
+ // Button types with possibly different text coloring are flat buttons and regular buttons. Regular buttons may be action
+ // buttons and may have an additional default status. Moreover all buttons may have an additional pressed and rollover
+ // (highlight) status. Pressed buttons are always in rollover status.
+
+ else if (GetStyle() & WB_FLATBUTTON)
if (nButtonFlags & DrawButtonFlags::Pressed)
- aColor = rStyleSettings.GetButtonPressedRolloverTextColor();
+ aColor = rStyleSettings.GetFlatButtonPressedRolloverTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Highlight)
+ aColor = rStyleSettings.GetFlatButtonRolloverTextColor();
else
- aColor = isAction() ? rStyleSettings.GetActionButtonRolloverTextColor()
- : rStyleSettings.GetButtonRolloverTextColor();
- }
+ aColor = rStyleSettings.GetFlatButtonTextColor();
else
- {
- aColor = isAction() ? ((GetButtonState() & DrawButtonFlags::Default)
- ? rStyleSettings.GetDefaultActionButtonTextColor()
- : rStyleSettings.GetActionButtonTextColor())
- : rStyleSettings.GetButtonTextColor();
- }
+ if (isAction() && (nButtonFlags & DrawButtonFlags::Default))
+ if (nButtonFlags & DrawButtonFlags::Pressed)
+ aColor = rStyleSettings.GetDefaultActionButtonPressedRolloverTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Highlight)
+ aColor = rStyleSettings.GetDefaultActionButtonRolloverTextColor();
+ else
+ aColor = rStyleSettings.GetDefaultActionButtonTextColor();
+ else if (isAction())
+ if (nButtonFlags & DrawButtonFlags::Pressed)
+ aColor = rStyleSettings.GetActionButtonPressedRolloverTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Highlight)
+ aColor = rStyleSettings.GetActionButtonRolloverTextColor();
+ else
+ aColor = rStyleSettings.GetActionButtonTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Default)
+ if (nButtonFlags & DrawButtonFlags::Pressed)
+ aColor = rStyleSettings.GetDefaultButtonPressedRolloverTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Highlight)
+ aColor = rStyleSettings.GetDefaultButtonRolloverTextColor();
+ else
+ aColor = rStyleSettings.GetDefaultButtonTextColor();
+ else
+ if (nButtonFlags & DrawButtonFlags::Pressed)
+ aColor = rStyleSettings.GetButtonPressedRolloverTextColor();
+ else if (nButtonFlags & DrawButtonFlags::Highlight)
+ aColor = rStyleSettings.GetButtonRolloverTextColor();
+ else
+ aColor = rStyleSettings.GetButtonTextColor();
- pDev->SetTextColor( aColor );
+ pDev->SetTextColor(aColor);
if ( IsEnabled() )
nStyle = DrawSymbolFlags::NONE;
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 747c0543c20e..80bcda56b2a6 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -975,11 +975,26 @@ bool FileDefinitionWidgetDraw::updateSettings(AllSettings& rSettings)
aStyleSet.SetLightBorderColor(pDefinitionStyle->maLightBorderColor);
aStyleSet.SetShadowColor(pDefinitionStyle->maShadowColor);
aStyleSet.SetDarkShadowColor(pDefinitionStyle->maDarkShadowColor);
+ aStyleSet.SetDefaultButtonTextColor(pDefinitionStyle->maDefaultButtonTextColor);
aStyleSet.SetButtonTextColor(pDefinitionStyle->maButtonTextColor);
aStyleSet.SetDefaultActionButtonTextColor(pDefinitionStyle->maDefaultActionButtonTextColor);
aStyleSet.SetActionButtonTextColor(pDefinitionStyle->maActionButtonTextColor);
- aStyleSet.SetActionButtonRolloverTextColor(pDefinitionStyle->maActionButtonRolloverTextColor);
+ aStyleSet.SetFlatButtonTextColor(pDefinitionStyle->maFlatButtonTextColor);
+ aStyleSet.SetDefaultButtonRolloverTextColor(pDefinitionStyle->maDefaultButtonRolloverTextColor);
aStyleSet.SetButtonRolloverTextColor(pDefinitionStyle->maButtonRolloverTextColor);
+ aStyleSet.SetDefaultActionButtonRolloverTextColor(
+ pDefinitionStyle->maDefaultActionButtonRolloverTextColor);
+ aStyleSet.SetActionButtonRolloverTextColor(pDefinitionStyle->maActionButtonRolloverTextColor);
+ aStyleSet.SetFlatButtonRolloverTextColor(pDefinitionStyle->maFlatButtonRolloverTextColor);
+ aStyleSet.SetDefaultButtonPressedRolloverTextColor(
+ pDefinitionStyle->maDefaultButtonPressedRolloverTextColor);
+ aStyleSet.SetButtonPressedRolloverTextColor(pDefinitionStyle->maButtonPressedRolloverTextColor);
+ aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(
+ pDefinitionStyle->maDefaultActionButtonPressedRolloverTextColor);
+ aStyleSet.SetActionButtonPressedRolloverTextColor(
+ pDefinitionStyle->maActionButtonPressedRolloverTextColor);
+ aStyleSet.SetFlatButtonPressedRolloverTextColor(
+ pDefinitionStyle->maFlatButtonPressedRolloverTextColor);
aStyleSet.SetRadioCheckTextColor(pDefinitionStyle->maRadioCheckTextColor);
aStyleSet.SetGroupTextColor(pDefinitionStyle->maGroupTextColor);
aStyleSet.SetLabelTextColor(pDefinitionStyle->maLabelTextColor);
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 95750805ac4f..1a1a334d1439 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -3030,10 +3030,13 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
// mouse over text colors
style_context_set_state(pStyle, GTK_STATE_FLAG_PRELIGHT);
gtk_style_context_get_color(pStyle, gtk_style_context_get_state(pStyle), &text_color);
- aTextColor = getColor( text_color );
+ aTextColor = getColor(text_color);
+ aStyleSet.SetDefaultButtonRolloverTextColor(aTextColor);
aStyleSet.SetButtonRolloverTextColor(aTextColor);
+ aStyleSet.SetDefaultActionButtonRolloverTextColor(aTextColor);
aStyleSet.SetActionButtonRolloverTextColor(aTextColor);
- aStyleSet.SetFieldRolloverTextColor( aTextColor );
+ aStyleSet.SetFlatButtonRolloverTextColor(aTextColor);
+ aStyleSet.SetFieldRolloverTextColor(aTextColor);
aContextState.restore();
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 2a125deeddab..a9a30b71086d 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2597,18 +2597,31 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK ) ) );
aStyleSettings.SetHelpTextColor( ImplWinColorToSal( GetSysColor( COLOR_INFOTEXT ) ) );
- aStyleSettings.SetDialogColor( aStyleSettings.GetFaceColor() );
-
- aStyleSettings.SetDialogTextColor( aStyleSettings.GetButtonTextColor() );
- aStyleSettings.SetButtonTextColor( ImplWinColorToSal( GetSysColor( COLOR_BTNTEXT ) ) );
- aStyleSettings.SetDefaultActionButtonTextColor( ImplWinColorToSal( GetSysColor( COLOR_BTNTEXT ) ) );
- aStyleSettings.SetActionButtonTextColor( aStyleSettings.GetDefaultActionButtonTextColor() );
- aStyleSettings.SetActionButtonRolloverTextColor( aStyleSettings.GetActionButtonTextColor() );
- aStyleSettings.SetButtonRolloverTextColor( aStyleSettings.GetButtonTextColor() );
- aStyleSettings.SetButtonPressedRolloverTextColor( aStyleSettings.GetButtonTextColor() );
- aStyleSettings.SetTabTextColor( aStyleSettings.GetButtonTextColor() );
- aStyleSettings.SetTabRolloverTextColor( aStyleSettings.GetButtonTextColor() );
- aStyleSettings.SetTabHighlightTextColor( aStyleSettings.GetButtonTextColor() );
+ Color aControlTextColor(ImplWinColorToSal(GetSysColor(COLOR_BTNTEXT)));
+
+ aStyleSettings.SetDialogColor(aStyleSettings.GetFaceColor());
+ aStyleSettings.SetDialogTextColor(aControlTextColor);
+
+ aStyleSettings.SetDefaultButtonTextColor(aControlTextColor);
+ aStyleSettings.SetButtonTextColor(aControlTextColor);
+ aStyleSettings.SetDefaultActionButtonTextColor(aControlTextColor);
+ aStyleSettings.SetActionButtonTextColor(aControlTextColor);
+ aStyleSettings.SetFlatButtonTextColor(aControlTextColor);
+ aStyleSettings.SetDefaultButtonRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetButtonRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetDefaultActionButtonRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetActionButtonRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetFlatButtonRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetDefaultButtonPressedRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetButtonPressedRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetDefaultActionButtonPressedRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetActionButtonPressedRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetFlatButtonPressedRolloverTextColor(aControlTextColor);
+
+ aStyleSettings.SetTabTextColor(aControlTextColor);
+ aStyleSettings.SetTabRolloverTextColor(aControlTextColor);
+ aStyleSettings.SetTabHighlightTextColor(aControlTextColor);
+
aStyleSettings.SetRadioCheckTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) );
aStyleSettings.SetGroupTextColor( aStyleSettings.GetRadioCheckTextColor() );
aStyleSettings.SetLabelTextColor( aStyleSettings.GetRadioCheckTextColor() );