[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: [Bug 161412] Using mousewheel to scroll does not work over scrollbar
From: George Kiagiadakis <gkiagiad () csd ! uoc ! gr>
Date: 2008-07-19 12:19:53
Message-ID: 20080719121953.20114.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=161412
gkiagiad csd uoc gr changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gkiagiad csd uoc gr
------- Additional Comments From gkiagiad csd uoc gr 2008-07-19 14:19 -------
Hello,
I took some time this morning and tried to fix this bug...
There are two ways to fix this actually. My first thought was to override whellEvent \
on the scrollbar and send the event to the view, something like this (tested with \
kwrite and works, patch is against kdelibs r834504):
Index: kate/view/kateviewhelpers.cpp
===================================================================
--- kate/view/kateviewhelpers.cpp (revision 834504)
+++ kate/view/kateviewhelpers.cpp (working copy)
@ -188,6 +188,11 @
}
}
+void KateScrollBar::wheelEvent(QWheelEvent *e)
+{
+ QCoreApplication::sendEvent(m_viewInternal, e);
+}
+
void KateScrollBar::marksChanged()
{
recomputeMarksPositions();
Index: kate/view/kateviewhelpers.h
===================================================================
--- kate/view/kateviewhelpers.h (revision 834504)
+++ kate/view/kateviewhelpers.h (working copy)
@ -73,6 +73,7 @
virtual void resizeEvent(QResizeEvent *);
virtual void styleChange(QStyle &oldStyle);
virtual void sliderChange ( SliderChange change );
+ virtual void wheelEvent(QWheelEvent *e);
protected Q_SLOTS:
void sliderMaybeMoved(int value);
...but then I found a commented-out hack that works too if uncommented. It seems to \
have been commented out in r473347 (more than two years ago) for some reason. Just \
uncommenting this works too and seems to be the right thing to do, unless it causes \
some regression or other trouble. The decision is yours... :)
Index: kate/view/kateviewinternal.cpp
===================================================================
--- kate/view/kateviewinternal.cpp (revision 834504)
+++ kate/view/kateviewinternal.cpp (working copy)
@ -144,7 +144,7 @
connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int)));
// catch wheel events, completing the hijack
- //m_lineScroll->installEventFilter(this);
+ m_lineScroll->installEventFilter(this);
//
// scrollbar for columns
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic