mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 06:13:09 +02:00
changes to attachments dialog from contractor
This commit is contained in:
parent
312635c1db
commit
34fb06a7bd
4 changed files with 109 additions and 58 deletions
24
interface/resources/qml/controls-uit/ComboBox.qml
Normal file → Executable file
24
interface/resources/qml/controls-uit/ComboBox.qml
Normal file → Executable file
|
@ -162,6 +162,30 @@ FocusScope {
|
||||||
height: 480
|
height: 480
|
||||||
width: root.width + 4
|
width: root.width + 4
|
||||||
|
|
||||||
|
style: ScrollViewStyle {
|
||||||
|
decrementControl: Item {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
incrementControl: Item {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
scrollBarBackground: Rectangle{
|
||||||
|
implicitWidth: 14
|
||||||
|
color: hifi.colors.baseGray
|
||||||
|
}
|
||||||
|
|
||||||
|
handle:
|
||||||
|
Rectangle {
|
||||||
|
implicitWidth: 8
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 3
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
radius: 3
|
||||||
|
color: hifi.colors.lightGrayText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: listView
|
id: listView
|
||||||
height: textField.height * count * 1.4
|
height: textField.height * count * 1.4
|
||||||
|
|
23
interface/resources/qml/controls-uit/SpinBox.qml
Normal file → Executable file
23
interface/resources/qml/controls-uit/SpinBox.qml
Normal file → Executable file
|
@ -91,4 +91,27 @@ SpinBox {
|
||||||
color: spinBox.colorLabelInside
|
color: spinBox.colorLabelInside
|
||||||
visible: spinBox.labelInside != ""
|
visible: spinBox.labelInside != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
propagateComposedEvents: true
|
||||||
|
onWheel: {
|
||||||
|
if(spinBox.focus)
|
||||||
|
wheel.accepted = false
|
||||||
|
else
|
||||||
|
wheel.accepted = true
|
||||||
|
}
|
||||||
|
onPressed: {
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
onReleased: {
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
onDoubleClicked: {
|
||||||
|
mouse.accepted = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
14
interface/resources/qml/hifi/dialogs/AttachmentsDialog.qml
Normal file → Executable file
14
interface/resources/qml/hifi/dialogs/AttachmentsDialog.qml
Normal file → Executable file
|
@ -4,13 +4,9 @@ import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
//import "../../windows"
|
|
||||||
|
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
import "../../windows-uit"
|
import "../../windows-uit"
|
||||||
|
|
||||||
import "attachments"
|
import "attachments"
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
|
@ -43,6 +39,7 @@ Window {
|
||||||
listView.model.append({});
|
listView.model.append({});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: pane.contentWidth
|
width: pane.contentWidth
|
||||||
|
|
||||||
|
@ -55,7 +52,7 @@ Window {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: attachmentsBackground
|
id: attachmentsBackground
|
||||||
anchors { left: parent.left; right: parent.right; top: parent.top; bottom: newAttachmentButton.top; margins: 8 }
|
anchors { left: parent.left; right: parent.right; top: parent.top; bottom: newAttachmentButton.top; margins: 8 }
|
||||||
color: hifi.colors.lightGrayText
|
color: hifi.colors.baseGrayShadow
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
ScrollView{
|
ScrollView{
|
||||||
|
@ -72,8 +69,10 @@ Window {
|
||||||
scrollBarBackground: Rectangle{
|
scrollBarBackground: Rectangle{
|
||||||
implicitWidth: 14
|
implicitWidth: 14
|
||||||
color: hifi.colors.baseGray
|
color: hifi.colors.baseGray
|
||||||
|
anchors.left: attachmentDelegate.right
|
||||||
|
anchors.leftMargin: 5
|
||||||
|
radius: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
handle:
|
handle:
|
||||||
Rectangle {
|
Rectangle {
|
||||||
implicitWidth: 8
|
implicitWidth: 8
|
||||||
|
@ -90,8 +89,9 @@ Window {
|
||||||
id: listView
|
id: listView
|
||||||
model: ListModel {}
|
model: ListModel {}
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
|
id: attachmentDelegate
|
||||||
implicitHeight: attachmentView.height + 8;
|
implicitHeight: attachmentView.height + 8;
|
||||||
implicitWidth: attachmentView.width;
|
implicitWidth: attachmentView.width
|
||||||
Attachment {
|
Attachment {
|
||||||
id: attachmentView
|
id: attachmentView
|
||||||
width: scrollView.width
|
width: scrollView.width
|
||||||
|
|
42
interface/resources/qml/hifi/dialogs/attachments/Attachment.qml
Normal file → Executable file
42
interface/resources/qml/hifi/dialogs/attachments/Attachment.qml
Normal file → Executable file
|
@ -4,11 +4,8 @@ import QtQuick.Controls.Styles 1.4
|
||||||
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
import Qt.labs.settings 1.0
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
//import "../../../windows"
|
|
||||||
//import "../../../controls" as VrControls
|
|
||||||
import "."
|
import "."
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
import "../../../styles-uit"
|
import "../../../styles-uit"
|
||||||
import "../../../controls-uit" as HifiControls
|
import "../../../controls-uit" as HifiControls
|
||||||
import "../../../windows-uit"
|
import "../../../windows-uit"
|
||||||
|
@ -33,13 +30,13 @@ Item {
|
||||||
Column {
|
Column {
|
||||||
y: 8
|
y: 8
|
||||||
id: column
|
id: column
|
||||||
anchors { left: parent.left; right: parent.right; margins: 8 }
|
anchors { left: parent.left; right: parent.right; margins: 20 }
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: modelChooserButton.height + urlLabel.height
|
height: modelChooserButton.height + urlLabel.height + 4
|
||||||
anchors { left: parent.left; right: parent.right;}
|
anchors { left: parent.left; right: parent.right;}
|
||||||
Text { id: urlLabel; color: hifi.colors.lightGrayText; text: "Model URL:"; width: 80; 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;
|
||||||
|
@ -74,11 +71,10 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: jointChooser.height + jointLabel.height
|
height: jointChooser.height + jointLabel.height + 4
|
||||||
anchors { left: parent.left; right: parent.right; }
|
anchors { left: parent.left; right: parent.right; }
|
||||||
Text {
|
HifiControls.Label {
|
||||||
id: jointLabel;
|
id: jointLabel;
|
||||||
width: 80;
|
|
||||||
text: "Joint:";
|
text: "Joint:";
|
||||||
color: hifi.colors.lightGrayText;
|
color: hifi.colors.lightGrayText;
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
@ -99,9 +95,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: translation.height + translationLabel.height
|
height: translation.height + translationLabel.height + 4
|
||||||
anchors { left: parent.left; right: parent.right; }
|
anchors { left: parent.left; right: parent.right; }
|
||||||
Text { id: translationLabel; width: 80; 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}
|
||||||
|
@ -116,9 +112,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: rotation.height + rotationLabel.height
|
height: rotation.height + rotationLabel.height + 4
|
||||||
anchors { left: parent.left; right: parent.right; }
|
anchors { left: parent.left; right: parent.right; }
|
||||||
Text { id: rotationLabel; width: 80; 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; }
|
||||||
|
@ -133,9 +129,15 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
height: scaleSpinner.height + scaleLabel.height
|
height: scaleItem.height
|
||||||
anchors { left: parent.left; right: parent.right; }
|
anchors {left: parent.left; right: parent.right;}
|
||||||
Text { id: scaleLabel; width: 80; color: hifi.colors.lightGrayText; text: "Scale:"; anchors.top: parent.top; }
|
|
||||||
|
Item {
|
||||||
|
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; }
|
||||||
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; }
|
||||||
|
@ -155,9 +157,11 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: isSoftItem
|
||||||
height: soft.height
|
height: soft.height
|
||||||
anchors { left: parent.left; right: parent.right; }
|
width: parent.width * 0.2
|
||||||
Text { id: softLabel; width: 80; color: hifi.colors.lightGrayText; text: "Is soft"; anchors.left: soft.right; anchors.leftMargin: 8; }
|
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; }
|
||||||
HifiControls.CheckBox {
|
HifiControls.CheckBox {
|
||||||
id: soft;
|
id: soft;
|
||||||
anchors { left: parent.left; bottom: parent.bottom;}
|
anchors { left: parent.left; bottom: parent.bottom;}
|
||||||
|
@ -171,7 +175,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
color: hifi.buttons.black
|
color: hifi.buttons.black
|
||||||
colorScheme: hifi.colorSchemes.dark
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
|
Loading…
Reference in a new issue