GODT-1319: Set sourceSize everywhere for images

This commit is contained in:
Alexander Bilyak
2021-09-22 20:25:05 +02:00
committed by Jakub
parent 726c8918ab
commit b7adccf651
12 changed files with 26 additions and 0 deletions

View File

@ -17,6 +17,7 @@
import QtQuick 2.13
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import QtQuick.Controls.impl 2.12
import Proton 4.0
@ -57,6 +58,7 @@ ColumnLayout {
source: "icons/ic-copy.svg"
color: root.colorScheme.text_norm
height: root.colorScheme.body_font_size
sourceSize.height: root.colorScheme.body_font_size
MouseArea {
anchors.fill: parent

View File

@ -87,6 +87,7 @@ SettingsView {
source: root._isAdvancedShown ? "icons/ic-chevron-up.svg" : "icons/ic-chevron-down.svg"
color: root.colorScheme.interaction_norm
height: root.colorScheme.body_font_size
sourceSize.height: root.colorScheme.body_font_size
MouseArea {
anchors.fill: parent
onClicked: root._isAdvancedShown = !root._isAdvancedShown

View File

@ -152,6 +152,9 @@ T.Button {
Math.min(control.icon.height, availableHeight)
}
sourceSize.width: control.icon.width
sourceSize.height: control.icon.height
color: control.icon.color
source: control.loading ? "../icons/Loader_16.svg" : control.icon.source
visible: control.loading || control.icon.source

View File

@ -87,6 +87,8 @@ T.CheckBox {
width: parent.width - 4
height: parent.height - 4
sourceSize.width: parent.width - 4
sourceSize.height: parent.height - 4
color: "#FFFFFF"
source: "../icons/ic-check.svg"
visible: control.checkState === Qt.Checked

View File

@ -96,6 +96,8 @@ T.Switch {
width: 16
height: 16
sourceSize.width: 16
sourceSize.height: 16
color: "#FFFFFF"
source: "../icons/ic-check.svg"
visible: control.checked
@ -114,6 +116,8 @@ T.Switch {
width: 18
height: 18
sourceSize.width: 18
sourceSize.height: 18
color: control.colorScheme.interaction_norm_hover
source: "../icons/Loader_16.svg"
visible: control.loading

View File

@ -164,6 +164,7 @@ Item {
anchors.top: assistiveText.top
anchors.bottom: assistiveText.bottom
source: "../icons/ic-exclamation-circle-filled.svg"
sourceSize.height: height
color: root.colorScheme.signal_danger
}

View File

@ -295,6 +295,8 @@ Item {
visible: root.error && (assistiveText.text.length > 0)
source: "../icons/ic-exclamation-circle-filled.svg"
color: root.colorScheme.signal_danger
height: assistiveText.height
sourceSize.height: assistiveText.height
}
Label {

View File

@ -71,6 +71,7 @@ RowLayout{
source: "../icons/ic-check.svg"
color: root.colorScheme.background_norm
height: root.colorScheme.body_font_size
sourceSize.height: root.colorScheme.body_font_size
visible: root.checked
}
}
@ -81,6 +82,7 @@ RowLayout{
source: "../icons/Loader_16.svg"
color: root.colorScheme.text_norm
height: root.colorScheme.body_font_size
sourceSize.height: root.colorScheme.body_font_size
visible: root.loading
RotationAnimation {

View File

@ -98,6 +98,7 @@ Item {
ColorImage {
source: model.iconSource
height: 36
sourceSize.height: 36
}
Label {

View File

@ -200,6 +200,8 @@ Item {
ColorImage {
color: root.colorScheme.signal_danger
source: "./icons/ic-exclamation-circle-filled.svg"
height: errorLabel.height
sourceSize.height: errorLabel.height
}
Label {

View File

@ -86,6 +86,8 @@ Item {
ColorImage {
id: image
Layout.fillHeight: true
sourceSize.height: height
}
Label {

View File

@ -89,6 +89,8 @@ Item {
source: "icons/img-welcome.svg"
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: 16
sourceSize.height: 148
sourceSize.width: 264
}
Label {
@ -145,6 +147,8 @@ Item {
anchors.bottom: parent.bottom
anchors.topMargin: 48
anchors.bottomMargin: 48
sourceSize.height: 22
sourceSize.width: 132
}
}
}