This commit is contained in:
Mi Ramon 2026-08-27 22:39:05 +02:00 committed by GitHub
commit 02196a73a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 2 deletions

View file

@ -246,6 +246,22 @@
preference="extensions.zotero.openNoteInNewWindow"
native="true"
/>
<vbox class="fileHandler-menus">
<label data-l10n-id="preferences-note-content-view" control="note-content-view-mode"/>
<menulist id="note-content-view-mode" preference="extensions.zotero.note.contentViewMode" native="true">
<menupopup>
<menuitem data-l10n-id="preferences-note-content-view-wide" value="wide"/>
<menuitem data-l10n-id="preferences-note-content-view-comfortable" value="comfortable"/>
</menupopup>
</menulist>
<label data-l10n-id="preferences-note-tab-content-view" control="note-tab-content-view-mode"/>
<menulist id="note-tab-content-view-mode" preference="extensions.zotero.note.tabContentViewMode" native="true">
<menupopup>
<menuitem data-l10n-id="preferences-note-content-view-wide" value="wide"/>
<menuitem data-l10n-id="preferences-note-content-view-comfortable" value="comfortable"/>
</menupopup>
</menulist>
</vbox>
</groupbox>
<groupbox id="zotero-prefpane-locate-groupbox" aria-label="&zotero.preferences.prefpane.locate;" aria-describedby="preferences-locate-library-lookup-intro">

View file

@ -103,6 +103,8 @@ class EditorInstance {
Zotero.Prefs.registerObserver('note.fontSize', this._handleFontChange),
Zotero.Prefs.registerObserver('note.tabFontSize', this._handleFontChange),
Zotero.Prefs.registerObserver('note.fontFamily', this._handleFontChange),
Zotero.Prefs.registerObserver('note.contentViewMode', this._handleContentViewModeChange),
Zotero.Prefs.registerObserver('note.tabContentViewMode', this._handleContentViewModeChange),
Zotero.Prefs.registerObserver('note.css', this._handleStyleChange),
Zotero.Prefs.registerObserver('layout.spellcheckDefault', this._handleSpellCheckChange, true)
];
@ -450,8 +452,8 @@ class EditorInstance {
}
_getContentViewMode() {
// TODO: Use prefs
return this._tabID ? 'comfortable' : 'wide';
let contentViewModePrefKey = this._tabID ? 'note.tabContentViewMode' : 'note.contentViewMode';
return Zotero.Prefs.get(contentViewModePrefKey) || 'wide';
}
_handleFontChange = () => {

View file

@ -40,6 +40,12 @@ preferences-read-aloud-highlight-granularity-word =
preferences-note-title = Notes
preferences-note-open-in-new-window =
.label = Open notes in new windows instead of tabs
preferences-note-content-view = Note content width
preferences-note-tab-content-view = Note tab content width
preferences-note-content-view-wide =
.label = Full width
preferences-note-content-view-comfortable =
.label = Readable width
preferences-color-scheme = Color Scheme:
preferences-color-scheme-auto =

View file

@ -213,6 +213,8 @@ pref("extensions.zotero.fileHandler.snapshot", "");
pref("extensions.zotero.openReaderInNewWindow", false);
pref("extensions.zotero.openNoteInNewWindow", false);
pref("extensions.zotero.note.contentViewMode", "wide");
pref("extensions.zotero.note.tabContentViewMode", "comfortable");
// File/URL opening executable if launch() fails
pref("extensions.zotero.fallbackLauncher.unix", "/usr/bin/xdg-open");