mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
refine macOS and release v3.0.0-beta.1 (#1594)
* refine macos * release v3.0.0-beta.1
This commit is contained in:
parent
847e3d621d
commit
c95e850bb1
2
.github/workflows/ci-linux.yml
vendored
2
.github/workflows/ci-linux.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
VNOTE_VER: 3.0.0
|
||||
VNOTE_VER: 3.0.0-beta.1
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
|
2
.github/workflows/ci-macos.yml
vendored
2
.github/workflows/ci-macos.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
VNOTE_VER: 3.0.0
|
||||
VNOTE_VER: 3.0.0-beta.1
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
|
2
.github/workflows/ci-win.yml
vendored
2
.github/workflows/ci-win.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
VNOTE_VER: 3.0.0
|
||||
VNOTE_VER: 3.0.0-beta.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
20
scripts/update_version.py
Normal file
20
scripts/update_version.py
Normal file
@ -0,0 +1,20 @@
|
||||
import fileinput
|
||||
import sys
|
||||
import re
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Please provide a new version string!")
|
||||
exit
|
||||
|
||||
newVersion = sys.argv[1]
|
||||
print("New version: {0}".format(newVersion))
|
||||
|
||||
# vnotex.json
|
||||
regExp = re.compile('(\\s+)"version" : "\\S+"')
|
||||
for line in fileinput.input(['src/data/core/vnotex.json'], inplace = True):
|
||||
print(regExp.sub('\\1"version" : "' + newVersion + '"', line), end='')
|
||||
|
||||
# ci-xxx.yml
|
||||
regExp = re.compile('(\\s+)VNOTE_VER: \\S+')
|
||||
for line in fileinput.input(['.github/workflows/ci-win.yml', '.github/workflows/ci-linux.yml', '.github/workflows/ci-macos.yml'], inplace = True):
|
||||
print(regExp.sub('\\1VNOTE_VER: ' + newVersion, line), end='')
|
@ -72,7 +72,16 @@ void SessionConfig::loadCore(const QJsonObject &p_session)
|
||||
m_openGL = stringToOpenGL(option);
|
||||
}
|
||||
|
||||
m_systemTitleBarEnabled = readBool(coreObj, QStringLiteral("system_title_bar"));
|
||||
if (coreObj.contains(QStringLiteral("system_title_bar"))) {
|
||||
m_systemTitleBarEnabled = readBool(coreObj, QStringLiteral("system_title_bar"));
|
||||
} else {
|
||||
// Enable system title bar on macOS by default.
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
|
||||
m_systemTitleBarEnabled = true;
|
||||
#else
|
||||
m_systemTitleBarEnabled = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
QJsonObject SessionConfig::saveCore() const
|
||||
|
@ -3,7 +3,7 @@
|
||||
"metadata" : {
|
||||
"//comment": "When releasing new version, please go through the following configs to check if override is needed.",
|
||||
"//Comment": "markdown_editor#override_viewer_resource",
|
||||
"version" : "3.0.0"
|
||||
"version" : "3.0.0-beta.1"
|
||||
},
|
||||
"core" : {
|
||||
"theme" : "native",
|
||||
|
@ -60,7 +60,7 @@
|
||||
"markdown-editor-styles" : {
|
||||
"Text" : {
|
||||
"//comment" : "Support a list of fonts separated by ,",
|
||||
"font-family" : "Hiragino Sans GB, 冬青黑体, YaHei Consolas Hybrid, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Verdana, Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Times New Roman",
|
||||
"font-family" : "冬青黑体, YaHei Consolas Hybrid, Microsoft YaHei, 微软雅黑, Microsoft YaHei UI, WenQuanYi Micro Hei, 文泉驿雅黑, Dengxian, 等线体, STXihei, 华文细黑, Liberation Sans, Droid Sans, NSimSun, 新宋体, SimSun, 宋体, Verdana, Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Times New Roman",
|
||||
"font-size" : 12
|
||||
}
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
body {
|
||||
margin: 0 auto;
|
||||
font-family: "Segoe UI", Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Palatino, "Times New Roman", "Hiragino Sans GB", "冬青黑体", "YaHei Consolas Hybrid", "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "WenQuanYi Micro Hei", "文泉驿雅黑", Dengxian, "等线体", STXihei, "华文细黑", "Liberation Sans", "Droid Sans", NSimSun, "新宋体", SimSun, "宋体";
|
||||
font-family: "Segoe UI", Helvetica, sans-serif, Tahoma, Arial, Geneva, Georgia, Palatino, "Times New Roman", "冬青黑体", "YaHei Consolas Hybrid", "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", "WenQuanYi Micro Hei", "文泉驿雅黑", Dengxian, "等线体", STXihei, "华文细黑", "Liberation Sans", "Droid Sans", NSimSun, "新宋体", SimSun, "宋体";
|
||||
color: #222222;
|
||||
line-height: 1.5;
|
||||
padding: 15px;
|
||||
|
@ -14,7 +14,7 @@ class NodeLineMapper {
|
||||
|
||||
this.headingNodes = [];
|
||||
|
||||
this.smoothAnchorScroll = true;
|
||||
this.smoothAnchorScroll = false;
|
||||
|
||||
window.addEventListener(
|
||||
'scroll',
|
||||
|
@ -318,13 +318,7 @@ void MarkdownViewer::hideUnusedActions(QMenu *p_menu)
|
||||
void MarkdownViewer::handleWebKeyPress(int p_key, bool p_ctrl, bool p_shift, bool p_meta)
|
||||
{
|
||||
Q_UNUSED(p_shift);
|
||||
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
|
||||
bool macCtrl = p_meta;
|
||||
#else
|
||||
Q_UNUSED(p_meta);
|
||||
bool macCtrl = false;
|
||||
#endif
|
||||
|
||||
switch (p_key) {
|
||||
// Esc
|
||||
case 27:
|
||||
@ -332,7 +326,7 @@ void MarkdownViewer::handleWebKeyPress(int p_key, bool p_ctrl, bool p_shift, boo
|
||||
|
||||
// Dash
|
||||
case 189:
|
||||
if (p_ctrl || macCtrl) {
|
||||
if (p_ctrl) {
|
||||
// Zoom out.
|
||||
zoomOut();
|
||||
}
|
||||
@ -340,7 +334,7 @@ void MarkdownViewer::handleWebKeyPress(int p_key, bool p_ctrl, bool p_shift, boo
|
||||
|
||||
// Equal
|
||||
case 187:
|
||||
if (p_ctrl || macCtrl) {
|
||||
if (p_ctrl) {
|
||||
// Zoom in.
|
||||
zoomIn();
|
||||
}
|
||||
@ -348,7 +342,7 @@ void MarkdownViewer::handleWebKeyPress(int p_key, bool p_ctrl, bool p_shift, boo
|
||||
|
||||
// 0
|
||||
case 48:
|
||||
if (p_ctrl || macCtrl) {
|
||||
if (p_ctrl) {
|
||||
// Recover zoom.
|
||||
restoreZoom();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user