mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +03:00
add gtk-tabs-location
This commit is contained in:
@ -112,7 +112,13 @@ pub fn init(self: *Window, app: *App) !void {
|
|||||||
const notebook_widget = c.gtk_notebook_new();
|
const notebook_widget = c.gtk_notebook_new();
|
||||||
const notebook: *c.GtkNotebook = @ptrCast(notebook_widget);
|
const notebook: *c.GtkNotebook = @ptrCast(notebook_widget);
|
||||||
self.notebook = notebook;
|
self.notebook = notebook;
|
||||||
c.gtk_notebook_set_tab_pos(notebook, c.GTK_POS_TOP);
|
const notebook_tab_pos: c_uint = switch (app.config.@"gtk-tabs-location") {
|
||||||
|
.top => c.GTK_POS_TOP,
|
||||||
|
.bottom => c.GTK_POS_BOTTOM,
|
||||||
|
.left => c.GTK_POS_LEFT,
|
||||||
|
.right => c.GTK_POS_RIGHT,
|
||||||
|
};
|
||||||
|
c.gtk_notebook_set_tab_pos(notebook, notebook_tab_pos);
|
||||||
c.gtk_notebook_set_scrollable(notebook, 1);
|
c.gtk_notebook_set_scrollable(notebook, 1);
|
||||||
c.gtk_notebook_set_show_tabs(notebook, 0);
|
c.gtk_notebook_set_show_tabs(notebook, 0);
|
||||||
c.gtk_notebook_set_show_border(notebook, 0);
|
c.gtk_notebook_set_show_border(notebook, 0);
|
||||||
|
@ -949,6 +949,10 @@ keybind: Keybinds = .{},
|
|||||||
/// so you can test single instance without conflicting with release builds.
|
/// so you can test single instance without conflicting with release builds.
|
||||||
@"gtk-single-instance": GtkSingleInstance = .desktop,
|
@"gtk-single-instance": GtkSingleInstance = .desktop,
|
||||||
|
|
||||||
|
/// Determines the side of the screen that the GTK tab bar will stick to.
|
||||||
|
/// Top, bottom, left, and right are supported. The default is top.
|
||||||
|
@"gtk-tabs-location": GtkTabsLocation = .top,
|
||||||
|
|
||||||
/// If `true` (default), then the Ghostty GTK tabs will be "wide." Wide tabs
|
/// If `true` (default), then the Ghostty GTK tabs will be "wide." Wide tabs
|
||||||
/// are the new typical Gnome style where tabs fill their available space.
|
/// are the new typical Gnome style where tabs fill their available space.
|
||||||
/// If you set this to `false` then tabs will only take up space they need,
|
/// If you set this to `false` then tabs will only take up space they need,
|
||||||
@ -3378,6 +3382,14 @@ pub const GtkSingleInstance = enum {
|
|||||||
true,
|
true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// See gtk-tabs-location
|
||||||
|
pub const GtkTabsLocation = enum {
|
||||||
|
top,
|
||||||
|
bottom,
|
||||||
|
left,
|
||||||
|
right,
|
||||||
|
};
|
||||||
|
|
||||||
/// See mouse-shift-capture
|
/// See mouse-shift-capture
|
||||||
pub const MouseShiftCapture = enum {
|
pub const MouseShiftCapture = enum {
|
||||||
false,
|
false,
|
||||||
|
Reference in New Issue
Block a user