Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update the color of a darg-and-drop in FreeSortList #414

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading