Skip to content

Commit

Permalink
fix: Modify the UI style of the list view
Browse files Browse the repository at this point in the history
Modify the UI style of the list view

pms: BUG-296991
pms: BUG-296923
  • Loading branch information
caixr23 authored and deepin-bot[bot] committed Dec 31, 2024
1 parent a763f72 commit 227114a
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 37 deletions.
4 changes: 2 additions & 2 deletions src/dde-control-center/frame/plugin/DccEditorItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ D.ItemDelegate {
Layout.leftMargin: model.item.icon.length === 0 ? 0 : 8
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
spacing: 0
spacing: 2
DccLabel {
Layout.fillWidth: true
text: model.display
}
DccLabel {
Layout.fillWidth: true
visible: text !== ""
font: D.DTK.fontManager.t8
font: D.DTK.fontManager.t10
text: model.item.description
opacity: 0.5
}
Expand Down
10 changes: 7 additions & 3 deletions src/dde-control-center/frame/plugin/DccItemBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Item {
hovered: Qt.rgba(0, 0, 0, 0.1)
hoveredDark: Qt.rgba(1, 1, 1, 0.1)
}
property D.Palette shadowColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.05)
normalDark: Qt.rgba(0, 0, 0, 0.3)
}
// 阴影
Loader {
y: 1
Expand All @@ -38,7 +42,7 @@ Item {
height: parent.height
active: shadowVisible && (!control.checked) && (backgroundType & 0x01) && (control.corners & D.RoundRectangle.BottomCorner)
sourceComponent: D.RoundRectangle {
color: palette.midlight
color: root.D.ColorSelector.shadowColor
radius: root.radius
corners: control.corners
}
Expand Down Expand Up @@ -82,11 +86,11 @@ Item {
// 分隔线
Loader {
active: separatorVisible && index !== 0
height: 2
height: 1
z: 3
anchors {
bottom: parent.top
bottomMargin: control.ListView.view ? (control.ListView.view.spacing - 2) / 2 : -1
bottomMargin: control.ListView.view ? (control.ListView.view.spacing - 2) / 2 : -0.5
// bottomMargin: (control.ListView.view.spacing - 1) / 2
left: parent.left
leftMargin: 10
Expand Down
12 changes: 8 additions & 4 deletions src/dde-control-center/frame/plugin/DccMenuEditorItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ DccEditorItem {
}

D.IconLabel {
icon.name: "arrow_ordinary_right"
icon.palette: D.DTK.makeIconPalette(control.palette)
icon.mode: control.D.ColorSelector.controlState
icon.theme: control.D.ColorSelector.controlTheme
icon {
width: 12
height: 12
name: "arrow_ordinary_right"
palette: D.DTK.makeIconPalette(control.palette)
mode: control.D.ColorSelector.controlState
theme: control.D.ColorSelector.controlTheme
}
}
}
onClicked: {
Expand Down
10 changes: 6 additions & 4 deletions src/dde-control-center/frame/plugin/DccMenuItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ DccEditorItem {
bottomPadding: bottomInset

rightItem: D.IconLabel {
icon.name: "arrow_ordinary_right"
icon.palette: D.DTK.makeIconPalette(control.palette)
icon.mode: control.D.ColorSelector.controlState
icon.theme: control.D.ColorSelector.controlTheme
icon {
name: "arrow_ordinary_right"
palette: D.DTK.makeIconPalette(control.palette)
mode: control.D.ColorSelector.controlState
theme: control.D.ColorSelector.controlTheme
}
}
onClicked: {
DccApp.showPage(model.item)
Expand Down
2 changes: 1 addition & 1 deletion src/dde-control-center/frame/plugin/DccTitleObject.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "DccUtils.js" as DccUtils
DccObject {
pageType: DccObject.Item
page: Label {
font: DccUtils.copyFont(D.DTK.fontManager.t4, {
font: DccUtils.copyFont(D.DTK.fontManager.t5, {
"bold": true
})
text: dccObj.displayName
Expand Down
26 changes: 11 additions & 15 deletions src/plugin-sound/qml/SpeakerPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@ DccObject {
function toPercent(value: string) {
return Number(value * 100).toFixed(0) + "%"
}
DccObject {
DccTitleObject {
name: "output"
parentName: "sound/outPut"
displayName: qsTr("Output")
weight: 10
pageType: DccObject.Item
page: ColumnLayout {
Label {
Layout.leftMargin: 10
font: DTK.fontManager.t4
text: dccObj.displayName
}
}
}

DccObject {
Expand Down Expand Up @@ -73,9 +65,11 @@ DccObject {
}
IconButton {
Layout.alignment: Qt.AlignVCenter
icon.name: dccData.model().speakerOn ? "qrc:/icons/deepin/builtin/icons/sound_off.dci" : "qrc:/icons/deepin/builtin/icons/small_volume.dci"
icon.width: 24
icon.height: 24
icon {
name: dccData.model().speakerOn ? "sound_off" : "small_volume"
width: 16
height: 16
}
implicitWidth: 24
flat: !hovered

Expand All @@ -98,9 +92,11 @@ DccObject {
}
}
IconButton {
icon.name: "qrc:/icons/deepin/builtin/icons/big_volume.dci"
icon.width: 24
icon.height: 24
icon {
name: "big_volume"
width: 16
height: 16
}
implicitWidth: 24
background: Rectangle {
color: "transparent" // 背景透明
Expand Down
Binary file added src/plugin-sound/qml/big_volume.dci
Binary file not shown.
Binary file added src/plugin-sound/qml/small_volume.dci
Binary file not shown.
Binary file added src/plugin-sound/qml/sound_off.dci
Binary file not shown.
9 changes: 1 addition & 8 deletions src/plugin-systeminfo/qml/systemInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ import org.deepin.dtk 1.0 as D

import org.deepin.dcc 1.0

DccObject {
DccTitleObject {
id: root
name: "auxiliaryInfo"
parentName: "system"
displayName: qsTr("Auxiliary Information")
weight: 1000
pageType: DccObject.Item
page: Label {
font: DccUtils.copyFont(D.DTK.fontManager.t4, {
"bold": true
})
text: dccObj.displayName
}
onParentItemChanged: {
if (parentItem) {
parentItem.topPadding = 10
Expand Down

0 comments on commit 227114a

Please sign in to comment.