From f3ecef5cd78d630d3e4c82ffa7cd23c86fa6138a Mon Sep 17 00:00:00 2001
From: foxb612 <cmb612@outlook.com>
Date: Mon, 24 Oct 2022 23:31:15 +0800
Subject: [PATCH] Fix UploadBox thumbnail size

---
 resources/qml/UploadBox.qml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/resources/qml/UploadBox.qml b/resources/qml/UploadBox.qml
index ba00f2056..ccd59f450 100644
--- a/resources/qml/UploadBox.qml
+++ b/resources/qml/UploadBox.qml
@@ -48,8 +48,8 @@ Page {
                     Layout.fillHeight: true
                     Layout.fillWidth: true
 
-                    sourceSize.height: height
-                    sourceSize.width: width
+                    sourceSize.height: parent.availableHeight - namefield.height
+                    sourceSize.width: parent.availableWidth
                     fillMode: Image.PreserveAspectFit
                     smooth: true
                     mipmap: true
@@ -63,6 +63,7 @@ Page {
                     source: (modelData.thumbnail != "") ? modelData.thumbnail : ("image://colorimage/:/icons/icons/ui/"+typeStr+".svg?" + Nheko.colors.buttonText)
                 }
                 MatrixTextField {
+                    id: namefield
                     Layout.fillWidth: true
                     text: modelData.filename
                     onTextEdited: modelData.filename = text
-- 
GitLab