summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-11-13 15:33:27 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-11-14 12:24:35 +0100
commit571a78434b0ea234d1aa82019b964a66fbcf4b2f (patch)
tree76a6fb64fe1a7fc44fccf4b3367b7bb5d29cff28 /toolkit
parent29733bb39a16fc0e1398a7c18781226cfe755ff3 (diff)
revert action button changes to UNO XStyleSetting
As there is no need for this UNO changes instead set the values with other appropriate button settings so the previous behaviour is retained. Change-Id: I5952a9ce9f2f72faeb12a7a945c53ed048719b27 Reviewed-on: https://gerrit.libreoffice.org/82620 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/82635 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/stylesettings.cxx50
-rw-r--r--toolkit/source/awt/stylesettings.hxx6
2 files changed, 11 insertions, 45 deletions
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
index 3f6701766270..2e4372acc715 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -234,19 +234,11 @@ namespace toolkit
{
StyleMethodGuard aGuard( *m_pData );
lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonRolloverTextColor, _buttonrollovertextcolor );
- }
-
-
- ::sal_Int32 SAL_CALL WindowStyleSettings::getActionButtonRolloverTextColor()
- {
- StyleMethodGuard aGuard( *m_pData );
- return lcl_getStyleColor( *m_pData, &StyleSettings::GetActionButtonRolloverTextColor );
- }
-
-
- void SAL_CALL WindowStyleSettings::setActionButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor )
- {
- StyleMethodGuard aGuard( *m_pData );
+ // Also need to set ActionButtonRolloverTextColor as this setting can't be
+ // set through the UNO interface otherwise.
+ // Previously this setting was used to set colors for both scenarios,
+ // but action button setting was added to differentiate the buttons from
+ // "normal" buttons in some themes.
lcl_setStyleColor( *m_pData, &StyleSettings::SetActionButtonRolloverTextColor, _buttonrollovertextcolor );
}
@@ -262,33 +254,13 @@ namespace toolkit
{
StyleMethodGuard aGuard( *m_pData );
lcl_setStyleColor( *m_pData, &StyleSettings::SetButtonTextColor, _buttontextcolor );
- }
-
- ::sal_Int32 SAL_CALL WindowStyleSettings::getDefaultActionButtonTextColor()
- {
- StyleMethodGuard aGuard( *m_pData );
- return lcl_getStyleColor( *m_pData, &StyleSettings::GetDefaultActionButtonTextColor );
- }
-
-
- void SAL_CALL WindowStyleSettings::setDefaultActionButtonTextColor( ::sal_Int32 _buttontextcolor )
- {
- StyleMethodGuard aGuard( *m_pData );
- lcl_setStyleColor( *m_pData, &StyleSettings::SetDefaultActionButtonTextColor, _buttontextcolor );
- }
-
-
- ::sal_Int32 SAL_CALL WindowStyleSettings::getActionButtonTextColor()
- {
- StyleMethodGuard aGuard( *m_pData );
- return lcl_getStyleColor( *m_pData, &StyleSettings::GetActionButtonTextColor );
- }
-
-
- void SAL_CALL WindowStyleSettings::setActionButtonTextColor( ::sal_Int32 _buttontextcolor )
- {
- StyleMethodGuard aGuard( *m_pData );
+ // Also need to set ActionButtonTextColor and DefaultActionButtonTextColor
+ // as this two settings can't be set through the UNO interface otherwise.
+ // Previously this setting was used to set colors for all three scenarios,
+ // but action button setting was added to differentiate the buttons from
+ // "normal" buttons in some themes.
lcl_setStyleColor( *m_pData, &StyleSettings::SetActionButtonTextColor, _buttontextcolor );
+ lcl_setStyleColor( *m_pData, &StyleSettings::SetDefaultActionButtonTextColor, _buttontextcolor );
}
diff --git a/toolkit/source/awt/stylesettings.hxx b/toolkit/source/awt/stylesettings.hxx
index 9799119b2a83..0bc28cd1dad4 100644
--- a/toolkit/source/awt/stylesettings.hxx
+++ b/toolkit/source/awt/stylesettings.hxx
@@ -62,14 +62,8 @@ namespace toolkit
virtual void SAL_CALL setActiveTextColor( ::sal_Int32 _activetextcolor ) override;
virtual ::sal_Int32 SAL_CALL getButtonRolloverTextColor() override;
virtual void SAL_CALL setButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) override;
- virtual ::sal_Int32 SAL_CALL getActionButtonRolloverTextColor() override;
- virtual void SAL_CALL setActionButtonRolloverTextColor( ::sal_Int32 _buttonrollovertextcolor ) override;
virtual ::sal_Int32 SAL_CALL getButtonTextColor() override;
virtual void SAL_CALL setButtonTextColor( ::sal_Int32 _buttontextcolor ) override;
- virtual ::sal_Int32 SAL_CALL getDefaultActionButtonTextColor() override;
- virtual void SAL_CALL setDefaultActionButtonTextColor( ::sal_Int32 _buttontextcolor ) override;
- virtual ::sal_Int32 SAL_CALL getActionButtonTextColor() override;
- virtual void SAL_CALL setActionButtonTextColor( ::sal_Int32 _buttontextcolor ) override;
virtual ::sal_Int32 SAL_CALL getCheckedColor() override;
virtual void SAL_CALL setCheckedColor( ::sal_Int32 _checkedcolor ) override;
virtual ::sal_Int32 SAL_CALL getDarkShadowColor() override;