[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sc/source
Heiko Tietze (via logerrit)
logerrit at kemper.freedesktop.org
Thu Feb 27 12:51:01 UTC 2020
sc/source/ui/inc/tabview.hxx | 3 +--
sc/source/ui/view/tabview.cxx | 35 ++++-------------------------------
2 files changed, 5 insertions(+), 33 deletions(-)
New commits:
commit bc4f1869e6b8c9e500483e4210cfc004bbd8d8a2
Author: Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Mon Feb 24 17:15:11 2020 +0100
Commit: Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Thu Feb 27 13:50:30 2020 +0100
Resolves tdf#127508 - Flat table header in Calc
Amends 67fd62b3edc86c2891f279b25cf9919c4bbbbca1 with
flat corner button
Change-Id: Ia26aff0844069dd435cf4edd7524c19f5f0f22ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89365
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit d8c7864407249fd1ed69713dfdf4fa533a9efb0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89575
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 80888efebccb..b4af1dd213b1 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -71,14 +71,13 @@ class ScCornerButton : public vcl::Window
{
private:
ScViewData* const pViewData;
- bool const bAdd;
protected:
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Resize() override;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
public:
- ScCornerButton( vcl::Window* pParent, ScViewData* pData, bool bAdditional );
+ ScCornerButton( vcl::Window* pParent, ScViewData* pData );
virtual ~ScCornerButton() override;
virtual void StateChanged( StateChangedType nType ) override;
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 53e03e61de07..f45a575ec461 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -68,10 +68,9 @@ using namespace ::com::sun::star;
// Corner-Button
-ScCornerButton::ScCornerButton( vcl::Window* pParent, ScViewData* pData, bool bAdditional ) :
+ScCornerButton::ScCornerButton( vcl::Window* pParent, ScViewData* pData ) :
Window( pParent, WinBits( 0 ) ),
- pViewData( pData ),
- bAdd( bAdditional )
+ pViewData( pData )
{
EnableRTL( false );
}
@@ -94,32 +93,6 @@ void ScCornerButton::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
long nDarkX = bLayoutRTL ? 0 : nPosX;
- if (!bAdd)
- {
- // match the shaded look of column/row headers
-
- Color aFace(rStyleSettings.GetFaceColor());
- Color aWhite(COL_WHITE);
- Color aCenter(aFace);
- aCenter.Merge(aWhite, 0xd0); // lighten up a bit
- Color aOuter(aFace );
- aOuter.Merge(aWhite, 0xa0); // lighten up more
-
- long nCenterX = (aSize.Width() / 2) - 1;
- long nCenterY = (aSize.Height() / 2) - 1;
-
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(aCenter);
- rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nCenterX, nPosY));
- rRenderContext.DrawRect(tools::Rectangle(nCenterX, nCenterY, nDarkX, nCenterY));
- rRenderContext.SetFillColor(aOuter);
- rRenderContext.DrawRect(tools::Rectangle(0, 0, nPosX, nCenterY - 1));
- if (bLayoutRTL)
- rRenderContext.DrawRect(tools::Rectangle(nCenterX + 1, nCenterY, nPosX, nPosY));
- else
- rRenderContext.DrawRect(tools::Rectangle(0, nCenterY, nCenterX - 1, nPosY));
- }
-
// both buttons have the same look now - only dark right/bottom lines
rRenderContext.SetLineColor(rStyleSettings.GetDarkShadowColor());
rRenderContext.DrawLine(Point(0, nPosY), Point(nPosX, nPosY));
@@ -201,8 +174,8 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
aVScrollBottom( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ) ),
aHScrollLeft( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ) ),
aHScrollRight( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ) ),
- aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, false ) ),
- aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, true ) ),
+ aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData ) ),
+ aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData ) ),
aScrollBarBox( VclPtr<ScrollBarBox>::Create( pFrameWin, WB_SIZEABLE ) ),
mxInputHintOO(),
pTimerWindow( nullptr ),
More information about the Libreoffice-commits
mailing list