NColorPicker: sizing improvements
This commit is contained in:
parent
abe51f4928
commit
593a0bfc2c
1 changed files with 11 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ Rectangle {
|
||||||
signal colorSelected(color color)
|
signal colorSelected(color color)
|
||||||
|
|
||||||
implicitWidth: 150 * scaling
|
implicitWidth: 150 * scaling
|
||||||
implicitHeight: 40 * scaling
|
implicitHeight: Math.round(Style.baseWidgetSize * 1.1 * scaling)
|
||||||
|
|
||||||
radius: Style.radiusM * scaling
|
radius: Style.radiusM * scaling
|
||||||
color: Color.mSurface
|
color: Color.mSurface
|
||||||
|
|
@ -40,12 +40,16 @@ Rectangle {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.marginS * scaling
|
anchors {
|
||||||
|
leftMargin: Style.marginL * scaling
|
||||||
|
rightMargin: Style.marginL * scaling
|
||||||
|
}
|
||||||
spacing: Style.marginS * scaling
|
spacing: Style.marginS * scaling
|
||||||
|
|
||||||
|
// Color preview circle
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.preferredWidth: 24 * scaling
|
Layout.preferredWidth: root.height * 0.6 * scaling
|
||||||
Layout.preferredHeight: 24 * scaling
|
Layout.preferredHeight: root.height * 0.6 * scaling
|
||||||
radius: Layout.preferredWidth * 0.5
|
radius: Layout.preferredWidth * 0.5
|
||||||
color: root.selectedColor
|
color: root.selectedColor
|
||||||
border.color: Color.mOutline
|
border.color: Color.mOutline
|
||||||
|
|
@ -56,11 +60,14 @@ Rectangle {
|
||||||
text: root.selectedColor.toString().toUpperCase()
|
text: root.selectedColor.toString().toUpperCase()
|
||||||
font.family: Settings.data.ui.fontFixed
|
font.family: Settings.data.ui.fontFixed
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
NIcon {
|
NIcon {
|
||||||
icon: "color-picker"
|
icon: "color-picker"
|
||||||
color: Color.mOnSurfaceVariant
|
color: Color.mOnSurfaceVariant
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue