GODT-1411: refactor SettingView content to fill height

This commit is contained in:
Alexander Bilyak
2021-11-09 13:18:11 +00:00
committed by Jakub
parent 2e52b8db87
commit 31920a4468
10 changed files with 251 additions and 167 deletions

View File

@ -124,11 +124,27 @@ FocusScope {
function selectWord() { return control.selectWord() }
function undo() { return control.undo() }
// Calculates the height of the component to make exactly lineNum visible in edit area
function heightForLinesVisible(lineNum) {
var totalHeight = 0
totalHeight += headerLayout.height
totalHeight += footerLayout.height
totalHeight += control.topPadding + control.bottomPadding
totalHeight += lineNum * fontMetrics.height
return totalHeight
}
FontMetrics {
id: fontMetrics
font: control.font
}
ColumnLayout {
anchors.fill: parent
spacing: 0
RowLayout {
id: headerLayout
Layout.fillWidth: true
spacing: 0
@ -282,6 +298,7 @@ FocusScope {
}
RowLayout {
id: footerLayout
Layout.fillWidth: true
spacing: 0