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.Controls 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
||||
/*!
|
||||
\qmltype StatusImageCropPanel
|
||||
|
@ -127,6 +128,7 @@ Item {
|
|||
id: mainLayout
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: 1
|
||||
|
||||
Item {
|
||||
id: cropSpaceItem
|
||||
|
@ -243,18 +245,20 @@ Item {
|
|||
|
||||
RowLayout {
|
||||
visible: root.interactive
|
||||
spacing: 10
|
||||
|
||||
StatusIcon {
|
||||
icon: "remove-circle"
|
||||
color: Theme.palette.baseColor1
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: 20
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredWidth: 24
|
||||
Layout.preferredHeight: 24
|
||||
}
|
||||
StatusSlider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
Layout.bottomMargin: 20
|
||||
Layout.topMargin: 10
|
||||
Layout.bottomMargin: 10
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
enabled: root.interactive
|
||||
|
@ -267,10 +271,11 @@ Item {
|
|||
}
|
||||
StatusIcon {
|
||||
icon: "add-circle"
|
||||
color: Theme.palette.baseColor1
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: 20
|
||||
Layout.preferredHeight: 20
|
||||
Layout.preferredWidth: 24
|
||||
Layout.preferredHeight: 24
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ Slider {
|
|||
implicitHeight: Math.max(handle.implicitHeight,
|
||||
background.implicitHeight + decorationContainer.height)
|
||||
|
||||
leftPadding: 0
|
||||
horizontalPadding: 0
|
||||
|
||||
background: Rectangle {
|
||||
id: bgRect
|
||||
|
@ -55,7 +55,7 @@ Slider {
|
|||
} // background
|
||||
|
||||
handle: Rectangle {
|
||||
x: root.leftPadding + root.visualPosition * (root.availableWidth - width / 2)
|
||||
x: root.leftPadding + root.visualPosition * (root.availableWidth - width)
|
||||
anchors.verticalCenter: bgRect.verticalCenter
|
||||
color: root.handleColor
|
||||
implicitWidth: root.handleSize
|
||||
|
|
Loading…
Reference in New Issue