From 10efbd996f51a606c1625ab272f3fe28b5abf167 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 25 Feb 2016 20:26:36 +1300 Subject: [PATCH] Update General Settings dialog to use new window frame style --- .../qml/dialogs/PreferencesDialog.qml | 67 ++++++++++--------- .../hifi/dialogs/GeneralPreferencesDialog.qml | 10 +++ 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/interface/resources/qml/dialogs/PreferencesDialog.qml b/interface/resources/qml/dialogs/PreferencesDialog.qml index 3b594153dc..fe27c5c514 100644 --- a/interface/resources/qml/dialogs/PreferencesDialog.qml +++ b/interface/resources/qml/dialogs/PreferencesDialog.qml @@ -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(); } } } diff --git a/interface/resources/qml/hifi/dialogs/GeneralPreferencesDialog.qml b/interface/resources/qml/hifi/dialogs/GeneralPreferencesDialog.qml index 81e4924204..9656b156b3 100644 --- a/interface/resources/qml/hifi/dialogs/GeneralPreferencesDialog.qml +++ b/interface/resources/qml/hifi/dialogs/GeneralPreferencesDialog.qml @@ -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