Add missing "Use Dark Mode for Content" to reader window menu
Fixes #3592
This commit is contained in:
parent
d606644a78
commit
3a3a81b0ed
2 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
<linkset>
|
||||
<html:link rel="localization" href="browser/menubar.ftl"/>
|
||||
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
|
||||
<html:link rel="localization" href="zotero.ftl" />
|
||||
</linkset>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
@ -274,6 +275,14 @@
|
|||
label="&zotero.pdfReader.splitVertically;"
|
||||
oncommand="reader.toggleVerticalSplit()"
|
||||
/>
|
||||
<menuseparator class="menu-type-reader"/>
|
||||
<menuitem
|
||||
id="view-menuitem-use-dark-mode-for-content"
|
||||
class="menu-type-reader"
|
||||
type="checkbox"
|
||||
data-l10n-id="reader-use-dark-mode-for-content"
|
||||
oncommand="Zotero.Prefs.set('reader.contentDarkMode', !Zotero.Prefs.get('reader.contentDarkMode'))"
|
||||
/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu
|
||||
|
|
|
@ -1185,6 +1185,8 @@ class ReaderWindow extends ReaderInstance {
|
|||
}
|
||||
this._window.document.getElementById('view-menuitem-split-vertically').setAttribute('checked', this._internalReader.splitType === 'vertical');
|
||||
this._window.document.getElementById('view-menuitem-split-horizontally').setAttribute('checked', this._internalReader.splitType === 'horizontal');
|
||||
this._window.document.getElementById('view-menuitem-use-dark-mode-for-content').setAttribute('checked', Zotero.Prefs.get('reader.contentDarkMode'));
|
||||
this._window.document.getElementById('view-menuitem-use-dark-mode-for-content').setAttribute('disabled', !this._window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
}
|
||||
|
||||
_onGoMenuOpen() {
|
||||
|
|
Loading…
Add table
Reference in a new issue