Allow to change the toolbar height when changing the pref toolbar.density in Firefox (bug 1171799)

It's a first step to just dispatch the pref change to the toolbar.
The second one, to effectively use it, will come after PR #18385 is merged.
This commit is contained in:
Calixte Denizet 2024-07-05 17:14:51 +02:00
parent e777ae2258
commit 0910f17a58
4 changed files with 32 additions and 3 deletions

View file

@ -393,7 +393,7 @@ const PDFViewerApplication = {
const { appConfig, externalServices, l10n } = this;
let eventBus;
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
eventBus = new FirefoxEventBus(
eventBus = this.preferences.eventBus = new FirefoxEventBus(
await this._allowedGlobalEventsPromise,
externalServices,
AppOptions.get("isInAutomation")
@ -569,7 +569,11 @@ const PDFViewerApplication = {
await this._nimbusDataPromise
);
} else {
this.toolbar = new Toolbar(appConfig.toolbar, eventBus);
this.toolbar = new Toolbar(
appConfig.toolbar,
eventBus,
AppOptions.get("toolbarDensity")
);
}
}