💄 Only add headerbar on GTK4

This commit is contained in:
Simon Schneegans
2022-01-27 05:52:49 +01:00
parent 38458e4a4c
commit a8d75de4c9
+4 -2
View File
@@ -338,8 +338,10 @@ var PreferencesDialog = class PreferencesDialog {
}); });
// Add a header bar to the window. // Add a header bar to the window.
const header = Gtk.HeaderBar.new(); if (utils.isGTK4()) {
window.set_titlebar(header); const header = Gtk.HeaderBar.new();
window.set_titlebar(header);
}
const box = new Gtk.Box({ const box = new Gtk.Box({
orientation: Gtk.Orientation.VERTICAL, orientation: Gtk.Orientation.VERTICAL,