[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Katarina Behrens
Katarina.Behrens at cib.de
Thu Apr 26 08:36:33 UTC 2018
include/sfx2/sidebar/DeckTitleBar.hxx | 1 +
sfx2/source/sidebar/DeckTitleBar.cxx | 15 +++++++++++++++
2 files changed, 16 insertions(+)
New commits:
commit 16180641a5e0b7a990ec10bbf92e3639b5ee2ee2
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Tue Mar 20 12:05:25 2018 +0100
Change mouse cursor to Move when over sidebar deck grip
Change-Id: Ic6a271245a6c2da307238d799dbd606e435f7aa1
Reviewed-on: https://gerrit.libreoffice.org/53379
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/include/sfx2/sidebar/DeckTitleBar.hxx b/include/sfx2/sidebar/DeckTitleBar.hxx
index 59f15bf1ef93..73daefb4d8e4 100644
--- a/include/sfx2/sidebar/DeckTitleBar.hxx
+++ b/include/sfx2/sidebar/DeckTitleBar.hxx
@@ -34,6 +34,7 @@ public:
tools::Rectangle GetDragArea() const;
virtual void DataChanged(const DataChangedEvent& rEvent) override;
+ virtual void MouseMove(const MouseEvent& rMouseEvent) override;
protected:
virtual tools::Rectangle GetTitleArea(const tools::Rectangle& rTitleBarBox) override;
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 891efe8b031c..40450ddeaa7b 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -125,6 +125,21 @@ void DeckTitleBar::DataChanged (const DataChangedEvent& rEvent)
TitleBar::DataChanged(rEvent);
}
+
+void DeckTitleBar::MouseMove (const MouseEvent& rMouseEvent)
+{
+ tools::Rectangle aGrip = GetDragArea();
+ PointerStyle eStyle = PointerStyle::Arrow;
+
+ if ( aGrip.IsInside( rMouseEvent.GetPosPixel() ) )
+ eStyle = PointerStyle::Move;
+
+ Pointer aPtr( eStyle );
+ SetPointer( aPtr );
+
+ Window::MouseMove( rMouseEvent );
+}
+
} } // end of namespace sfx2::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list