Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ImagesView.qml
Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Line(s) | 258 | FileDialog { | |||
---|---|---|---|---|---|
264 | selectFolder: true | 264 | selectFolder: true | ||
265 | 265 | | |||
266 | onFileUrlChanged: { | 266 | onFileUrlChanged: { | ||
267 | config.saveVideos = videoDirSelector.fileUrl | 267 | config.saveVideos = videoDirSelector.fileUrl | ||
268 | config.save() | 268 | config.save() | ||
269 | } | 269 | } | ||
270 | } | 270 | } | ||
271 | } | 271 | } | ||
272 | | ||||
273 | Item { | ||||
274 | Kirigami.FormData.isSection: true | ||||
275 | Kirigami.FormData.label: i18n("Cameras") | ||||
ngraham: Also probably needs `visible: devicesModel.count>1`, or else when there's only a single camera… | |||||
No, when there's a single camera the combo box will be disabled but still visible.. apol: No, when there's a single camera the combo box will be disabled but still visible.. | |||||
Oh right, because the combobox has its enabled: property changed conditionally, not visible:. We should hide it entirely instead of just disabling it when there's just one camera. The HIG says that it's appropriate to do this for cases where hardware isn't available, of which this is an example. ngraham: Oh right, because the combobox has its `enabled:` property changed conditionally, not `visible… | |||||
276 | } | ||||
277 | | ||||
278 | ComboBox { | ||||
279 | Layout.fillWidth: parent | ||||
280 | model: devicesModel | ||||
281 | textRole: "display" | ||||
282 | enabled: count>1 | ||||
283 | onAccepted: { | ||||
284 | devicesModel.playingDeviceUdi = udi | ||||
285 | } | ||||
286 | } | ||||
272 | } | 287 | } | ||
273 | 288 | | |||
274 | // Otherwise the back button might not always be right on the bottom | 289 | // Otherwise the back button might not always be right on the bottom | ||
275 | Item { | 290 | Item { | ||
276 | Layout.fillHeight: true | 291 | Layout.fillHeight: true | ||
277 | } | 292 | } | ||
278 | 293 | | |||
279 | Kirigami.BasicListItem { | 294 | Kirigami.BasicListItem { | ||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
Also probably needs visible: devicesModel.count>1, or else when there's only a single camera the header will be visible with no combobox underneath it.