forked from Silverfish/proton-bridge
GODT-1319: Set sourceSize everywhere for images
This commit is contained in:
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
import QtQuick 2.13
|
import QtQuick 2.13
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Controls.impl 2.12
|
import QtQuick.Controls.impl 2.12
|
||||||
|
|
||||||
import Proton 4.0
|
import Proton 4.0
|
||||||
@ -57,6 +58,7 @@ ColumnLayout {
|
|||||||
source: "icons/ic-copy.svg"
|
source: "icons/ic-copy.svg"
|
||||||
color: root.colorScheme.text_norm
|
color: root.colorScheme.text_norm
|
||||||
height: root.colorScheme.body_font_size
|
height: root.colorScheme.body_font_size
|
||||||
|
sourceSize.height: root.colorScheme.body_font_size
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@ -87,6 +87,7 @@ SettingsView {
|
|||||||
source: root._isAdvancedShown ? "icons/ic-chevron-up.svg" : "icons/ic-chevron-down.svg"
|
source: root._isAdvancedShown ? "icons/ic-chevron-up.svg" : "icons/ic-chevron-down.svg"
|
||||||
color: root.colorScheme.interaction_norm
|
color: root.colorScheme.interaction_norm
|
||||||
height: root.colorScheme.body_font_size
|
height: root.colorScheme.body_font_size
|
||||||
|
sourceSize.height: root.colorScheme.body_font_size
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: root._isAdvancedShown = !root._isAdvancedShown
|
onClicked: root._isAdvancedShown = !root._isAdvancedShown
|
||||||
|
|||||||
@ -152,6 +152,9 @@ T.Button {
|
|||||||
Math.min(control.icon.height, availableHeight)
|
Math.min(control.icon.height, availableHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSize.width: control.icon.width
|
||||||
|
sourceSize.height: control.icon.height
|
||||||
|
|
||||||
color: control.icon.color
|
color: control.icon.color
|
||||||
source: control.loading ? "../icons/Loader_16.svg" : control.icon.source
|
source: control.loading ? "../icons/Loader_16.svg" : control.icon.source
|
||||||
visible: control.loading || control.icon.source
|
visible: control.loading || control.icon.source
|
||||||
|
|||||||
@ -87,6 +87,8 @@ T.CheckBox {
|
|||||||
|
|
||||||
width: parent.width - 4
|
width: parent.width - 4
|
||||||
height: parent.height - 4
|
height: parent.height - 4
|
||||||
|
sourceSize.width: parent.width - 4
|
||||||
|
sourceSize.height: parent.height - 4
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
source: "../icons/ic-check.svg"
|
source: "../icons/ic-check.svg"
|
||||||
visible: control.checkState === Qt.Checked
|
visible: control.checkState === Qt.Checked
|
||||||
|
|||||||
@ -96,6 +96,8 @@ T.Switch {
|
|||||||
|
|
||||||
width: 16
|
width: 16
|
||||||
height: 16
|
height: 16
|
||||||
|
sourceSize.width: 16
|
||||||
|
sourceSize.height: 16
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
source: "../icons/ic-check.svg"
|
source: "../icons/ic-check.svg"
|
||||||
visible: control.checked
|
visible: control.checked
|
||||||
@ -114,6 +116,8 @@ T.Switch {
|
|||||||
|
|
||||||
width: 18
|
width: 18
|
||||||
height: 18
|
height: 18
|
||||||
|
sourceSize.width: 18
|
||||||
|
sourceSize.height: 18
|
||||||
color: control.colorScheme.interaction_norm_hover
|
color: control.colorScheme.interaction_norm_hover
|
||||||
source: "../icons/Loader_16.svg"
|
source: "../icons/Loader_16.svg"
|
||||||
visible: control.loading
|
visible: control.loading
|
||||||
|
|||||||
@ -164,6 +164,7 @@ Item {
|
|||||||
anchors.top: assistiveText.top
|
anchors.top: assistiveText.top
|
||||||
anchors.bottom: assistiveText.bottom
|
anchors.bottom: assistiveText.bottom
|
||||||
source: "../icons/ic-exclamation-circle-filled.svg"
|
source: "../icons/ic-exclamation-circle-filled.svg"
|
||||||
|
sourceSize.height: height
|
||||||
color: root.colorScheme.signal_danger
|
color: root.colorScheme.signal_danger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -295,6 +295,8 @@ Item {
|
|||||||
visible: root.error && (assistiveText.text.length > 0)
|
visible: root.error && (assistiveText.text.length > 0)
|
||||||
source: "../icons/ic-exclamation-circle-filled.svg"
|
source: "../icons/ic-exclamation-circle-filled.svg"
|
||||||
color: root.colorScheme.signal_danger
|
color: root.colorScheme.signal_danger
|
||||||
|
height: assistiveText.height
|
||||||
|
sourceSize.height: assistiveText.height
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@ -71,6 +71,7 @@ RowLayout{
|
|||||||
source: "../icons/ic-check.svg"
|
source: "../icons/ic-check.svg"
|
||||||
color: root.colorScheme.background_norm
|
color: root.colorScheme.background_norm
|
||||||
height: root.colorScheme.body_font_size
|
height: root.colorScheme.body_font_size
|
||||||
|
sourceSize.height: root.colorScheme.body_font_size
|
||||||
visible: root.checked
|
visible: root.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,6 +82,7 @@ RowLayout{
|
|||||||
source: "../icons/Loader_16.svg"
|
source: "../icons/Loader_16.svg"
|
||||||
color: root.colorScheme.text_norm
|
color: root.colorScheme.text_norm
|
||||||
height: root.colorScheme.body_font_size
|
height: root.colorScheme.body_font_size
|
||||||
|
sourceSize.height: root.colorScheme.body_font_size
|
||||||
visible: root.loading
|
visible: root.loading
|
||||||
|
|
||||||
RotationAnimation {
|
RotationAnimation {
|
||||||
|
|||||||
@ -98,6 +98,7 @@ Item {
|
|||||||
ColorImage {
|
ColorImage {
|
||||||
source: model.iconSource
|
source: model.iconSource
|
||||||
height: 36
|
height: 36
|
||||||
|
sourceSize.height: 36
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@ -200,6 +200,8 @@ Item {
|
|||||||
ColorImage {
|
ColorImage {
|
||||||
color: root.colorScheme.signal_danger
|
color: root.colorScheme.signal_danger
|
||||||
source: "./icons/ic-exclamation-circle-filled.svg"
|
source: "./icons/ic-exclamation-circle-filled.svg"
|
||||||
|
height: errorLabel.height
|
||||||
|
sourceSize.height: errorLabel.height
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@ -86,6 +86,8 @@ Item {
|
|||||||
|
|
||||||
ColorImage {
|
ColorImage {
|
||||||
id: image
|
id: image
|
||||||
|
Layout.fillHeight: true
|
||||||
|
sourceSize.height: height
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@ -89,6 +89,8 @@ Item {
|
|||||||
source: "icons/img-welcome.svg"
|
source: "icons/img-welcome.svg"
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
|
sourceSize.height: 148
|
||||||
|
sourceSize.width: 264
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
@ -145,6 +147,8 @@ Item {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.topMargin: 48
|
anchors.topMargin: 48
|
||||||
anchors.bottomMargin: 48
|
anchors.bottomMargin: 48
|
||||||
|
sourceSize.height: 22
|
||||||
|
sourceSize.width: 132
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user