Skip to content

Commit

Permalink
fix: Modify the color of the note in the dark theme
Browse files Browse the repository at this point in the history
Modify the color of the note in the dark theme

Log: Modify the color of the note in the dark theme
  • Loading branch information
pengfeixx committed Sep 27, 2024
1 parent a97df7f commit 4530fa2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/common/VNoteMainManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ void VNoteMainManager::renameNote(const int &index, const QString &newName)
VNoteItemOper noteOps(item);
noteOps.modifyNoteTitle(newName);
}
onNoteChanged();
}

void VNoteMainManager::vNoteSearch(const QString &text)
Expand Down
1 change: 1 addition & 0 deletions src/gui/mainwindow/FolderListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ Item {
updateFolderName(newName);
}
isRename = false;
root.forceActiveFocus();
break;
case Qt.Key_Escape:
isRename = false;
Expand Down
10 changes: 6 additions & 4 deletions src/gui/mainwindow/ItemListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Item {
property bool isSelected: false
property var startMove: [-1, -1]

color: isSelected ? "#FF1F6EE7" : "white"
color: isSelected ? "#FF1F6EE7" : (DTK.themeType === ApplicationHelper.LightType ? "white" : "#212944")
height: isSearch ? 67 : 50
radius: 6
width: itemListView.width
Expand All @@ -357,8 +357,10 @@ Item {
if (event.key === Qt.Key_Escape) {
renameLine.text = model.name;
isRename = false;
rootItem.forceActiveFocus();
} else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
isRename = false;
rootItem.forceActiveFocus();
}
} else {
if (event.key === Qt.key_delete) {
Expand All @@ -383,7 +385,7 @@ Item {
Label {
id: noteNameLabel

color: isSelected ? "white" : "black"
color: isSelected ? "white" : (DTK.themeType === ApplicationHelper.LightType ? "black" : "white")
font.pixelSize: 14
height: 18
horizontalAlignment: Text.AlignHLeft
Expand All @@ -395,7 +397,7 @@ Item {
Label {
id: timeLabel

color: isSelected ? "#7FFFFFFF" : "#7F000000"
color: isSelected ? "#7FFFFFFF" : (DTK.themeType === ApplicationHelper.LightType ? "#7F000000" : "#7FFFFFFF")
font.pixelSize: 10
height: 15
horizontalAlignment: Text.AlignHLeft
Expand Down Expand Up @@ -426,7 +428,7 @@ Item {
model.name = text;
VNoteMainManager.renameNote(model.noteId, text);
} else {
renameLine.text = model.text;
renameLine.text = model.name;
}
noteItemMouseArea.enabled = true;
rootItemDelegate.isRename = false;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mainwindow/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ ApplicationWindow {

Rectangle {
anchors.right: parent.right
color: DTK.themeType === ApplicationHelper.LightType ? "#eee7e7e7" : "#ee252525"
color: DTK.themeType === ApplicationHelper.LightType ? "#eee7e7e7" : "#151A3A"
height: parent.height
width: 1
}
Expand Down

0 comments on commit 4530fa2

Please sign in to comment.