mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 23:46:26 +02:00
Importing peferred dialog look from browser branch
This commit is contained in:
parent
b0eccc40c2
commit
d1d1830b2f
3 changed files with 41 additions and 7 deletions
|
@ -92,6 +92,7 @@ DialogBase {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: 16
|
width: 16
|
||||||
height: 16
|
height: 16
|
||||||
|
z: 1000
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onPressed: {
|
onPressed: {
|
||||||
startX = mouseX
|
startX = mouseX
|
||||||
|
@ -143,4 +144,15 @@ DialogBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onPressed: {
|
||||||
|
switch(event.key) {
|
||||||
|
case Qt.Key_W:
|
||||||
|
if (event.modifiers == Qt.ControlModifier) {
|
||||||
|
event.accepted = true
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,11 +22,13 @@ Item {
|
||||||
readonly property alias titleWidth: titleBorder.width
|
readonly property alias titleWidth: titleBorder.width
|
||||||
readonly property alias titleHeight: titleBorder.height
|
readonly property alias titleHeight: titleBorder.height
|
||||||
|
|
||||||
|
// readonly property real borderWidth: hifi.styles.borderWidth
|
||||||
|
readonly property real borderWidth: 0
|
||||||
property alias clientBorder: clientBorder
|
property alias clientBorder: clientBorder
|
||||||
readonly property real clientX: clientBorder.x + hifi.styles.borderWidth
|
readonly property real clientX: clientBorder.x + borderWidth
|
||||||
readonly property real clientY: clientBorder.y + hifi.styles.borderWidth
|
readonly property real clientY: clientBorder.y + borderWidth
|
||||||
readonly property real clientWidth: clientBorder.width - hifi.styles.borderWidth * 2
|
readonly property real clientWidth: clientBorder.width - borderWidth * 2
|
||||||
readonly property real clientHeight: clientBorder.height - hifi.styles.borderWidth * 2
|
readonly property real clientHeight: clientBorder.height - borderWidth * 2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Window decorations, with a title bar and frames
|
* Window decorations, with a title bar and frames
|
||||||
|
@ -35,6 +37,7 @@ Item {
|
||||||
id: windowBorder
|
id: windowBorder
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
border.color: root.frameColor
|
border.color: root.frameColor
|
||||||
|
border.width: 0
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
|
|
||||||
Border {
|
Border {
|
||||||
|
@ -43,11 +46,13 @@ Item {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
border.color: root.frameColor
|
border.color: root.frameColor
|
||||||
|
border.width: 0
|
||||||
clip: true
|
clip: true
|
||||||
color: root.active ?
|
color: root.active ?
|
||||||
hifi.colors.activeWindow.headerBackground :
|
hifi.colors.activeWindow.headerBackground :
|
||||||
hifi.colors.inactiveWindow.headerBackground
|
hifi.colors.inactiveWindow.headerBackground
|
||||||
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: titleText
|
id: titleText
|
||||||
color: root.active ?
|
color: root.active ?
|
||||||
|
@ -60,8 +65,26 @@ Item {
|
||||||
}
|
}
|
||||||
} // header border
|
} // header border
|
||||||
|
|
||||||
|
// These two rectangles hide the curves between the title area
|
||||||
|
// and the client area
|
||||||
|
Rectangle {
|
||||||
|
y: titleBorder.height - titleBorder.radius
|
||||||
|
height: titleBorder.radius
|
||||||
|
width: titleBorder.width
|
||||||
|
color: titleBorder.color
|
||||||
|
visible: borderWidth == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
y: titleBorder.height
|
||||||
|
width: clientBorder.width
|
||||||
|
height: clientBorder.radius
|
||||||
|
color: clientBorder.color
|
||||||
|
}
|
||||||
|
|
||||||
Border {
|
Border {
|
||||||
id: clientBorder
|
id: clientBorder
|
||||||
|
border.width: 0
|
||||||
border.color: root.frameColor
|
border.color: root.frameColor
|
||||||
color: root.backgroundColor
|
color: root.backgroundColor
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
@ -69,7 +92,6 @@ Item {
|
||||||
anchors.topMargin: -titleBorder.border.width
|
anchors.topMargin: -titleBorder.border.width
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
clip: true
|
|
||||||
} // client border
|
} // client border
|
||||||
} // window border
|
} // window border
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@ Original.TextInput {
|
||||||
font.family: hifi.fonts.fontFamily
|
font.family: hifi.fonts.fontFamily
|
||||||
font.pointSize: hifi.fonts.fontSize
|
font.pointSize: hifi.fonts.fontSize
|
||||||
|
|
||||||
|
/*
|
||||||
Original.Rectangle {
|
Original.Rectangle {
|
||||||
// Render the rectangle as background
|
// Render the rectangle as background
|
||||||
z: -1
|
z: -1
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: hifi.colors.inputBackground
|
color: hifi.colors.inputBackground
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
Text {
|
Text {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
font.pointSize: parent.font.pointSize
|
font.pointSize: parent.font.pointSize
|
||||||
|
|
Loading…
Reference in a new issue