mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-09-26 07:02:41 +01:00
Scanlines now follow font scaling.
This commit is contained in:
@@ -380,6 +380,7 @@ void KTerminalDisplay::fontChange(const QFont&)
|
||||
_fontAscent = fm.ascent();
|
||||
|
||||
emit changedFontMetricSignal( _fontHeight, _fontWidth );
|
||||
emit paintedFontSizeChanged();
|
||||
propagateSize();
|
||||
update();
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ class KONSOLEPRIVATE_EXPORT KTerminalDisplay : public QQuickPaintedItem
|
||||
Q_PROPERTY(bool activeFocusOnClick READ autoFocus WRITE setAutoFocus NOTIFY changedAutoFocus)
|
||||
Q_PROPERTY(bool ShowIMEOnClick READ autoVKB WRITE setAutoVKB NOTIFY changedAutoVKB)
|
||||
Q_PROPERTY(QSize terminalSize READ getTerminalSize NOTIFY terminalSizeChanged)
|
||||
|
||||
Q_PROPERTY(QSize paintedFontSize READ getFontSize NOTIFY paintedFontSizeChanged)
|
||||
|
||||
|
||||
public:
|
||||
@@ -194,10 +194,14 @@ public:
|
||||
/**
|
||||
* Return size of the terminal as columns lines.
|
||||
*/
|
||||
QSize getTerminalSize(){
|
||||
QSize getTerminalSize() {
|
||||
return QSize(columns(), lines());
|
||||
}
|
||||
|
||||
QSize getFontSize() {
|
||||
return QSize(fontWidth(), fontHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets which characters, in addition to letters and numbers,
|
||||
* are regarded as being part of a word for the purposes
|
||||
@@ -417,6 +421,7 @@ signals:
|
||||
void clicked();
|
||||
|
||||
void terminalSizeChanged();
|
||||
void paintedFontSizeChanged();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -61,6 +61,7 @@ Module {
|
||||
Property { name: "activeFocusOnClick"; type: "bool" }
|
||||
Property { name: "ShowIMEOnClick"; type: "bool" }
|
||||
Property { name: "terminalSize"; type: "QSize" }
|
||||
Property { name: "paintedFontSize"; type: "QSize"}
|
||||
Signal {
|
||||
name: "changedScheme"
|
||||
Parameter { name: "scheme"; type: "string" }
|
||||
@@ -112,6 +113,7 @@ Module {
|
||||
Parameter { name: "session"; type: "KSession"; isPointer: true }
|
||||
}
|
||||
Signal { name: "terminalSizeChanged" }
|
||||
Singal { name: "paintedFontSizeChanged" }
|
||||
Signal { name: "updatedImage" }
|
||||
Method { name: "forcedFocus" }
|
||||
Method {
|
||||
|
Reference in New Issue
Block a user