|
|
|
|
@ -46,7 +46,7 @@ ItemPage {
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: layout
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
anchors.bottomMargin: FishUI.Units.largeSpacing
|
|
|
|
|
// anchors.bottomMargin: FishUI.Units.largeSpacing
|
|
|
|
|
spacing: FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
|
|
RoundedItem {
|
|
|
|
|
@ -110,14 +110,14 @@ ItemPage {
|
|
|
|
|
|
|
|
|
|
GridView {
|
|
|
|
|
id: accentColorView
|
|
|
|
|
height: itemSize + FishUI.Units.largeSpacing * 2
|
|
|
|
|
height: itemSize
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
cellWidth: height
|
|
|
|
|
cellHeight: height
|
|
|
|
|
interactive: false
|
|
|
|
|
model: ListModel {}
|
|
|
|
|
|
|
|
|
|
property var itemSize: 32
|
|
|
|
|
property var itemSize: 30 + FishUI.Units.largeSpacing * 2
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
model.append({"accentColor": String(FishUI.Theme.blueColor)})
|
|
|
|
|
@ -128,33 +128,39 @@ ItemPage {
|
|
|
|
|
model.append({"accentColor": String(FishUI.Theme.orangeColor)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
delegate: Rectangle {
|
|
|
|
|
delegate: Item {
|
|
|
|
|
id: _accentColorItem
|
|
|
|
|
|
|
|
|
|
property bool checked: Qt.colorEqual(FishUI.Theme.highlightColor, accentColor)
|
|
|
|
|
property color currentColor: accentColor
|
|
|
|
|
|
|
|
|
|
width: accentColorView.itemSize + FishUI.Units.largeSpacing
|
|
|
|
|
width: GridView.view.itemSize
|
|
|
|
|
height: width
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: _mouseArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
onClicked: appearance.setAccentColor(index)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
anchors.margins: FishUI.Units.smallSpacing
|
|
|
|
|
color: "transparent"
|
|
|
|
|
radius: width / 2
|
|
|
|
|
|
|
|
|
|
border.color: _mouseArea.pressed ? Qt.rgba(currentColor.r,
|
|
|
|
|
currentColor.g,
|
|
|
|
|
currentColor.b, 0.6)
|
|
|
|
|
: Qt.rgba(currentColor.r,
|
|
|
|
|
currentColor.g,
|
|
|
|
|
currentColor.b, 0.4)
|
|
|
|
|
border.width: checked ? 3 : _mouseArea.containsMouse ? 2 : 0
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
id: _mouseArea
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
onClicked: appearance.setAccentColor(index)
|
|
|
|
|
}
|
|
|
|
|
border.width: checked || _mouseArea.containsMouse ? 3 : 0
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
width: 32
|
|
|
|
|
height: width
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
anchors.margins: FishUI.Units.smallSpacing
|
|
|
|
|
color: currentColor
|
|
|
|
|
radius: width / 2
|
|
|
|
|
|
|
|
|
|
@ -178,6 +184,7 @@ ItemPage {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RoundedItem {
|
|
|
|
|
// Font
|
|
|
|
|
|