diff --git a/ViewSolutions/src/ViewSolutionsModule/ImageView.qml b/ViewSolutions/src/ViewSolutionsModule/ImageView.qml index 7a6448a..c5139b9 100644 --- a/ViewSolutions/src/ViewSolutionsModule/ImageView.qml +++ b/ViewSolutions/src/ViewSolutionsModule/ImageView.qml @@ -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 { diff --git a/ViewSolutions/src/ViewSolutionsModule/ViewPortGradientPage.qml b/ViewSolutions/src/ViewSolutionsModule/ViewPortGradientPage.qml index de16635..ebeca96 100644 --- a/ViewSolutions/src/ViewSolutionsModule/ViewPortGradientPage.qml +++ b/ViewSolutions/src/ViewSolutionsModule/ViewPortGradientPage.qml @@ -53,7 +53,7 @@ ViewPortPage { } GradientStop { - position: 1.00; + position: 0.70; color: "#00" + baseColor; } }