Skip to content

Commit

Permalink
fix: use more lighter background for item
Browse files Browse the repository at this point in the history
  • Loading branch information
wineee committed Apr 18, 2024
1 parent a3ef606 commit 99a91eb
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 10 deletions.
7 changes: 3 additions & 4 deletions qml/windowed/AppListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ Item {
}
}

background: ItemBackground { }

MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
Expand Down Expand Up @@ -205,10 +207,7 @@ Item {
}
}

background: BoxPanel {
visible: ColorSelector.controlState === DTK.HoveredState
outsideBorderColor: null
}
background: ItemBackground { }
}
}
}
Expand Down
1 change: 1 addition & 0 deletions qml/windowed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ qt_add_qml_module(launcher-qml-windowed
RecentlyInstalledView.qml
FrequentlyUsedView.qml
SearchResultView.qml
ItemBackground.qml
)
4 changes: 1 addition & 3 deletions qml/windowed/FreeSortListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ Item {
"text/x-dde-launcher-dnd-desktopId": model.desktopId
}

background: BoxPanel {
background: ItemBackground {
id: bg
visible: ColorSelector.controlState === DTK.HoveredState
outsideBorderColor: null
}

MouseArea {
Expand Down
4 changes: 1 addition & 3 deletions qml/windowed/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ Control {
ToolTip.text: root.text
ToolTip.delay: 1000
ToolTip.visible: hovered
background: ButtonPanel {
button: parent
outsideBorderColor: null
background: ItemBackground {
radius: 8
}

Expand Down
25 changes: 25 additions & 0 deletions qml/windowed/ItemBackground.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import QtQuick 2.15
import org.deepin.dtk 1.0 as D
import org.deepin.dtk.style 1.0 as DS

D.BoxPanel {
visible: D.ColorSelector.controlState === D.DTK.HoveredState
outsideBorderColor: null
insideBorderColor: null
implicitWidth: DS.Style.toolButton.width
implicitHeight: DS.Style.toolButton.height

property D.Palette background: D.Palette {
normal {
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.1)
}
}
color1: background
color2: background
}
7 changes: 7 additions & 0 deletions qml/windowed/SideBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ ColumnLayout {
}
}

background: ItemBackground { }

onClicked: {
const menu = categorizedCom.createObject(this);
menu.popup(this, Qt.point(title.x, title.y));
Expand All @@ -137,6 +139,7 @@ ColumnLayout {
onClicked: {
DesktopIntegration.showUrl("computer:///")
}
background: ItemBackground { }
}

D.ToolButton {
Expand All @@ -152,6 +155,7 @@ ColumnLayout {
onClicked: {
DesktopIntegration.showFolder(StandardPaths.PicturesLocation)
}
background: ItemBackground { }
}

D.ToolButton {
Expand All @@ -167,6 +171,7 @@ ColumnLayout {
onClicked: {
DesktopIntegration.showFolder(StandardPaths.DocumentsLocation)
}
background: ItemBackground { }
}

D.ToolButton {
Expand All @@ -182,6 +187,7 @@ ColumnLayout {
onClicked: {
DesktopIntegration.showFolder(StandardPaths.DesktopLocation)
}
background: ItemBackground { }
}

D.ToolButton {
Expand All @@ -197,6 +203,7 @@ ColumnLayout {
onClicked: {
DesktopIntegration.openSystemSettings();
}
background: ItemBackground { }
}

Item {
Expand Down

0 comments on commit 99a91eb

Please sign in to comment.