mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
apprt/gtk-ng: setup tab views in blueprint
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
// TODO:gtk-tabs-location
|
||||
// TODO:gtk-toolbar-style
|
||||
template $GhosttyWindow: Adw.ApplicationWindow {
|
||||
styles [
|
||||
"window",
|
||||
@ -18,38 +19,64 @@ template $GhosttyWindow: Adw.ApplicationWindow {
|
||||
handle-menubar-accel: false;
|
||||
title: bind (template.active-surface as <$GhosttySurface>).title;
|
||||
|
||||
content: Box {
|
||||
orientation: vertical;
|
||||
content: Adw.TabOverview tab_overview {
|
||||
enable-new-tab: true;
|
||||
view: tab_view;
|
||||
|
||||
Adw.HeaderBar {
|
||||
visible: bind template.headerbar-visible;
|
||||
Adw.ToolbarView {
|
||||
top-bar-style: raised;
|
||||
bottom-bar-style: raised;
|
||||
|
||||
title-widget: Adw.WindowTitle {
|
||||
title: bind (template.active-surface as <$GhosttySurface>).title;
|
||||
};
|
||||
[top]
|
||||
Adw.HeaderBar {
|
||||
visible: bind template.headerbar-visible;
|
||||
|
||||
[end]
|
||||
Gtk.Box {
|
||||
Gtk.MenuButton {
|
||||
notify::active => $notify_menu_active();
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: main_menu;
|
||||
tooltip-text: _("Main Menu");
|
||||
can-focus: false;
|
||||
title-widget: Adw.WindowTitle {
|
||||
title: bind (template.active-surface as <$GhosttySurface>).title;
|
||||
};
|
||||
|
||||
[end]
|
||||
Gtk.Box {
|
||||
Gtk.ToggleButton {
|
||||
icon-name: "view-grid-symbolic";
|
||||
tooltip-text: _("View Open Tabs");
|
||||
active: bind tab_overview.open bidirectional;
|
||||
can-focus: false;
|
||||
focus-on-click: false;
|
||||
}
|
||||
|
||||
Gtk.MenuButton {
|
||||
notify::active => $notify_menu_active();
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: main_menu;
|
||||
tooltip-text: _("Main Menu");
|
||||
can-focus: false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GhosttyDebugWarning {
|
||||
visible: bind template.debug;
|
||||
}
|
||||
[top]
|
||||
Adw.TabBar tab_bar {
|
||||
view: tab_view;
|
||||
}
|
||||
|
||||
Adw.ToastOverlay toast_overlay {
|
||||
$GhosttySurface surface {
|
||||
close-request => $surface_close_request();
|
||||
clipboard-write => $surface_clipboard_write();
|
||||
toggle-fullscreen => $surface_toggle_fullscreen();
|
||||
toggle-maximize => $surface_toggle_maximize();
|
||||
Box {
|
||||
orientation: vertical;
|
||||
|
||||
$GhosttyDebugWarning {
|
||||
visible: bind template.debug;
|
||||
}
|
||||
|
||||
Adw.ToastOverlay toast_overlay {
|
||||
Adw.TabView tab_view {
|
||||
$GhosttySurface surface {
|
||||
close-request => $surface_close_request();
|
||||
clipboard-write => $surface_clipboard_write();
|
||||
toggle-fullscreen => $surface_toggle_fullscreen();
|
||||
toggle-maximize => $surface_toggle_maximize();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user