mirror of
https://github.com/QuasarApp/ViewSolutions.git
synced 2025-04-28 18:54:40 +00:00
simple fixes of view
This commit is contained in:
parent
4612b8f0a6
commit
b4b9368f41
@ -6,7 +6,9 @@ import QtQuick.Controls.Universal 2.15
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
property string soucre: ""
|
property string source: ""
|
||||||
|
property alias imagesource: sourceImg
|
||||||
|
|
||||||
property string text: ""
|
property string text: ""
|
||||||
property bool hover: false
|
property bool hover: false
|
||||||
property bool presed: false
|
property bool presed: false
|
||||||
@ -17,11 +19,21 @@ Item {
|
|||||||
property color textColor: Material.color(Material.Grey)
|
property color textColor: Material.color(Material.Grey)
|
||||||
|
|
||||||
|
|
||||||
property color background: colorPicker.pick(soucre)
|
property color background: colorPicker.pick(source)
|
||||||
property color borderColor: "#00000000"
|
property color borderColor: "#00000000"
|
||||||
|
|
||||||
signal clicked(var mouse);
|
signal clicked(var mouse);
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: sourceImg
|
||||||
|
|
||||||
|
function onStatusChanged(status) {
|
||||||
|
if (status === Image.Ready) {
|
||||||
|
root.background = colorPicker.pick(source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: privateData
|
id: privateData
|
||||||
property int rootMinSize: Math.min(root.height, root.width)
|
property int rootMinSize: Math.min(root.height, root.width)
|
||||||
@ -62,15 +74,17 @@ Item {
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
Image {
|
Image {
|
||||||
id: source
|
id: sourceImg
|
||||||
source: root.soucre
|
source: root.source
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectCrop
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
@ -53,7 +53,7 @@ ViewPortPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GradientStop {
|
GradientStop {
|
||||||
position: 1.00;
|
position: 0.70;
|
||||||
color: "#00" + baseColor;
|
color: "#00" + baseColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user