Merge pull request #7455 from ctrlaltdavid/20860

Miscellaneous improvements to Attachments dialog
This commit is contained in:
Brad Hefta-Gaub 2016-03-24 09:21:36 -07:00
commit 16c5971a7f
4 changed files with 55 additions and 32 deletions

View file

@ -35,7 +35,6 @@ SpinBox {
style: SpinBoxStyle { style: SpinBoxStyle {
id: spinStyle id: spinStyle
background: Rectangle { background: Rectangle {
id: backgrondRec
color: isLightColorScheme color: isLightColorScheme
? (spinBox.focus ? hifi.colors.white : hifi.colors.lightGray) ? (spinBox.focus ? hifi.colors.white : hifi.colors.lightGray)
: (spinBox.focus ? hifi.colors.black : hifi.colors.baseGrayShadow) : (spinBox.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)

View file

@ -11,7 +11,7 @@ import "attachments"
Window { Window {
id: root id: root
title: "Attachments Dialog" title: "Attachments"
objectName: "AttachmentsDialog" objectName: "AttachmentsDialog"
width: 600 width: 600
height: 600 height: 600
@ -55,11 +55,19 @@ Window {
color: hifi.colors.baseGrayShadow color: hifi.colors.baseGrayShadow
radius: 4 radius: 4
ScrollView{ ScrollView {
id: scrollView id: scrollView
anchors.fill: parent anchors.fill: parent
anchors.margins: 4 anchors.margins: 4
style: ScrollViewStyle { style: ScrollViewStyle {
padding {
top: 0
right: 0
bottom: 0
}
decrementControl: Item { decrementControl: Item {
visible: false visible: false
} }
@ -69,18 +77,29 @@ Window {
scrollBarBackground: Rectangle{ scrollBarBackground: Rectangle{
implicitWidth: 14 implicitWidth: 14
color: hifi.colors.baseGray color: hifi.colors.baseGray
anchors.left: attachmentDelegate.right radius: 4
anchors.leftMargin: 5 Rectangle {
radius: 3 // Make top left corner of scrollbar appear square
width: 8
height: 4
color: hifi.colors.baseGray
anchors.top: parent.top
anchors.horizontalCenter: parent.left
}
} }
handle: handle:
Rectangle { Rectangle {
implicitWidth: 8 implicitWidth: 8
anchors.left: parent.left anchors {
anchors.leftMargin: 3 left: parent.left
anchors.top: parent.top leftMargin: 3
anchors.bottom: parent.bottom top: parent.top
radius: 3 topMargin: 3
bottom: parent.bottom
bottomMargin: 4
}
radius: 4
color: hifi.colors.lightGrayText color: hifi.colors.lightGrayText
} }
} }
@ -134,12 +153,12 @@ Window {
spacing: 8 spacing: 8
anchors { right: parent.right; bottom: parent.bottom; margins: 8 } anchors { right: parent.right; bottom: parent.bottom; margins: 8 }
HifiControls.Button { HifiControls.Button {
action: cancelAction action: okAction
color: hifi.buttons.black color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark colorScheme: hifi.colorSchemes.dark
} }
HifiControls.Button { HifiControls.Button {
action: okAction action: cancelAction
color: hifi.buttons.black color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark colorScheme: hifi.colorSchemes.dark
} }

View file

@ -36,7 +36,7 @@ Item {
Item { Item {
height: modelChooserButton.height + urlLabel.height + 4 height: modelChooserButton.height + urlLabel.height + 4
anchors { left: parent.left; right: parent.right;} anchors { left: parent.left; right: parent.right;}
HifiControls.Label { id: urlLabel; color: hifi.colors.lightGrayText; text: "Model URL:"; anchors.top: parent.top;} HifiControls.Label { id: urlLabel; color: hifi.colors.lightGrayText; text: "Model URL"; anchors.top: parent.top;}
HifiControls.TextField { HifiControls.TextField {
id: modelUrl; id: modelUrl;
height: jointChooser.height; height: jointChooser.height;
@ -57,12 +57,12 @@ Item {
colorScheme: hifi.colorSchemes.dark colorScheme: hifi.colorSchemes.dark
anchors { right: parent.right; verticalCenter: modelUrl.verticalCenter } anchors { right: parent.right; verticalCenter: modelUrl.verticalCenter }
Component { Component {
id: modelBrowserBuiler; id: modelBrowserBuilder;
ModelBrowserDialog {} ModelBrowserDialog {}
} }
onClicked: { onClicked: {
var browser = modelBrowserBuiler.createObject(desktop); var browser = modelBrowserBuilder.createObject(desktop);
browser.selected.connect(function(newModelUrl){ browser.selected.connect(function(newModelUrl){
modelUrl.text = newModelUrl; modelUrl.text = newModelUrl;
}) })
@ -75,7 +75,7 @@ Item {
anchors { left: parent.left; right: parent.right; } anchors { left: parent.left; right: parent.right; }
HifiControls.Label { HifiControls.Label {
id: jointLabel; id: jointLabel;
text: "Joint:"; text: "Joint";
color: hifi.colors.lightGrayText; color: hifi.colors.lightGrayText;
anchors.top: parent.top anchors.top: parent.top
} }
@ -97,7 +97,7 @@ Item {
Item { Item {
height: translation.height + translationLabel.height + 4 height: translation.height + translationLabel.height + 4
anchors { left: parent.left; right: parent.right; } anchors { left: parent.left; right: parent.right; }
HifiControls.Label { id: translationLabel; color: hifi.colors.lightGrayText; text: "Translation:"; anchors.top: parent.top; } HifiControls.Label { id: translationLabel; color: hifi.colors.lightGrayText; text: "Translation"; anchors.top: parent.top; }
Translation { Translation {
id: translation; id: translation;
anchors { left: parent.left; right: parent.right; bottom: parent.bottom} anchors { left: parent.left; right: parent.right; bottom: parent.bottom}
@ -114,7 +114,7 @@ Item {
Item { Item {
height: rotation.height + rotationLabel.height + 4 height: rotation.height + rotationLabel.height + 4
anchors { left: parent.left; right: parent.right; } anchors { left: parent.left; right: parent.right; }
HifiControls.Label { id: rotationLabel; color: hifi.colors.lightGrayText; text: "Rotation:"; anchors.top: parent.top; } HifiControls.Label { id: rotationLabel; color: hifi.colors.lightGrayText; text: "Rotation"; anchors.top: parent.top; }
Rotation { Rotation {
id: rotation; id: rotation;
anchors { left: parent.left; right: parent.right; bottom: parent.bottom; } anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
@ -130,14 +130,14 @@ Item {
Item { Item {
height: scaleItem.height height: scaleItem.height
anchors {left: parent.left; right: parent.right;} anchors { left: parent.left; right: parent.right; }
Item { Item {
id: scaleItem id: scaleItem
height: scaleSpinner.height + scaleLabel.height + 4 height: scaleSpinner.height + scaleLabel.height + 4
width: parent.width - isSoftItem.width width: parent.width / 3 - 8
anchors { left: isSoftItem.right; right: parent.right; } anchors { right: parent.right; }
HifiControls.Label { id: scaleLabel; color: hifi.colors.lightGrayText; text: "Scale:"; anchors.top: parent.top; } HifiControls.Label { id: scaleLabel; color: hifi.colors.lightGrayText; text: "Scale"; anchors.top: parent.top; }
HifiControls.SpinBox { HifiControls.SpinBox {
id: scaleSpinner; id: scaleSpinner;
anchors { left: parent.left; right: parent.right; bottom: parent.bottom; } anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
@ -158,13 +158,18 @@ Item {
Item { Item {
id: isSoftItem id: isSoftItem
height: soft.height height: scaleSpinner.height
width: parent.width * 0.2 anchors {
anchors { left: parent.left; bottom: parent.bottom } left: parent.left
HifiControls.Label { id: softLabel; color: hifi.colors.lightGrayText; text: "Is soft"; anchors.left: soft.right; anchors.leftMargin: 8; } bottom: parent.bottom
}
HifiControls.CheckBox { HifiControls.CheckBox {
id: soft; id: soft
anchors { left: parent.left; bottom: parent.bottom;} text: "Is soft"
anchors {
left: parent.left
verticalCenter: parent.verticalCenter
}
checked: attachment ? attachment.soft : false checked: attachment ? attachment.soft : false
colorScheme: hifi.colorSchemes.dark colorScheme: hifi.colorSchemes.dark
onCheckedChanged: { onCheckedChanged: {

View file

@ -1,7 +1,7 @@
import "." import "."
Vector3 { Vector3 {
decimals: 2; decimals: 3;
stepSize: 0.01; stepSize: 0.01;
maximumValue: 10 maximumValue: 10
minimumValue: -10 minimumValue: -10