Skip to content

Commit

Permalink
fix: update the color of a darg-and-drop in FreeSortList
Browse files Browse the repository at this point in the history
same color as the hover

Log: update the color
Bug: https://pms.uniontech.com/bug-view-271431.html
  • Loading branch information
xionglinlin authored and deepin-bot[bot] committed Sep 3, 2024
1 parent ec9bfd9 commit a883e5c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
16 changes: 16 additions & 0 deletions qml/Helper.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

pragma Singleton
import QtQuick 2.0
import org.deepin.dtk 1.0 as D

QtObject {
property QtObject windowed :QtObject {
Expand All @@ -23,4 +24,19 @@ QtObject {
property int cellPaddingColumns: 14
property int cellPaddingRows: 6
}

property D.Palette itemBackground: D.Palette {
normal {
common: Qt.rgba(0, 0, 0, 0.1)
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
}
}
}
5 changes: 3 additions & 2 deletions qml/windowed/FreeSortListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ Item {
x : 10
width: bg.width
height: indicatorDefaultHeight
color: "lightgray"
visible: showDropIndicator
radius: height > indicatorDefaultHeight ? 8 : 1
opacity: 0.5

property Palette background: Helper.itemBackground
color: dropIndicator.ColorSelector.background
}

ItemDelegate {
Expand Down
17 changes: 3 additions & 14 deletions qml/windowed/ItemBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,12 @@ import QtQuick 2.15
import org.deepin.dtk 1.0 as D
import org.deepin.dtk.style 1.0 as DS

import org.deepin.launchpad 1.0

D.BoxPanel {
id: control
property Item button
property D.Palette background: D.Palette {
normal {
common: Qt.rgba(0, 0, 0, 0.1)
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
}
}
property D.Palette background: Helper.itemBackground

implicitWidth: DS.Style.toolButton.width
implicitHeight: DS.Style.toolButton.height
Expand Down

0 comments on commit a883e5c

Please sign in to comment.