Skip to content

Commit bc5e472

Browse files
re2zerodeepin-bot[bot]
authored andcommitted
fix: Fix text color issue after change theme
After change the theme, the text color is not changed to highlight. Log: Fix dialog text color issue after change theme. Bug: https://pms.uniontech.com/bug-view-307703.html https://pms.uniontech.com/bug-view-300269.html
1 parent e5abaa3 commit bc5e472

File tree

7 files changed

+7
-18
lines changed

7 files changed

+7
-18
lines changed

src/qml/Control/DeleteDialog.qml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,7 @@ DialogWindow {
7474
horizontalCenter: parent.horizontalCenter
7575
}
7676

77-
property Palette textColor: Palette {
78-
normal: ("black")
79-
normalDark: ("white")
80-
}
81-
82-
color: ColorSelector.textColor
77+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
8378
font: DTK.fontManager.t5
8479
verticalAlignment: Text.AlignBottom
8580
horizontalAlignment: Text.AlignHCenter

src/qml/Control/ExportDialog.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ DialogWindow {
5151
leftMargin: 46
5252
top: parent.top
5353
}
54+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
5455
font: DTK.fontManager.t5
5556
text: qsTr("Export")
5657
verticalAlignment: Text.AlignBottom

src/qml/Control/NewAlbumDialog.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ DialogWindow {
5151
leftMargin: 46
5252
top: parent.top
5353
}
54+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
5455
font: DTK.fontManager.t5
5556
text: qsTr("New Album")
5657
verticalAlignment: Text.AlignBottom

src/qml/Control/RemoveAlbumDialog.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ DialogWindow {
3737
top: parent.top
3838
horizontalCenter: parent.horizontalCenter
3939
}
40+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
4041
font: DTK.fontManager.t5
4142
text: qsTr("Are you sure you want to delete this album?")
4243
verticalAlignment: Text.AlignBottom

src/qml/PopProgress/StandardProgressDialog.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ FloatingPanel {
3939
height: 24
4040
font: DTK.fontManager.t5
4141
text: ""
42-
color: Qt.rgba(0,0,0)
42+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
4343
}
4444

4545
Rectangle {

src/qml/PreviewImageViewer/Dialog/RemoveDialog.qml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,9 @@ DialogWindow {
5858
Label {
5959
id: notifyText
6060

61-
property Palette textColor: Palette {
62-
normal: ("black")
63-
normalDark: ("white")
64-
}
65-
6661
Layout.alignment: Qt.AlignCenter
6762
Layout.fillWidth: true
68-
color: ColorSelector.textColor
63+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
6964
font: DTK.fontManager.t5
7065
horizontalAlignment: Text.AlignHCenter
7166
text: qsTr("Cannot move \"%1\" to the trash. Do you want to permanently delete it?").arg(textMetics.elidedText)

src/qml/PreviewImageViewer/ReName.qml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,8 @@ DialogWindow {
5858
Text {
5959
id: renametitle
6060

61-
property Palette textColor: Palette {
62-
normal: ("black")
63-
normalDark: ("white")
64-
}
6561

66-
color: ColorSelector.textColor
62+
color: DTK.themeType === ApplicationHelper.LightType ? "black" : "white"
6763
font.pixelSize: 16
6864
height: 24
6965
horizontalAlignment: Text.AlignHCenter

0 commit comments

Comments
 (0)