mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Merge pull request #7455 from ctrlaltdavid/20860
Miscellaneous improvements to Attachments dialog
This commit is contained in:
commit
16c5971a7f
4 changed files with 55 additions and 32 deletions
|
@ -35,7 +35,6 @@ SpinBox {
|
|||
style: SpinBoxStyle {
|
||||
id: spinStyle
|
||||
background: Rectangle {
|
||||
id: backgrondRec
|
||||
color: isLightColorScheme
|
||||
? (spinBox.focus ? hifi.colors.white : hifi.colors.lightGray)
|
||||
: (spinBox.focus ? hifi.colors.black : hifi.colors.baseGrayShadow)
|
||||
|
|
|
@ -11,7 +11,7 @@ import "attachments"
|
|||
|
||||
Window {
|
||||
id: root
|
||||
title: "Attachments Dialog"
|
||||
title: "Attachments"
|
||||
objectName: "AttachmentsDialog"
|
||||
width: 600
|
||||
height: 600
|
||||
|
@ -55,11 +55,19 @@ Window {
|
|||
color: hifi.colors.baseGrayShadow
|
||||
radius: 4
|
||||
|
||||
ScrollView{
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
|
||||
style: ScrollViewStyle {
|
||||
|
||||
padding {
|
||||
top: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
decrementControl: Item {
|
||||
visible: false
|
||||
}
|
||||
|
@ -69,18 +77,29 @@ Window {
|
|||
scrollBarBackground: Rectangle{
|
||||
implicitWidth: 14
|
||||
color: hifi.colors.baseGray
|
||||
anchors.left: attachmentDelegate.right
|
||||
anchors.leftMargin: 5
|
||||
radius: 3
|
||||
radius: 4
|
||||
Rectangle {
|
||||
// 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:
|
||||
Rectangle {
|
||||
implicitWidth: 8
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 3
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
radius: 3
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: 3
|
||||
top: parent.top
|
||||
topMargin: 3
|
||||
bottom: parent.bottom
|
||||
bottomMargin: 4
|
||||
}
|
||||
radius: 4
|
||||
color: hifi.colors.lightGrayText
|
||||
}
|
||||
}
|
||||
|
@ -134,12 +153,12 @@ Window {
|
|||
spacing: 8
|
||||
anchors { right: parent.right; bottom: parent.bottom; margins: 8 }
|
||||
HifiControls.Button {
|
||||
action: cancelAction
|
||||
action: okAction
|
||||
color: hifi.buttons.black
|
||||
colorScheme: hifi.colorSchemes.dark
|
||||
}
|
||||
HifiControls.Button {
|
||||
action: okAction
|
||||
action: cancelAction
|
||||
color: hifi.buttons.black
|
||||
colorScheme: hifi.colorSchemes.dark
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ Item {
|
|||
Item {
|
||||
height: modelChooserButton.height + urlLabel.height + 4
|
||||
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 {
|
||||
id: modelUrl;
|
||||
height: jointChooser.height;
|
||||
|
@ -57,12 +57,12 @@ Item {
|
|||
colorScheme: hifi.colorSchemes.dark
|
||||
anchors { right: parent.right; verticalCenter: modelUrl.verticalCenter }
|
||||
Component {
|
||||
id: modelBrowserBuiler;
|
||||
id: modelBrowserBuilder;
|
||||
ModelBrowserDialog {}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
var browser = modelBrowserBuiler.createObject(desktop);
|
||||
var browser = modelBrowserBuilder.createObject(desktop);
|
||||
browser.selected.connect(function(newModelUrl){
|
||||
modelUrl.text = newModelUrl;
|
||||
})
|
||||
|
@ -75,7 +75,7 @@ Item {
|
|||
anchors { left: parent.left; right: parent.right; }
|
||||
HifiControls.Label {
|
||||
id: jointLabel;
|
||||
text: "Joint:";
|
||||
text: "Joint";
|
||||
color: hifi.colors.lightGrayText;
|
||||
anchors.top: parent.top
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ Item {
|
|||
Item {
|
||||
height: translation.height + translationLabel.height + 4
|
||||
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 {
|
||||
id: translation;
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom}
|
||||
|
@ -114,7 +114,7 @@ Item {
|
|||
Item {
|
||||
height: rotation.height + rotationLabel.height + 4
|
||||
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 {
|
||||
id: rotation;
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
|
||||
|
@ -129,15 +129,15 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
height: scaleItem.height
|
||||
anchors {left: parent.left; right: parent.right;}
|
||||
height: scaleItem.height
|
||||
anchors { left: parent.left; right: parent.right; }
|
||||
|
||||
Item {
|
||||
id: scaleItem
|
||||
id: scaleItem
|
||||
height: scaleSpinner.height + scaleLabel.height + 4
|
||||
width: parent.width - isSoftItem.width
|
||||
anchors { left: isSoftItem.right; right: parent.right; }
|
||||
HifiControls.Label { id: scaleLabel; color: hifi.colors.lightGrayText; text: "Scale:"; anchors.top: parent.top; }
|
||||
width: parent.width / 3 - 8
|
||||
anchors { right: parent.right; }
|
||||
HifiControls.Label { id: scaleLabel; color: hifi.colors.lightGrayText; text: "Scale"; anchors.top: parent.top; }
|
||||
HifiControls.SpinBox {
|
||||
id: scaleSpinner;
|
||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom; }
|
||||
|
@ -158,13 +158,18 @@ Item {
|
|||
|
||||
Item {
|
||||
id: isSoftItem
|
||||
height: soft.height
|
||||
width: parent.width * 0.2
|
||||
anchors { left: parent.left; bottom: parent.bottom }
|
||||
HifiControls.Label { id: softLabel; color: hifi.colors.lightGrayText; text: "Is soft"; anchors.left: soft.right; anchors.leftMargin: 8; }
|
||||
height: scaleSpinner.height
|
||||
anchors {
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
HifiControls.CheckBox {
|
||||
id: soft;
|
||||
anchors { left: parent.left; bottom: parent.bottom;}
|
||||
id: soft
|
||||
text: "Is soft"
|
||||
anchors {
|
||||
left: parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
checked: attachment ? attachment.soft : false
|
||||
colorScheme: hifi.colorSchemes.dark
|
||||
onCheckedChanged: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import "."
|
||||
|
||||
Vector3 {
|
||||
decimals: 2;
|
||||
decimals: 3;
|
||||
stepSize: 0.01;
|
||||
maximumValue: 10
|
||||
minimumValue: -10
|
||||
|
|
Loading…
Reference in a new issue