qml ui fixes
This commit is contained in:
parent
57234bc793
commit
27171ed974
43 changed files with 311 additions and 262 deletions
75
client/ui/qml/Controls/ShareConnectionContent.qml
Normal file
75
client/ui/qml/Controls/ShareConnectionContent.qml
Normal file
|
@ -0,0 +1,75 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtGraphicalEffects 1.12
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property bool active: false
|
||||
property Component content: undefined
|
||||
property string text: ""
|
||||
width: 360
|
||||
height: active ? contentLoader.item.height + 40 + 5 * 2 : 40
|
||||
signal clicked()
|
||||
|
||||
Rectangle {
|
||||
x: 0
|
||||
y: 0
|
||||
width: parent.width
|
||||
height: 40
|
||||
color: "transparent"
|
||||
clip: true
|
||||
radius: 2
|
||||
LinearGradient {
|
||||
anchors.fill: parent
|
||||
start: Qt.point(0, 0)
|
||||
end: Qt.point(0, height)
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#E1E1E1" }
|
||||
GradientStop { position: 0.4; color: "#DDDDDD" }
|
||||
GradientStop { position: 0.5; color: "#D8D8D8" }
|
||||
GradientStop { position: 1.0; color: "#D3D3D3" }
|
||||
}
|
||||
}
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
source: "qrc:/images/share.png"
|
||||
}
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 2
|
||||
color: "#148CD2"
|
||||
visible: ms.containsMouse ? true : false
|
||||
}
|
||||
Text {
|
||||
x: 40
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.family: "Lato"
|
||||
font.styleName: "normal"
|
||||
font.pixelSize: 18
|
||||
color: "#100A44"
|
||||
font.bold: true
|
||||
text: root.text
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
MouseArea {
|
||||
id: ms
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
x: 0
|
||||
y: 40 + 5
|
||||
id: contentLoader
|
||||
sourceComponent: root.content
|
||||
visible: root.active
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue