mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
f25f06eb93
commit
cae4ab17d2
4 changed files with 13 additions and 2 deletions
|
|
@ -220,6 +220,14 @@ export const editor = {
|
|||
<span class="fn__space"></span>
|
||||
${fontFamilyHTML}
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.fontSizeScrollZoom}
|
||||
<div class="b3-label__text">${window.siyuan.languages.fontSizeScrollZoomTip.replace("Ctrl", updateHotkeyTip("⌘"))}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="fontSizeScrollZoom" type="checkbox"${window.siyuan.config.editor.fontSizeScrollZoom ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex b3-label config__item">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.fontSize}
|
||||
|
|
@ -303,6 +311,7 @@ export const editor = {
|
|||
codeLigatures: (editor.element.querySelector("#codeLigatures") as HTMLInputElement).checked,
|
||||
codeTabSpaces: parseInt((editor.element.querySelector("#codeTabSpaces") as HTMLInputElement).value),
|
||||
fontSize: parseInt((editor.element.querySelector("#fontSize") as HTMLInputElement).value),
|
||||
fontSizeScrollZoom: (editor.element.querySelector("#fontSizeScrollZoom") as HTMLInputElement).checked,
|
||||
generateHistoryInterval: parseInt((editor.element.querySelector("#generateHistoryInterval") as HTMLInputElement).value),
|
||||
historyRetentionDays: parseInt((editor.element.querySelector("#historyRetentionDays") as HTMLInputElement).value),
|
||||
fontFamily: fontFamilyElement.value,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
|
|||
"historyRetentionDays", "historyRetentionDaysTip", "clearHistory", "katexMacros", "katexMacrosTip",
|
||||
"editReadonly", "editReadonlyTip", "embedBlockBreadcrumb", "embedBlockBreadcrumbTip", "outlineOutdentTip",
|
||||
"outdent", "floatWindowMode", "floatWindowModeTip", "justify", "justifyTip", "rtl", "rtlTip", "spellcheck",
|
||||
"spellcheckTip", "backlinkExpand", "backlinkExpandTip", "onlySearchForDocTip", "dynamicLoadBlocks", "dynamicLoadBlocksTip",
|
||||
"spellcheckTip", "backlinkExpand", "backlinkExpandTip", "onlySearchForDocTip", "dynamicLoadBlocks",
|
||||
"dynamicLoadBlocksTip", "fontSizeScrollZoom", "fontSizeScrollZoomTip"
|
||||
]),
|
||||
|
||||
// 文档树
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export const initUI = (protyle: IProtyle) => {
|
|||
let wheelTimeout: number;
|
||||
const isMacOS = isMac();
|
||||
protyle.contentElement.addEventListener("mousewheel", (event: WheelEvent) => {
|
||||
if ((isMacOS && !event.metaKey) || (!isMacOS && !event.ctrlKey) || event.deltaX !== 0) {
|
||||
if (!window.siyuan.config.editor.fontSizeScrollZoom || (isMacOS && !event.metaKey) || (!isMacOS && !event.ctrlKey) || event.deltaX !== 0) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -380,6 +380,7 @@ declare interface IExport {
|
|||
|
||||
declare interface IEditor {
|
||||
justify: boolean;
|
||||
fontSizeScrollZoom: boolean;
|
||||
rtl: boolean;
|
||||
readOnly: boolean;
|
||||
listLogicalOutdent: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue