mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-02-21 20:39:00 +00:00
Added mouse wheel scrolling.
This commit is contained in:
parent
06b9627c6c
commit
67055633bd
@ -11,6 +11,14 @@ Item{
|
|||||||
property real _minBlurCoefficient: 0.015
|
property real _minBlurCoefficient: 0.015
|
||||||
property real _maxBlurCoefficient: 0.10
|
property real _maxBlurCoefficient: 0.10
|
||||||
|
|
||||||
|
function scrollUp(){
|
||||||
|
kterminal.scrollUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
function scrollDown(){
|
||||||
|
kterminal.scrollDown();
|
||||||
|
}
|
||||||
|
|
||||||
KTerminal {
|
KTerminal {
|
||||||
id: kterminal
|
id: kterminal
|
||||||
font.pointSize: shadersettings.fontSize
|
font.pointSize: shadersettings.fontSize
|
||||||
|
@ -243,6 +243,18 @@ ScreenWindow* KTerminalDisplay::screenWindow() const
|
|||||||
return _screenWindow;
|
return _screenWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void KTerminalDisplay::scrollDown(){
|
||||||
|
_screenWindow->scrollBy( ScreenWindow::ScrollLines, +2 );
|
||||||
|
_screenWindow->scrollCount();
|
||||||
|
updateImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KTerminalDisplay::scrollUp(){
|
||||||
|
_screenWindow->scrollBy( ScreenWindow::ScrollLines, -2 );
|
||||||
|
updateImage();
|
||||||
|
}
|
||||||
|
|
||||||
void KTerminalDisplay::forcedFocus()
|
void KTerminalDisplay::forcedFocus()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -99,6 +99,9 @@ public:
|
|||||||
Q_INVOKABLE void setLineSpacing(uint);
|
Q_INVOKABLE void setLineSpacing(uint);
|
||||||
uint lineSpacing() const;
|
uint lineSpacing() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE void scrollDown();
|
||||||
|
Q_INVOKABLE void scrollUp();
|
||||||
|
|
||||||
void emitSelection(bool useXselection,bool appendReturn);
|
void emitSelection(bool useXselection,bool appendReturn);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,5 +171,7 @@ Module {
|
|||||||
name: "setLineSpacing"
|
name: "setLineSpacing"
|
||||||
Parameter { name: "i"; type: "uint"}
|
Parameter { name: "i"; type: "uint"}
|
||||||
}
|
}
|
||||||
|
Method { name: "scrollUp" }
|
||||||
|
Method { name: "scrollDown" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user