Update General Settings dialog to use new window frame style

This commit is contained in:
David Rowe 2016-02-25 20:26:36 +13:00
parent 023c04d2fe
commit 10efbd996f
2 changed files with 44 additions and 33 deletions

View file

@ -1,10 +1,21 @@
//
// PreferencesDialog.qml
//
// Created by Bradley Austin Davis on 24 Jan 2016
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2 as OriginalDialogs import QtQuick.Dialogs 1.2 as OriginalDialogs
import Qt.labs.settings 1.0 import Qt.labs.settings 1.0
import "../controls" as HifiControls import "../controls" as HifiControls
import "../windows" import "../styles-uit"
import "../windows-uit"
import "preferences" import "preferences"
Window { Window {
@ -17,6 +28,8 @@ Window {
property var sections: [] property var sections: []
property var showCategories: [] property var showCategories: []
HifiConstants { id: hifi }
function saveAll() { function saveAll() {
for (var i = 0; i < sections.length; ++i) { for (var i = 0; i < sections.length; ++i) {
var section = sections[i]; var section = sections[i];
@ -33,10 +46,8 @@ Window {
destroy(); destroy();
} }
Rectangle { Column {
anchors.fill: parent width: pane.contentWidth
clip: true
color: "white"
Component { Component {
id: sectionBuilder id: sectionBuilder
@ -71,37 +82,27 @@ Window {
} }
} }
Flickable { Column {
id: flickable id: prefControls
clip: true width: pane.contentWidth
interactive: true
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: dialogButtons.top
anchors.bottomMargin: 8
contentHeight: prefControls.height
contentWidth: parent.width
Column {
id: prefControls
anchors.left: parent.left
anchors.right: parent.right
}
} }
Row { }
id: dialogButtons
anchors { bottom: parent.bottom; right: parent.right; margins: 8 }
Button { footer: Row {
text: "Cancel"; anchors {
onClicked: root.restoreAll(); right: parent.right;
} rightMargin: hifi.dimensions.contentMargin.x
verticalCenter: parent.verticalCenter
}
Button { Button {
text: "Save all changes" text: "Cancel";
onClicked: root.saveAll(); onClicked: root.restoreAll();
} }
Button {
text: "Save all changes"
onClicked: root.saveAll();
} }
} }
} }

View file

@ -1,3 +1,13 @@
//
// PreferencesDialog.qml
//
// Created by Bradley Austin Davis on 24 Jan 2016
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
import QtQuick 2.5 import QtQuick 2.5
import Qt.labs.settings 1.0 import Qt.labs.settings 1.0