diff --git a/README.md b/README.md index e373e0a1..aa2557ee 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A pleasant note-taking platform. -For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote). +For more information, please visit [**VNote's Home Page**](https://vnotex.github.io/vnote) or [Home Page on Gitee](https://tamlok.gitee.io/vnote).  diff --git a/README_zh_CN.md b/README_zh_CN.md index b451b100..66f4cfbc 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -5,7 +5,7 @@ 一个舒适的笔记平台! -更多信息,请访问 [VNote 主页](https://vnotex.github.io/vnote) 。 +更多信息,请访问 [VNote 主页](https://tamlok.gitee.io/vnote) 或者 [Gitee 托管主页](https://tamlok.gitee.io/vnote) 。  diff --git a/libs/vtextedit b/libs/vtextedit index 83f131ed..34ad7467 160000 --- a/libs/vtextedit +++ b/libs/vtextedit @@ -1 +1 @@ -Subproject commit 83f131edfa70ffce125f4f7ac4f9f75bf5f03078 +Subproject commit 34ad7467eb42b5d1d228228d875a7675814f222b diff --git a/src/core/coreconfig.h b/src/core/coreconfig.h index 75461d38..6ada3757 100644 --- a/src/core/coreconfig.h +++ b/src/core/coreconfig.h @@ -53,6 +53,10 @@ namespace vnotex ActivatePreviousTab, FocusContentArea, OpenWithDefaultProgram, + OneSplitLeft, + OneSplitDown, + OneSplitUp, + OneSplitRight, MaxShortcut }; Q_ENUM(Shortcut) diff --git a/src/core/mainconfig.cpp b/src/core/mainconfig.cpp index c9151277..0a004336 100644 --- a/src/core/mainconfig.cpp +++ b/src/core/mainconfig.cpp @@ -117,5 +117,5 @@ QString MainConfig::getVersion(const QJsonObject &p_jobj) void MainConfig::doVersionSpecificOverride() { // In a new version, we may want to change one value by force. - m_coreConfig->m_shortcuts[CoreConfig::Shortcut::SearchDock].clear(); + m_coreConfig->m_shortcuts[CoreConfig::Shortcut::LocationListDock] = "Ctrl+G, C"; } diff --git a/src/data/core/vnotex.json b/src/data/core/vnotex.json index ccbaef69..70cc8907 100644 --- a/src/data/core/vnotex.json +++ b/src/data/core/vnotex.json @@ -19,7 +19,7 @@ "OutlineDock" : "Ctrl+G, U", "SearchDock" : "", "SnippetDock" : "Ctrl+G, S", - "LocationListDock" : "Ctrl+G, L", + "LocationListDock" : "Ctrl+G, C", "Search" : "Ctrl+Alt+F", "NavigationMode" : "Ctrl+G, W", "LocateNode" : "Ctrl+G, D", @@ -46,7 +46,11 @@ "ActivateNextTab" : "Ctrl+G, N", "ActivatePreviousTab" : "Ctrl+G, P", "FocusContentArea" : "Ctrl+G, Y", - "OpenWithDefaultProgram" : "F9" + "OpenWithDefaultProgram" : "F9", + "OneSplitLeft" : "Ctrl+G, H", + "OneSplitDown" : "Ctrl+G, J", + "OneSplitUp" : "Ctrl+G, K", + "OneSplitRight" : "Ctrl+G, L" }, "toolbar_icon_size" : 16, "note_management" : { diff --git a/src/data/extra/docs/en/about_vnotex.txt b/src/data/extra/docs/en/about_vnotex.txt index 6ccba5ad..28f71978 100644 --- a/src/data/extra/docs/en/about_vnotex.txt +++ b/src/data/extra/docs/en/about_vnotex.txt @@ -1,5 +1,5 @@
-VNoteX is designed to be a pleasant note-taking platform, refactored from VNote, which is an open source note-taking application for Markdown since 2016. VNote shares most of the code base with VNoteX since version 3 and continue to be open source.
+VNoteX is designed to be a pleasant note-taking platform, refactored from VNote, which is an open source note-taking application for Markdown since 2016. VNote shares most of the code base with VNoteX since version 3 and continues to be open source.
Source code of VNote could be found at GitHub.
diff --git a/src/data/extra/docs/en/shortcuts.md b/src/data/extra/docs/en/shortcuts.md
index cde7d096..a9341201 100644
--- a/src/data/extra/docs/en/shortcuts.md
+++ b/src/data/extra/docs/en/shortcuts.md
@@ -1,6 +1,7 @@
# Shortcuts
1. All the keys without special notice are **case insensitive**;
-2. On macOS, `Ctrl` corresponds to `Command` except in Vi mode.
+2. On macOS, `Ctrl` corresponds to `Command` except in Vi mode;
+3. For a complete shortcuts list, please view the `vnotex.json` configuration file.
## General
- `Ctrl+G E`
diff --git a/src/data/extra/docs/zh_CN/shortcuts.md b/src/data/extra/docs/zh_CN/shortcuts.md
index aa0c70c8..2c4c6689 100644
--- a/src/data/extra/docs/zh_CN/shortcuts.md
+++ b/src/data/extra/docs/zh_CN/shortcuts.md
@@ -1,6 +1,7 @@
# 快捷键
1. 以下按键除特别说明外,都不区分大小写;
-2. 在 macOS 下,`Ctrl`对应于`Command`,在 Vi 模式下除外。
+2. 在 macOS 下,`Ctrl`对应于`Command`,在 Vi 模式下除外;
+3. 可以通过查看配置文件 `vnotex.json` 来获取一个完整的快捷键列表。
## 通用
- `Ctrl+G E`
diff --git a/src/data/extra/themes/moonlight/interface.qss b/src/data/extra/themes/moonlight/interface.qss
index c8e032da..6a8bb25d 100644
--- a/src/data/extra/themes/moonlight/interface.qss
+++ b/src/data/extra/themes/moonlight/interface.qss
@@ -1126,6 +1126,10 @@ vnotex--ViewSplit QTabBar::tab:selected {
background-color: @widgets#viewsplit#tabbar#tab#selected#bg;
}
+vnotex--ViewSplit QTabBar[ViewSplitFlash="true"]::tab:selected {
+ background-color: @widgets#viewsplit#flash#bg;
+}
+
vte--VTextEdit {
border: none;
}
diff --git a/src/data/extra/themes/moonlight/palette.json b/src/data/extra/themes/moonlight/palette.json
index 8f5fc181..9cadfe0c 100644
--- a/src/data/extra/themes/moonlight/palette.json
+++ b/src/data/extra/themes/moonlight/palette.json
@@ -252,6 +252,9 @@
"bg" : "@base#content#bg"
}
}
+ },
+ "flash" : {
+ "bg" : "@base#master#alt"
}
},
"qmainwindow" : {
diff --git a/src/data/extra/themes/native/interface.qss b/src/data/extra/themes/native/interface.qss
index 380a7eb8..cb47fda9 100644
--- a/src/data/extra/themes/native/interface.qss
+++ b/src/data/extra/themes/native/interface.qss
@@ -123,3 +123,7 @@ vnotex--MainWindow QLabel#MainWindowTipsLabel {
font-size: 18pt;
font-weight: bold;
}
+
+vnotex--ViewSplit QTabBar[ViewSplitFlash="true"]::tab:selected {
+ background-color: @widgets#viewsplit#flash#bg;
+}
diff --git a/src/data/extra/themes/native/palette.json b/src/data/extra/themes/native/palette.json
index ea0f4075..e9f2bc96 100644
--- a/src/data/extra/themes/native/palette.json
+++ b/src/data/extra/themes/native/palette.json
@@ -103,6 +103,9 @@
"active" : {
"fg" : "@base#icon#fg"
}
+ },
+ "flash" : {
+ "bg" : "@base#lighter#fg"
}
},
"qmainwindow" : {
diff --git a/src/data/extra/themes/pure/interface.qss b/src/data/extra/themes/pure/interface.qss
index c8e032da..6a8bb25d 100644
--- a/src/data/extra/themes/pure/interface.qss
+++ b/src/data/extra/themes/pure/interface.qss
@@ -1126,6 +1126,10 @@ vnotex--ViewSplit QTabBar::tab:selected {
background-color: @widgets#viewsplit#tabbar#tab#selected#bg;
}
+vnotex--ViewSplit QTabBar[ViewSplitFlash="true"]::tab:selected {
+ background-color: @widgets#viewsplit#flash#bg;
+}
+
vte--VTextEdit {
border: none;
}
diff --git a/src/data/extra/themes/pure/palette.json b/src/data/extra/themes/pure/palette.json
index 23fa17dd..89363361 100644
--- a/src/data/extra/themes/pure/palette.json
+++ b/src/data/extra/themes/pure/palette.json
@@ -248,6 +248,9 @@
"bg" : "@base#content#bg"
}
}
+ },
+ "flash" : {
+ "bg" : "@base#master#alt"
}
},
"qmainwindow" : {
diff --git a/src/widgets/notebooknodeexplorer.cpp b/src/widgets/notebooknodeexplorer.cpp
index 122ca0fa..40da1d0c 100644
--- a/src/widgets/notebooknodeexplorer.cpp
+++ b/src/widgets/notebooknodeexplorer.cpp
@@ -581,6 +581,11 @@ void NotebookNodeExplorer::updateNode(Node *p_node)
item->setExpanded(expanded);
} else {
+ if (m_notebook->isRecycleBinNode(p_node) && !m_recycleBinNodeVisible) {
+ // No need to update.
+ return;
+ }
+
saveNotebookTreeState(false);
generateNodeTree();
diff --git a/src/widgets/propertydefs.cpp b/src/widgets/propertydefs.cpp
index cc9f3d5f..71ca41f3 100644
--- a/src/widgets/propertydefs.cpp
+++ b/src/widgets/propertydefs.cpp
@@ -12,6 +12,8 @@ const char *PropertyDefs::c_dialogCentralWidget = "DialogCentralWidget";
const char *PropertyDefs::c_viewSplitCornerWidget = "ViewSplitCornerWidget";
+const char *PropertyDefs::c_viewSplitFlash = "ViewSplitFlash";
+
const char *PropertyDefs::c_state = "State";
const char *PropertyDefs::c_viewWindowToolBar = "ViewWindowToolBar";
diff --git a/src/widgets/propertydefs.h b/src/widgets/propertydefs.h
index 7e2df928..33f6ffaf 100644
--- a/src/widgets/propertydefs.h
+++ b/src/widgets/propertydefs.h
@@ -19,6 +19,8 @@ namespace vnotex
static const char *c_viewSplitCornerWidget;
+ static const char *c_viewSplitFlash;
+
static const char *c_viewWindowToolBar;
static const char *c_consoleTextEdit;
diff --git a/src/widgets/toolbarhelper.cpp b/src/widgets/toolbarhelper.cpp
index 534c3a36..fa79f798 100644
--- a/src/widgets/toolbarhelper.cpp
+++ b/src/widgets/toolbarhelper.cpp
@@ -83,9 +83,9 @@ QToolBar *ToolBarHelper::setupFileToolBar(MainWindow *p_win, QToolBar *p_toolBar
emit VNoteX::getInst().importNotebookRequested();
});
- // Import notebook of VNote 2.0.
+ // Import notebook of VNote 2.
btnMenu->addAction(generateIcon("import_notebook_of_vnote2.svg"),
- MainWindow::tr("Import Legacy Notebook Of VNote 2.0"),
+ MainWindow::tr("Import Legacy Notebook Of VNote 2"),
btnMenu,
[]() {
emit VNoteX::getInst().importLegacyNotebookRequested();
diff --git a/src/widgets/viewarea.cpp b/src/widgets/viewarea.cpp
index 6abe3a37..914fe002 100644
--- a/src/widgets/viewarea.cpp
+++ b/src/widgets/viewarea.cpp
@@ -12,13 +12,15 @@
#include