mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-01-31 10:11:20 +00:00
Updating sources when font settings are changed.
This commit is contained in:
parent
e815fe2787
commit
cc72a28ee3
@ -77,6 +77,23 @@ Item{
|
|||||||
kterminal.copyClipboard();
|
kterminal.copyClipboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//When settings are updated sources need to be redrawn.
|
||||||
|
Connections{
|
||||||
|
target: shadersettings
|
||||||
|
onFontScalingChanged: terminalContainer.updateSources();
|
||||||
|
onFontWidthChanged: terminalContainer.updateSources();
|
||||||
|
}
|
||||||
|
Connections{
|
||||||
|
target: terminalContainer
|
||||||
|
onWidthChanged: terminalContainer.updateSources();
|
||||||
|
onHeightChanged: terminalContainer.updateSources();
|
||||||
|
}
|
||||||
|
function updateSources() {
|
||||||
|
kterminal.update();
|
||||||
|
kterminal.updateImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
KTerminal {
|
KTerminal {
|
||||||
id: kterminal
|
id: kterminal
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -95,9 +112,6 @@ Item{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onWidthChanged: update();
|
|
||||||
onHeightChanged: update();
|
|
||||||
|
|
||||||
FontLoader{ id: fontLoader }
|
FontLoader{ id: fontLoader }
|
||||||
Text{id: fontMetrics; text: "B"; visible: false}
|
Text{id: fontMetrics; text: "B"; visible: false}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user