This commit is contained in:
David Rowe 2016-02-18 23:06:26 +13:00
parent b68837277c
commit c07b1f9b1e
8 changed files with 35 additions and 73 deletions

View file

@ -128,7 +128,6 @@ TreeView {
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index) onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
// FIXME not triggered by double click?
onActivated: { onActivated: {
var path = scriptsModel.data(index, 0x100) var path = scriptsModel.data(index, 0x100)
if (path) { if (path) {

View file

@ -148,12 +148,12 @@ FocusScope {
} }
Component.onCompleted: { Component.onCompleted: {
offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged); //offscreenWindow.activeFocusItemChanged.connect(onWindowFocusChanged);
focusHack.start(); focusHack.start();
} }
function onWindowFocusChanged() { 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 // 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 // and I already cant produce any way to have a modal dialog lose focus

View file

@ -21,33 +21,38 @@ Item {
Item { Item {
id: colors id: colors
readonly property color white: "#ffffff"
// Base colors
readonly property color baseGray: "#404040" readonly property color baseGray: "#404040"
readonly property color darkGray: "#121212" readonly property color darkGray: "#121212"
readonly property color baseGrayShadow: "#252525" readonly property color baseGrayShadow: "#252525"
readonly property color baseGrayHighlight: "#575757" readonly property color baseGrayHighlight: "#575757"
readonly property color lightGray: "#6a6a6a" readonly property color lightGray: "#6a6a6a"
readonly property color lightGrayText: "#afafaf" readonly property color lightGrayText: "#afafaf"
readonly property color lightGrayBackground: "#d4d4d4"
readonly property color faintGray: "#e3e3e3" readonly property color faintGray: "#e3e3e3"
readonly property color primaryHighlight: "#00b4ef" readonly property color primaryHighlight: "#00b4ef"
readonly property color blueHighlight: "#00b4ef"
readonly property color blueAccent: "#1080b8" readonly property color blueAccent: "#1080b8"
readonly property color redHighlight: "#e2334d" readonly property color redHighlight: "#e2334d"
readonly property color redAccent: "#b70a37" readonly property color redAccent: "#b70a37"
readonly property color greenHighlight: "#1ac567" readonly property color greenHighlight: "#1ac567"
readonly property color greenShadow: "#2c8e72" 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 white50: "#80ffffff"
readonly property color white30: "#4dffffff" readonly property color white30: "#4dffffff"
readonly property color white25: "#40ffffff" readonly property color white25: "#40ffffff"
readonly property color baseGrayHighlight15: "#26575757"
readonly property color baseGrayHighlight40: "#66575757" // Control specific colors
readonly property color darkGray30: "#4d121212"
readonly property color darkGray0: "#00121212"
readonly property color faintGray50: "#80e3e3e3"
readonly property color baseGrayShadow60: "#99252525"
readonly property color tableRowLightOdd: white50 readonly property color tableRowLightOdd: white50
readonly property color tableRowLightEven: "#1a575757" readonly property color tableRowLightEven: "#1a575757"
readonly property color tableRowDarkOdd: "#80393939" readonly property color tableRowDarkOdd: "#80393939"
@ -105,60 +110,6 @@ Item {
readonly property int radius: 5 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 { QtObject {
id: effects id: effects
readonly property int fadeInDuration: 300 readonly property int fadeInDuration: 300

View file

@ -12,7 +12,6 @@ import QtQuick 2.5
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import "." import "."
import "../controls-uit"
import "../styles-uit" import "../styles-uit"
Frame { Frame {

View file

@ -12,7 +12,6 @@ import QtQuick 2.5
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import "."
import "../styles-uit" import "../styles-uit"
// Enable window visibility transitions // Enable window visibility transitions

View file

@ -11,15 +11,12 @@
import QtQuick 2.5 import QtQuick 2.5
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import "../controls-uit"
import "../styles-uit" import "../styles-uit"
import "../js/Utils.js" as Utils import "../js/Utils.js" as Utils
Item { Item {
id: frame id: frame
// Frames always fill their parents, but their decorations may extend HifiConstants { id: hifi }
// beyond the window via negative margin sizes
anchors.fill: parent
property alias window: frame.parent // Convenience accessor for the window property alias window: frame.parent // Convenience accessor for the window
default property var decoration default property var decoration
@ -31,6 +28,10 @@ Item {
readonly property int frameMarginTop: 2 * frameMargin + iconSize readonly property int frameMarginTop: 2 * frameMargin + iconSize
readonly property int frameMarginBottom: iconSize + 6 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: [ children: [
focusShadow, focusShadow,
decoration, decoration,
@ -67,6 +68,7 @@ Item {
GradientStop { position: 0.5; color: "#00000000" } // black, 0% opacity GradientStop { position: 0.5; color: "#00000000" } // black, 0% opacity
GradientStop { position: 1.0; color: "#00000000" } GradientStop { position: 1.0; color: "#00000000" }
} }
cached: true
} }
Rectangle { Rectangle {

View file

@ -26,6 +26,7 @@ import "../styles-uit"
Fadable { Fadable {
id: window id: window
HifiConstants { id: hifi } HifiConstants { id: hifi }
// The Window size is the size of the content, while the frame // The Window size is the size of the content, while the frame
// decorations can extend outside it. // decorations can extend outside it.
implicitHeight: content ? content.height : 0 implicitHeight: content ? content.height : 0
@ -145,6 +146,7 @@ Fadable {
GradientStop { position: 0.0; color: hifi.colors.darkGray } GradientStop { position: 0.0; color: hifi.colors.darkGray }
GradientStop { position: 1.0; color: hifi.colors.darkGray0 } GradientStop { position: 1.0; color: hifi.colors.darkGray0 }
} }
cached: true
} }
ScrollView { ScrollView {

View file

@ -48,6 +48,16 @@ ApplicationWindow {
} }
} }
Button {
text: "Attachments"
property var builder: Component {
AttachmentsDialog { }
}
onClicked: {
var attachmentsDialog = builder.createObject(desktop);
}
}
/* /*
Button { Button {
text: "restore all" text: "restore all"