Skip to content

Commit ffde5d5

Browse files
authored
Fix InsSettingsPopup QML warnings columnWidths not defined (#582)
1 parent 886dda4 commit ffde5d5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

resources/SettingsTabComponents/InsSettingsPopup.qml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Item {
5353
contentItem: Column {
5454
id: layout
5555

56+
property variant columnWidths: [layout.width / 3, layout.width / 3, layout.width / 3]
57+
5658
width: parent.width
5759
spacing: Constants.insSettingsPopup.columnSpacing
5860

@@ -66,8 +68,6 @@ Item {
6668
}
6769

6870
ColumnLayout {
69-
property variant columnWidths: [layout.width / 3, layout.width / 3, layout.width / 3]
70-
7171
spacing: 0
7272
width: parent.width
7373
height: Constants.insSettingsPopup.tableHeight
@@ -80,7 +80,7 @@ Item {
8080
syncView: tableView
8181

8282
delegate: Rectangle {
83-
implicitWidth: columnWidths[index]
83+
implicitWidth: layout.columnWidths[index]
8484
implicitHeight: Constants.genericTable.cellHeight
8585
border.color: Constants.genericTable.borderColor
8686

@@ -106,10 +106,10 @@ Item {
106106
}
107107
onPositionChanged: {
108108
if (pressed) {
109-
let oldcols = columnWidths.slice();
109+
let oldcols = layout.columnWidths.slice();
110110
var delta_x = (mouseX - mouse_x);
111-
columnWidths[index] += delta_x;
112-
columnWidths[(index + 1) % 3] -= delta_x;
111+
layout.columnWidths[index] += delta_x;
112+
layout.columnWidths[(index + 1) % 3] -= delta_x;
113113
tableView.forceLayout();
114114
}
115115
}
@@ -137,7 +137,7 @@ Item {
137137

138138
Layout.fillWidth: true
139139
Layout.fillHeight: true
140-
columnWidths: parent.columnWidths
140+
columnWidths: layout.columnWidths
141141

142142
model: TableModel {
143143
id: tableModel

0 commit comments

Comments
 (0)