sw/source/uibase/docvw/SidebarTxtControl.cxx |    7 +++++++
 sw/source/uibase/docvw/SidebarTxtControl.hxx |    1 +
 sw/uiconfig/swriter/ui/annotation.ui         |    2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 6990fd3e4199c71fd1490b895ff30ef18d387e52
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu May 4 12:38:36 2023 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu May 4 17:09:06 2023 +0200

    Resolves: tdf#155076 set annotation cursor to Text on mouse enter
    
    Change-Id: Ib3b1f90dd055ddd3b343f83d3118f090ea449b71
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151362
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 62f65e2eba3b..d25fa9cc372b 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -400,6 +400,13 @@ bool SidebarTextControl::MouseButtonUp(const MouseEvent& 
rMEvt)
     return bRet;
 }
 
+bool SidebarTextControl::MouseMove(const MouseEvent& rMEvt)
+{
+    if (rMEvt.IsEnterWindow())
+        GetDrawingArea()->set_cursor(PointerStyle::Text);
+    return WeldEditView::MouseMove(rMEvt);
+}
+
 IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, 
void )
 {
     if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx 
b/sw/source/uibase/docvw/SidebarTxtControl.hxx
index e0652aa5b856..891d3200380e 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.hxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx
@@ -66,6 +66,7 @@ class SidebarTextControl : public WeldEditView
         virtual bool KeyInput(const KeyEvent& rKeyEvt) override;
         virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
         virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
+        virtual bool MouseMove(const MouseEvent& rMEvt) override;
 
         void SetMapMode(const MapMode& rNewMapMode)
         {
diff --git a/sw/uiconfig/swriter/ui/annotation.ui 
b/sw/uiconfig/swriter/ui/annotation.ui
index d44c442d50a2..fc0e4c39a1a2 100644
--- a/sw/uiconfig/swriter/ui/annotation.ui
+++ b/sw/uiconfig/swriter/ui/annotation.ui
@@ -129,7 +129,7 @@
                   <object class="GtkDrawingArea" id="editview">
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
-                    <property name="events">GDK_BUTTON_MOTION_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
+                    <property name="events">GDK_BUTTON_MOTION_MASK | 
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | 
GDK_STRUCTURE_MASK</property>
                     <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
                   </object>

Reply via email to