Merge pull request #20775 from Snuffleupagus/hide-select-pages

Hide the "Select pages" label, in the thumbnails sidebar, when split-merge is disabled
This commit is contained in:
calixteman 2026-03-02 14:53:15 +01:00 committed by GitHub
commit d859d78bb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -461,6 +461,7 @@ const PDFViewerApplication = {
foreground: AppOptions.get("pageColorsForeground"),
}
: null;
const enableSplitMerge = AppOptions.get("enableSplitMerge");
let altTextManager;
if (AppOptions.get("enableUpdatedAddImage")) {
@ -599,7 +600,7 @@ const PDFViewerApplication = {
pageColors,
abortSignal,
enableHWA,
enableSplitMerge: AppOptions.get("enableSplitMerge"),
enableSplitMerge,
manageMenu: appConfig.viewsManager.manageMenu,
addFileButton: appConfig.viewsManager.viewsManagerAddFileButton,
});
@ -761,6 +762,7 @@ const PDFViewerApplication = {
elements: appConfig.viewsManager,
eventBus,
l10n,
enableSplitMerge,
});
this.viewsManager.onToggled = this.forceRendering.bind(this);
this.viewsManager.onUpdateThumbnails = () => {

View File

@ -98,6 +98,7 @@ class ViewsManager extends Sidebar {
},
eventBus,
l10n,
enableSplitMerge = false,
}) {
super(
{
@ -142,6 +143,11 @@ class ViewsManager extends Sidebar {
this.eventBus = eventBus;
if (!enableSplitMerge) {
viewsManagerStatus.hidden = true;
}
this._enableSplitMerge = enableSplitMerge;
this.menu = new Menu(
viewsManagerSelectorOptions,
viewsManagerSelectorButton,
@ -252,7 +258,9 @@ class ViewsManager extends Sidebar {
return;
}
this.viewsManagerStatus.hidden = view !== SidebarView.THUMBS;
if (this._enableSplitMerge) {
this.viewsManagerStatus.hidden = view !== SidebarView.THUMBS;
}
this.viewsManagerAddFileButton.hidden = view !== SidebarView.THUMBS;
this.viewsManagerCurrentOutlineButton.hidden = view !== SidebarView.OUTLINE;
this.viewsManagerHeaderLabel.setAttribute(