mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
apprt/gtk: only setup the toast overlay if we have it enabled
This commit is contained in:
@ -206,15 +206,19 @@ pub fn init(self: *Window, app: *App) !void {
|
|||||||
c.gtk_box_append(@ptrCast(box), warning_box);
|
c.gtk_box_append(@ptrCast(box), warning_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.toast_overlay = if (self.isAdwWindow())
|
|
||||||
c.adw_toast_overlay_new()
|
|
||||||
else
|
|
||||||
null;
|
|
||||||
|
|
||||||
// Setup our notebook
|
// Setup our notebook
|
||||||
self.notebook = Notebook.create(self);
|
self.notebook = Notebook.create(self);
|
||||||
c.adw_toast_overlay_set_child(@ptrCast(self.toast_overlay), @ptrCast(@alignCast(self.notebook.asWidget())));
|
|
||||||
c.gtk_box_append(@ptrCast(box), self.toast_overlay);
|
// Setup our toast overlay if we have one
|
||||||
|
self.toast_overlay = if (self.isAdwWindow()) toast: {
|
||||||
|
const toast_overlay = c.adw_toast_overlay_new();
|
||||||
|
c.adw_toast_overlay_set_child(
|
||||||
|
@ptrCast(toast_overlay),
|
||||||
|
@ptrCast(@alignCast(self.notebook.asWidget())),
|
||||||
|
);
|
||||||
|
c.gtk_box_append(@ptrCast(box), toast_overlay);
|
||||||
|
break :toast toast_overlay;
|
||||||
|
} else null;
|
||||||
|
|
||||||
// If we have a tab overview then we can set it on our notebook.
|
// If we have a tab overview then we can set it on our notebook.
|
||||||
if (tab_overview_) |tab_overview| {
|
if (tab_overview_) |tab_overview| {
|
||||||
|
Reference in New Issue
Block a user