offapi/com/sun/star/awt/XStyleSettings.idl | 9 ----- toolkit/source/awt/stylesettings.cxx | 50 ++++++----------------------- toolkit/source/awt/stylesettings.hxx | 6 --- 3 files changed, 11 insertions(+), 54 deletions(-)
New commits: commit 65767523ba5ad8e974a3144b33ad0e9d627a53f7 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Nov 13 15:33:27 2019 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Nov 13 23:04:32 2019 +0100 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 <qui...@gmail.com> (cherry picked from commit c1fb36e477b1d0063ceb3eb74fa556b4187562cc) Reviewed-on: https://gerrit.libreoffice.org/82634 Tested-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/offapi/com/sun/star/awt/XStyleSettings.idl b/offapi/com/sun/star/awt/XStyleSettings.idl index 6150033787c9..47a55d6e4e62 100644 --- a/offapi/com/sun/star/awt/XStyleSettings.idl +++ b/offapi/com/sun/star/awt/XStyleSettings.idl @@ -61,18 +61,9 @@ interface XStyleSettings /// specifies the color to use for text on buttons which are hovered with the mouse [attribute] ::com::sun::star::util::Color ButtonRolloverTextColor; - /// specifies the color to use for text on action buttons which are hovered with the mouse - [attribute] ::com::sun::star::util::Color ActionButtonRolloverTextColor; - /// specifies the color to use for text on buttons [attribute] ::com::sun::star::util::Color ButtonTextColor; - /// specifies the color to use for text on a default action buttons - [attribute] ::com::sun::star::util::Color DefaultActionButtonTextColor; - - /// specifies the color to use for text on action buttons - [attribute] ::com::sun::star::util::Color ActionButtonTextColor; - [attribute] ::com::sun::star::util::Color CheckedColor; diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx index eb76209040b8..55abed46bf87 100644 --- a/toolkit/source/awt/stylesettings.cxx +++ b/toolkit/source/awt/stylesettings.cxx @@ -236,19 +236,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 ); } @@ -264,33 +256,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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits