pull/11/head
cutefishd 5 years ago
parent 9891c52077
commit 6846ff21d5

@ -31,11 +31,6 @@ Item {
} }
} }
MouseArea {
anchors.fill: parent
onDoubleClicked: additionalSettings.toggle()
}
ColumnLayout { ColumnLayout {
id: mainLayout id: mainLayout
anchors.fill: parent anchors.fill: parent
@ -45,72 +40,89 @@ Item {
id: _itemLayout id: _itemLayout
spacing: 0 spacing: 0
Image { Item {
id: _userImage id: _topItem
width: 50
height: 50 Layout.fillWidth: true
sourceSize: Qt.size(width, height) height: _topLayout.implicitHeight
source: iconFileName ? "file:///" + iconFileName : "image://icontheme/default-user"
visible: status === Image.Ready MouseArea {
anchors.fill: parent
layer.enabled: true onDoubleClicked: additionalSettings.toggle()
layer.effect: OpacityMask { }
maskSource: Item {
width: _userImage.width RowLayout {
height: width id: _topLayout
anchors.fill: parent
Rectangle {
anchors.fill: parent Image {
radius: width / 2 id: _userImage
width: 50
height: 50
sourceSize: Qt.size(width, height)
source: iconFileName ? "file:///" + iconFileName : "image://icontheme/default-user"
visible: status === Image.Ready
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Item {
width: _userImage.width
height: width
Rectangle {
anchors.fill: parent
radius: width / 2
}
}
} }
} }
}
}
Label { Label {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
text: userName text: userName
font.pointSize: 16 font.pointSize: 16
bottomPadding: Meui.Units.smallSpacing bottomPadding: Meui.Units.smallSpacing
leftPadding: Meui.Units.largeSpacing leftPadding: Meui.Units.largeSpacing
} }
Label { Label {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
text: realName text: realName
color: Meui.Theme.disabledTextColor color: Meui.Theme.disabledTextColor
visible: realName !== userName visible: realName !== userName
font.pointSize: 16 font.pointSize: 16
bottomPadding: Meui.Units.smallSpacing bottomPadding: Meui.Units.smallSpacing
} }
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
Label { Label {
text: qsTr("Currently logged") text: qsTr("Currently logged")
rightPadding: Meui.Units.largeSpacing rightPadding: Meui.Units.largeSpacing
visible: currentUser.userId === loggedUser.userId visible: currentUser.userId === loggedUser.userId
} }
Button { Button {
onClicked: additionalSettings.toggle() onClicked: additionalSettings.toggle()
implicitWidth: height implicitWidth: height
background: Item {} background: Item {}
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
width: 22 width: 22
height: 22 height: 22
sourceSize: Qt.size(width, height) sourceSize: Qt.size(width, height)
source: Meui.Theme.darkMode ? additionalSettings.shown ? "qrc:/images/dark/up.svg" : "qrc:/images/dark/down.svg" source: Meui.Theme.darkMode ? additionalSettings.shown ? "qrc:/images/dark/up.svg" : "qrc:/images/dark/down.svg"
: additionalSettings.shown ? "qrc:/images/light/up.svg" : "qrc:/images/light/down.svg" : additionalSettings.shown ? "qrc:/images/light/up.svg" : "qrc:/images/light/down.svg"
}
}
}
} }
} }
}
Item { Item {
height: Meui.Units.largeSpacing height: Meui.Units.largeSpacing

@ -113,6 +113,7 @@ ItemPage {
mipmap: true mipmap: true
cache: true cache: true
opacity: 1.0 opacity: 1.0
smooth: false
Behavior on opacity { Behavior on opacity {
NumberAnimation { NumberAnimation {

Loading…
Cancel
Save