summary refs log tree commit diff
diff options
context:
space:
mode:
authorkamathmanu <manuriddle@gmail.com>2020-10-15 11:52:49 -0400
committerkamathmanu <manuriddle@gmail.com>2020-10-15 11:52:49 -0400
commite1c4f7d516b2096c5b133fb7610a8a83755503a0 (patch)
tree4c6b46bb75fd1ce5fd2de2b876562339a833b98b
parentAvoid hardcoded font size (diff)
downloadnheko-e1c4f7d516b2096c5b133fb7610a8a83755503a0.tar.xz
Make Text element a sibling of the Rectangle to avoid the text from depending on the rectangle's opacity property. Switch to Nheko theme colors
-rw-r--r--resources/qml/delegates/ImageMessage.qml28
1 files changed, 14 insertions, 14 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml
index 3f6d9951..6ac5ee15 100644
--- a/resources/qml/delegates/ImageMessage.qml
+++ b/resources/qml/delegates/ImageMessage.qml
@@ -43,28 +43,28 @@ Item {
         
             anchors.fill: parent
             visible: mouseArea.containsMouse
-            
+
             Rectangle {
                 id: container
+                
                 width: parent.width
                 implicitHeight: imgcaption.implicitHeight
                 anchors.bottom: overlay.bottom 
-                color: "black"
+                color: colors.window
                 opacity: 0.75
+            }
 
-                Text {
-                    id: imgcaption
-
-                    anchors.fill: parent
-                    elide: Text.ElideMiddle
-                    horizontalAlignment: Text.AlignHCenter
-                    verticalAlignment: Text.AlignVCenter
-                    // See this MSC: https://github.com/matrix-org/matrix-doc/pull/2530
-                    text: model.data.filename ? model.data.filename : model.data.body
-                    color: "white"
-                }
+            Text {
+                id: imgcaption
+                
+                anchors.fill: container
+                elide: Text.ElideMiddle
+                horizontalAlignment: Text.AlignHCenter
+                verticalAlignment: Text.AlignVCenter
+                // See this MSC: https://github.com/matrix-org/matrix-doc/pull/2530
+                text: model.data.filename ? model.data.filename : model.data.body
+                color: colors.text
             }
         }
-        
     }
 }