mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Fix missing headerbar menu in Flatpak build
This commit is contained in:
@@ -137,14 +137,21 @@ class ClapperHeaderBarBase extends Gtk.Box
|
|||||||
const layoutArr = modLayout.split(',');
|
const layoutArr = modLayout.split(',');
|
||||||
|
|
||||||
let lastWidget = null;
|
let lastWidget = null;
|
||||||
|
|
||||||
let showMinimize = false;
|
let showMinimize = false;
|
||||||
let showMaximize = false;
|
let showMaximize = false;
|
||||||
let showClose = false;
|
let showClose = false;
|
||||||
|
|
||||||
|
let menuAdded = false;
|
||||||
let spacerAdded = false;
|
let spacerAdded = false;
|
||||||
|
|
||||||
debug(`headerbar layout: ${modLayout}`);
|
debug(`headerbar layout: ${modLayout}`);
|
||||||
|
|
||||||
for(let name of layoutArr) {
|
for(let name of layoutArr) {
|
||||||
|
/* Menu might be named "appmenu" */
|
||||||
|
if(!menuAdded && name === 'appmenu')
|
||||||
|
name = 'menu';
|
||||||
|
|
||||||
const widget = this[`${name}Widget`];
|
const widget = this[`${name}Widget`];
|
||||||
if(!widget) continue;
|
if(!widget) continue;
|
||||||
|
|
||||||
@@ -168,6 +175,7 @@ class ClapperHeaderBarBase extends Gtk.Box
|
|||||||
break;
|
break;
|
||||||
case 'menu':
|
case 'menu':
|
||||||
this.setMenuOnLeft(!spacerAdded);
|
this.setMenuOnLeft(!spacerAdded);
|
||||||
|
menuAdded = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user