simple fixes of view

This commit is contained in:
Andrei Yankovich 2020-10-05 17:50:42 +03:00
parent 4612b8f0a6
commit b4b9368f41
2 changed files with 20 additions and 6 deletions

View File

@ -6,7 +6,9 @@ import QtQuick.Controls.Universal 2.15
Item {
id: root
property string soucre: ""
property string source: ""
property alias imagesource: sourceImg
property string text: ""
property bool hover: false
property bool presed: false
@ -17,11 +19,21 @@ Item {
property color textColor: Material.color(Material.Grey)
property color background: colorPicker.pick(soucre)
property color background: colorPicker.pick(source)
property color borderColor: "#00000000"
signal clicked(var mouse);
Connections {
target: sourceImg
function onStatusChanged(status) {
if (status === Image.Ready) {
root.background = colorPicker.pick(source);
}
}
}
Item {
id: privateData
property int rootMinSize: Math.min(root.height, root.width)
@ -62,15 +74,17 @@ Item {
ColumnLayout {
Image {
id: source
source: root.soucre
id: sourceImg
source: root.source
clip: true
fillMode: Image.PreserveAspectFit
fillMode: Image.PreserveAspectCrop
Layout.fillHeight: true
Layout.fillWidth: true
Layout.margins: 5
}
Label {

View File

@ -53,7 +53,7 @@ ViewPortPage {
}
GradientStop {
position: 1.00;
position: 0.70;
color: "#00" + baseColor;
}
}