svtools/source/control/tabbar.cxx | 17 +++++++++++++++++ vcl/source/app/settings.cxx | 23 +++++++++++++++++------ 2 files changed, 34 insertions(+), 6 deletions(-)
New commits: commit db6fbb0317fcb0a7babca9f71adbbb7c126b9e4e Author: Caolán McNamara <[email protected]> AuthorDate: Tue Feb 14 08:56:13 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Feb 14 11:34:12 2023 +0000 base section Titles are invisible in dark mode Change-Id: I46848169f9376588e91d9684e47f388074c41493 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146997 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 9762c2164f92..71d58a4aa5a8 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2257,12 +2257,23 @@ void StyleSettings::Set3DColors( const Color& rColor ) mxData->maDarkShadowColor = COL_BLACK; if ( rColor != COL_LIGHTGRAY ) { - mxData->maLightColor = rColor; - mxData->maShadowColor = rColor; - mxData->maDarkShadowColor=rColor; - mxData->maLightColor.IncreaseLuminance( 64 ); - mxData->maShadowColor.DecreaseLuminance( 64 ); - mxData->maDarkShadowColor.DecreaseLuminance( 100 ); + mxData->maLightColor = rColor; + mxData->maShadowColor = rColor; + mxData->maDarkShadowColor = rColor; + + if (!rColor.IsDark()) + { + mxData->maLightColor.IncreaseLuminance(64); + mxData->maShadowColor.DecreaseLuminance(64); + mxData->maDarkShadowColor.DecreaseLuminance(100); + } + else + { + mxData->maLightColor.DecreaseLuminance(64); + mxData->maShadowColor.IncreaseLuminance(64); + mxData->maDarkShadowColor.IncreaseLuminance(100); + } + sal_uLong nRed = mxData->maLightColor.GetRed(); sal_uLong nGreen = mxData->maLightColor.GetGreen(); sal_uLong nBlue = mxData->maLightColor.GetBlue(); commit 1b180c444d0c7d8b2df66c88f0bdadfec4896b00 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Feb 13 20:17:51 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Feb 14 11:33:57 2023 +0000 Resolves: tdf#149482 don't insert if the mouse is not still pressed In repeat callback, if we didn't see a mouse up, but find that the mouse is no longer pressed at this point, then bail Change-Id: I6e5d1d7201065fadcc2242fd52323ffb56766383 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146947 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index b09c748feb5e..a0995eef4910 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -884,6 +884,15 @@ void TabBar::ImplShowPage( sal_uInt16 nPos ) IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void ) { + if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)) == 0) + { + // like tdf#149482 if we didn't see a mouse up, but find that the mouse is no + // longer pressed at this point, then bail + mpImpl->mxButtonBox->m_xPrevRepeater->Stop(); + mpImpl->mxButtonBox->m_xNextRepeater->Stop(); + return; + } + EndEditMode(); sal_uInt16 nNewPos = mnFirstPos; @@ -922,6 +931,14 @@ IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void ) IMPL_LINK_NOARG(TabBar, ImplAddClickHandler, weld::Button&, void) { + if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)) == 0) + { + // tdf#149482 if we didn't see a mouse up, but find that the mouse is no + // longer pressed at this point, then bail + mpImpl->mxButtonBox->m_xAddRepeater->Stop(); + return; + } + EndEditMode(); AddTabClick(); }
