Skip to content

Commit

Permalink
Media spoiler hint
Browse files Browse the repository at this point in the history
  • Loading branch information
curoviyxru committed Nov 8, 2023
1 parent 0eb1d10 commit b305be9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion qml/control/ImageViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Item {
anchors.centerIn: bottomCenterRect
text: scalingAnimated + "%"
color: "white"
font.pixelSize: 14 * kgScaling
font.pixelSize: 13 * kgScaling
}
}

9 changes: 9 additions & 0 deletions qml/message/MessageDocument.qml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ Rectangle {
visible: mediaSpoiler
anchors.fill: parent
color: "gray"

Text {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 13 * kgScaling
color: "white"
text: "Media is hidden.\nClick to reveal."
}
}

MouseArea {
Expand Down
23 changes: 16 additions & 7 deletions qml/message/MessageImage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ Image {

//TODO loading spinner

Rectangle {
id: spoilerRect
visible: photoSpoiler
anchors.fill: parent
color: "gray"

Text {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 13 * kgScaling
color: "white"
text: "Media is hidden.\nClick to reveal."
}
}

Image {
id: checkbox
//TODO: adaptive color
Expand All @@ -23,13 +39,6 @@ Image {
asynchronous: true
}

Rectangle {
id: spoilerRect
visible: photoSpoiler
anchors.fill: parent
color: "gray"
}

MouseArea {
anchors.fill: parent
onClicked: {
Expand Down

0 comments on commit b305be9

Please sign in to comment.