diff --git a/interface/resources/qml/controls-uit/Tree.qml b/interface/resources/qml/controls-uit/Tree.qml index 2cab92565a..9c52679d7e 100644 --- a/interface/resources/qml/controls-uit/Tree.qml +++ b/interface/resources/qml/controls-uit/Tree.qml @@ -128,7 +128,6 @@ TreeView { onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index) - // FIXME not triggered by double click? onActivated: { var path = scriptsModel.data(index, 0x100) if (path) { diff --git a/interface/resources/qml/desktop/Desktop.qml b/interface/resources/qml/desktop/Desktop.qml index 0286c45ac3..c4ca0ab9a3 100644 --- a/interface/resources/qml/desktop/Desktop.qml +++ b/interface/resources/qml/desktop/Desktop.qml @@ -148,12 +148,12 @@ FocusScope { } Component.onCompleted: { - offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged); + //offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged); focusHack.start(); } function onWindowFocusChanged() { - console.log("Focus item is " + offscreenWindow.activeFocusItem); + //console.log("Focus item is " + offscreenWindow.activeFocusItem); // FIXME this needs more testing before it can go into production // and I already cant produce any way to have a modal dialog lose focus diff --git a/interface/resources/qml/styles-uit/HifiConstants.qml b/interface/resources/qml/styles-uit/HifiConstants.qml index 9896cb57c2..44745c96dc 100644 --- a/interface/resources/qml/styles-uit/HifiConstants.qml +++ b/interface/resources/qml/styles-uit/HifiConstants.qml @@ -21,33 +21,38 @@ Item { Item { id: colors - readonly property color white: "#ffffff" + + // Base colors readonly property color baseGray: "#404040" readonly property color darkGray: "#121212" readonly property color baseGrayShadow: "#252525" readonly property color baseGrayHighlight: "#575757" readonly property color lightGray: "#6a6a6a" readonly property color lightGrayText: "#afafaf" - readonly property color lightGrayBackground: "#d4d4d4" readonly property color faintGray: "#e3e3e3" readonly property color primaryHighlight: "#00b4ef" - readonly property color blueHighlight: "#00b4ef" readonly property color blueAccent: "#1080b8" readonly property color redHighlight: "#e2334d" readonly property color redAccent: "#b70a37" readonly property color greenHighlight: "#1ac567" readonly property color greenShadow: "#2c8e72" - readonly property color black: "#000000" + // Semitransparent + readonly property color darkGray30: "#4d121212" + readonly property color darkGray0: "#00121212" + readonly property color baseGrayShadow60: "#99252525" + readonly property color baseGrayHighlight40: "#66575757" + readonly property color baseGrayHighlight15: "#26575757" + readonly property color faintGray50: "#80e3e3e3" + // Other colors + readonly property color white: "#ffffff" + readonly property color black: "#000000" + // Semitransparent readonly property color white50: "#80ffffff" readonly property color white30: "#4dffffff" readonly property color white25: "#40ffffff" - readonly property color baseGrayHighlight15: "#26575757" - readonly property color baseGrayHighlight40: "#66575757" - readonly property color darkGray30: "#4d121212" - readonly property color darkGray0: "#00121212" - readonly property color faintGray50: "#80e3e3e3" - readonly property color baseGrayShadow60: "#99252525" + + // Control specific colors readonly property color tableRowLightOdd: white50 readonly property color tableRowLightEven: "#1a575757" readonly property color tableRowDarkOdd: "#80393939" @@ -105,60 +110,6 @@ Item { readonly property int radius: 5 } - /* - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - readonly property alias colors: colors - readonly property alias layout: layout - readonly property alias fonts: fonts - readonly property alias styles: styles - readonly property alias effects: effects - - Item { - id: colors - readonly property color hifiBlue: "#0e7077" - readonly property color window: sysPalette.window - readonly property color dialogBackground: sysPalette.window - readonly property color inputBackground: "white" - readonly property color background: sysPalette.dark - readonly property color text: "#202020" - readonly property color disabledText: "gray" - readonly property color hintText: "gray" // A bit darker than sysPalette.dark so that it is visible on the DK2 - readonly property color light: sysPalette.light - readonly property alias activeWindow: activeWindow - readonly property alias inactiveWindow: inactiveWindow - QtObject { - id: activeWindow - readonly property color headerBackground: "white" - readonly property color headerText: "black" - } - QtObject { - id: inactiveWindow - readonly property color headerBackground: "gray" - readonly property color headerText: "black" - } - } - - QtObject { - id: fonts - readonly property string fontFamily: "Arial" // Available on both Windows and OSX - readonly property real pixelSize: 22 // Logical pixel size; works on Windows and OSX at varying physical DPIs - readonly property real headerPixelSize: 32 - } - - QtObject { - id: layout - property int spacing: 8 - property int rowHeight: 40 - property int windowTitleHeight: 48 - } - - QtObject { - id: styles - readonly property int borderWidth: 5 - readonly property int borderRadius: borderWidth * 2 - } - */ - QtObject { id: effects readonly property int fadeInDuration: 300 diff --git a/interface/resources/qml/windows-uit/DefaultFrame.qml b/interface/resources/qml/windows-uit/DefaultFrame.qml index ec5d3553ec..4bc7fc7aec 100644 --- a/interface/resources/qml/windows-uit/DefaultFrame.qml +++ b/interface/resources/qml/windows-uit/DefaultFrame.qml @@ -12,7 +12,6 @@ import QtQuick 2.5 import QtGraphicalEffects 1.0 import "." -import "../controls-uit" import "../styles-uit" Frame { diff --git a/interface/resources/qml/windows-uit/Fadable.qml b/interface/resources/qml/windows-uit/Fadable.qml index bf3a6aa2b4..34990c2147 100644 --- a/interface/resources/qml/windows-uit/Fadable.qml +++ b/interface/resources/qml/windows-uit/Fadable.qml @@ -12,7 +12,6 @@ import QtQuick 2.5 import QtQuick.Controls 1.4 import QtGraphicalEffects 1.0 -import "." import "../styles-uit" // Enable window visibility transitions diff --git a/interface/resources/qml/windows-uit/Frame.qml b/interface/resources/qml/windows-uit/Frame.qml index 8c5ac5e766..5f59c6c192 100644 --- a/interface/resources/qml/windows-uit/Frame.qml +++ b/interface/resources/qml/windows-uit/Frame.qml @@ -11,15 +11,12 @@ import QtQuick 2.5 import QtGraphicalEffects 1.0 -import "../controls-uit" import "../styles-uit" import "../js/Utils.js" as Utils Item { id: frame - // Frames always fill their parents, but their decorations may extend - // beyond the window via negative margin sizes - anchors.fill: parent + HifiConstants { id: hifi } property alias window: frame.parent // Convenience accessor for the window default property var decoration @@ -31,6 +28,10 @@ Item { readonly property int frameMarginTop: 2 * frameMargin + iconSize readonly property int frameMarginBottom: iconSize + 6 + // Frames always fill their parents, but their decorations may extend + // beyond the window via negative margin sizes + anchors.fill: parent + children: [ focusShadow, decoration, @@ -67,6 +68,7 @@ Item { GradientStop { position: 0.5; color: "#00000000" } // black, 0% opacity GradientStop { position: 1.0; color: "#00000000" } } + cached: true } Rectangle { diff --git a/interface/resources/qml/windows-uit/Window.qml b/interface/resources/qml/windows-uit/Window.qml index 36d083dfc6..5b9f10ab9a 100644 --- a/interface/resources/qml/windows-uit/Window.qml +++ b/interface/resources/qml/windows-uit/Window.qml @@ -26,6 +26,7 @@ import "../styles-uit" Fadable { id: window HifiConstants { id: hifi } + // The Window size is the size of the content, while the frame // decorations can extend outside it. implicitHeight: content ? content.height : 0 @@ -145,6 +146,7 @@ Fadable { GradientStop { position: 0.0; color: hifi.colors.darkGray } GradientStop { position: 1.0; color: hifi.colors.darkGray0 } } + cached: true } ScrollView { diff --git a/tests/ui/qml/main.qml b/tests/ui/qml/main.qml index ef27ff3633..a98651df83 100644 --- a/tests/ui/qml/main.qml +++ b/tests/ui/qml/main.qml @@ -48,6 +48,16 @@ ApplicationWindow { } } + Button { + text: "Attachments" + property var builder: Component { + AttachmentsDialog { } + } + onClicked: { + var attachmentsDialog = builder.createObject(desktop); + } + } + /* Button { text: "restore all"