| Summary: | konsole mouse-scrolling support for 'less', 'vi', ... | ||
|---|---|---|---|
| Product: | TDE | Reporter: | ThoMaus <thomas.maus> |
| Component: | tdeutils | Assignee: | Michele Calgaro <michele.calgaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | bugwatch, michele.calgaro, slavek.banko, thomas.maus |
| Priority: | P5 | ||
| Version: | R14.1.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | 14.0.2 | |
| Application Version: | 14.0.2 | Application Name: | trinity-konsole |
| Bug Depends on: | |||
| Bug Blocks: | 2247 | ||
|
Description
ThoMaus
2016-02-22 13:08:12 CST
> Probably it should be applicable without much collisions.
I think that svn diff refers to KDE4 source code, since there is no such file in Konsole in TDE.
Anyhow I think it should be possible to analyze the KDE4 code for differences and then use the necessary bits to get the same result for TDE.
Not only scrolling with the mouse should be supported, also using the normal keyboard shortcuts for scrolling should behave correctly.
yes, definitely KDE 4 code, I just checked :-) (In reply to Michele Calgaro from comment #2) > yes, definitely KDE 4 code, I just checked :-) Ooops, sorry -- I'd should have checked myself (it was late + lazy ;-) The feature actually first appeared in KDE4. I have cloned the TDE GIT and had a look: In "main/tdebase/konsole/konsole/TEWidget.cpp" you'll find the following code -- I've added a comment below to indicate where the logical code of the patch needs to be applied (of course not literally): <code> void TEWidget::wheelEvent( TQWheelEvent* ev ) { if (ev->orientation() != Qt::Vertical) return; if ( mouse_marks ) // ThoMaus: HERE the patch on the logical level applies TQApplication::sendEvent(scrollbar, ev); else { TQPoint tL = contentsRect().topLeft(); int tLx = tL.x(); int tLy = tL.y(); TQPoint pos = TQPoint((ev->x()-tLx-bX)/font_w,(ev->y()-tLy-bY)/font_h); emit mouseSignal( ev->delta() > 0 ? 4 : 5, pos.x() + 1, pos.y() + 1 +scrollbar->value() -scrollbar->maxValue() ); } } </code> Hope, that helps ... Not being versed in (T)Qt I cannot code this myself, but I'm willing to test changes. Added to main trunk in commit 1c64345. This will not be added to r14.0.x being a new feature. Small change but tricky to get it right in all situations. The number of scrolled lines is selectable in the TDE Control Center -> Peripherals -> Mouse -> Advanced -> "Mouse wheel scrolls by" parameter. |