Kaydet (Commit) d562df03 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw lok comments: implement drag of the scrollbar

With this, if a comment has a vertical scrollbar, then not only the
buttons of the scrollbar can be clicked on, but also the slider of the
scrollbar can be dragged.

Change-Id: I2e39e18bf60c42a878bb8bfd808f1d47be27eecb
üst d7acb44b
...@@ -60,6 +60,11 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle) ...@@ -60,6 +60,11 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle)
rWrtShell.libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr()); rWrtShell.libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
} }
void SidebarScrollBar::MouseMove(const MouseEvent& rMouseEvent)
{
TrackingEvent aEvent(rMouseEvent);
Tracking(aEvent);
}
SidebarScrollBar::~SidebarScrollBar() SidebarScrollBar::~SidebarScrollBar()
{ {
......
...@@ -30,6 +30,7 @@ class SidebarScrollBar : public ScrollBar ...@@ -30,6 +30,7 @@ class SidebarScrollBar : public ScrollBar
protected: protected:
/// @see OutputDevice::LogicInvalidate(). /// @see OutputDevice::LogicInvalidate().
void LogicInvalidate(const Rectangle* pRectangle) override; void LogicInvalidate(const Rectangle* pRectangle) override;
void MouseMove(const MouseEvent& rMouseEvent) override;
public: public:
SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, SwView& rView); SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, SwView& rView);
virtual ~SidebarScrollBar(); virtual ~SidebarScrollBar();
......
...@@ -463,15 +463,15 @@ void SwSidebarWin::KeyInput(const KeyEvent& rKeyEvent) ...@@ -463,15 +463,15 @@ void SwSidebarWin::KeyInput(const KeyEvent& rKeyEvent)
void SwSidebarWin::MouseMove(const MouseEvent& rMouseEvent) void SwSidebarWin::MouseMove(const MouseEvent& rMouseEvent)
{ {
if (mpSidebarTextControl) if (vcl::Window* pHit = lcl_getHitWindow(*this, rMouseEvent))
{ {
mpSidebarTextControl->Push(PushFlags::MAPMODE); pHit->Push(PushFlags::MAPMODE);
MouseEvent aMouseEvent(rMouseEvent); MouseEvent aMouseEvent(rMouseEvent);
lcl_translateTwips(EditWin(), *mpSidebarTextControl, &aMouseEvent); lcl_translateTwips(EditWin(), *pHit, &aMouseEvent);
mpSidebarTextControl->MouseMove(aMouseEvent); pHit->MouseMove(aMouseEvent);
mpSidebarTextControl->Pop(); pHit->Pop();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment