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.Controls 1.4
import QtQuick.Dialogs 1.2 as OriginalDialogs
import Qt.labs.settings 1.0
import "../controls" as HifiControls
import "../windows"
import "../styles-uit"
import "../windows-uit"
import "preferences"
Window {
@ -17,6 +28,8 @@ Window {
property var sections: []
property var showCategories: []
HifiConstants { id: hifi }
function saveAll() {
for (var i = 0; i < sections.length; ++i) {
var section = sections[i];
@ -33,10 +46,8 @@ Window {
destroy();
}
Rectangle {
anchors.fill: parent
clip: true
color: "white"
Column {
width: pane.contentWidth
Component {
id: sectionBuilder
@ -71,37 +82,27 @@ Window {
}
}
Flickable {
id: flickable
clip: true
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
}
Column {
id: prefControls
width: pane.contentWidth
}
Row {
id: dialogButtons
anchors { bottom: parent.bottom; right: parent.right; margins: 8 }
}
Button {
text: "Cancel";
onClicked: root.restoreAll();
}
footer: Row {
anchors {
right: parent.right;
rightMargin: hifi.dimensions.contentMargin.x
verticalCenter: parent.verticalCenter
}
Button {
text: "Save all changes"
onClicked: root.saveAll();
}
Button {
text: "Cancel";
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 Qt.labs.settings 1.0