fix(StatusImageCropPanel) adjust Image Crop component (#839)
- update StatusSlider handle and background positioning Needed for https://github.com/status-im/status-desktop/issues/6835
This commit is contained in:
parent
e5ddf28f02
commit
4282cc10c4
|
@ -3,6 +3,7 @@ import QtQuick.Layouts 1.14
|
||||||
|
|
||||||
import StatusQ.Core 0.1
|
import StatusQ.Core 0.1
|
||||||
import StatusQ.Controls 0.1
|
import StatusQ.Controls 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\qmltype StatusImageCropPanel
|
\qmltype StatusImageCropPanel
|
||||||
|
@ -127,6 +128,7 @@ Item {
|
||||||
id: mainLayout
|
id: mainLayout
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
spacing: 1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: cropSpaceItem
|
id: cropSpaceItem
|
||||||
|
@ -243,18 +245,20 @@ Item {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: root.interactive
|
visible: root.interactive
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
StatusIcon {
|
StatusIcon {
|
||||||
icon: "remove-circle"
|
icon: "remove-circle"
|
||||||
|
color: Theme.palette.baseColor1
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredWidth: 20
|
Layout.preferredWidth: 24
|
||||||
Layout.preferredHeight: 20
|
Layout.preferredHeight: 24
|
||||||
}
|
}
|
||||||
StatusSlider {
|
StatusSlider {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 10
|
||||||
Layout.bottomMargin: 20
|
Layout.bottomMargin: 10
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
||||||
enabled: root.interactive
|
enabled: root.interactive
|
||||||
|
@ -267,10 +271,11 @@ Item {
|
||||||
}
|
}
|
||||||
StatusIcon {
|
StatusIcon {
|
||||||
icon: "add-circle"
|
icon: "add-circle"
|
||||||
|
color: Theme.palette.baseColor1
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredWidth: 20
|
Layout.preferredWidth: 24
|
||||||
Layout.preferredHeight: 20
|
Layout.preferredHeight: 24
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ Slider {
|
||||||
implicitHeight: Math.max(handle.implicitHeight,
|
implicitHeight: Math.max(handle.implicitHeight,
|
||||||
background.implicitHeight + decorationContainer.height)
|
background.implicitHeight + decorationContainer.height)
|
||||||
|
|
||||||
leftPadding: 0
|
horizontalPadding: 0
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: bgRect
|
id: bgRect
|
||||||
|
@ -55,7 +55,7 @@ Slider {
|
||||||
} // background
|
} // background
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
x: root.leftPadding + root.visualPosition * (root.availableWidth - width / 2)
|
x: root.leftPadding + root.visualPosition * (root.availableWidth - width)
|
||||||
anchors.verticalCenter: bgRect.verticalCenter
|
anchors.verticalCenter: bgRect.verticalCenter
|
||||||
color: root.handleColor
|
color: root.handleColor
|
||||||
implicitWidth: root.handleSize
|
implicitWidth: root.handleSize
|
||||||
|
|
Loading…
Reference in New Issue