mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
apprt/gtk: alternate approach to setting pane children
This commit is contained in:
@ -204,17 +204,12 @@ pub fn replace(
|
|||||||
const pos = c.gtk_paned_get_position(self.paned);
|
const pos = c.gtk_paned_get_position(self.paned);
|
||||||
defer c.gtk_paned_set_position(self.paned, pos);
|
defer c.gtk_paned_set_position(self.paned, pos);
|
||||||
|
|
||||||
if (ptr == &self.top_left) {
|
// We have to set both to null. If we overwrite the pane with
|
||||||
c.gtk_paned_set_start_child(
|
// the same value, then GTK bugs out (the GL area unrealizes
|
||||||
@ptrCast(self.paned),
|
// and never rerealizes).
|
||||||
self.top_left.widget(),
|
c.gtk_paned_set_start_child(@ptrCast(self.paned), null);
|
||||||
);
|
c.gtk_paned_set_end_child(@ptrCast(self.paned), null);
|
||||||
} else {
|
self.updateChildren();
|
||||||
c.gtk_paned_set_end_child(
|
|
||||||
@ptrCast(self.paned),
|
|
||||||
self.bottom_right.widget(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update the paned children to represent the current state.
|
/// Update the paned children to represent the current state.
|
||||||
|
Reference in New Issue
Block a user