Fix missing headerbar menu in Flatpak build

This commit is contained in:
Rafał Dzięgiel
2021-02-22 13:14:49 +01:00
parent 0ce851b514
commit 8df5c38357

View File

@@ -137,14 +137,21 @@ class ClapperHeaderBarBase extends Gtk.Box
const layoutArr = modLayout.split(',');
let lastWidget = null;
let showMinimize = false;
let showMaximize = false;
let showClose = false;
let menuAdded = false;
let spacerAdded = false;
debug(`headerbar layout: ${modLayout}`);
for(let name of layoutArr) {
/* Menu might be named "appmenu" */
if(!menuAdded && name === 'appmenu')
name = 'menu';
const widget = this[`${name}Widget`];
if(!widget) continue;
@@ -168,6 +175,7 @@ class ClapperHeaderBarBase extends Gtk.Box
break;
case 'menu':
this.setMenuOnLeft(!spacerAdded);
menuAdded = true;
break;
default:
break;