mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
fix: defer propagation until size allocation
This commit is contained in:
parent
bd022ea1d8
commit
ec004aad5d
@ -221,19 +221,19 @@ class DebugDialog(TextBufferDialog):
|
||||
text=debug,
|
||||
)
|
||||
scrollable = Gtk.ScrolledWindow(
|
||||
propagate_natural_height=True, max_content_height=500
|
||||
propagate_natural_height=False,
|
||||
min_content_height=200,
|
||||
max_content_height=200,
|
||||
margin_bottom=10,
|
||||
)
|
||||
box = Gtk.Box(hexpand=True, vexpand=True, orientation=Gtk.Orientation.VERTICAL)
|
||||
textview = Gtk.TextView(
|
||||
wrap_mode=Gtk.WrapMode.WORD, editable=False, left_margin=10, right_margin=10
|
||||
wrap_mode=Gtk.WrapMode.CHAR, editable=False, left_margin=10, right_margin=10
|
||||
)
|
||||
textview.set_buffer(Gtk.TextBuffer(text=debug))
|
||||
box.pack_start(textview, EXPAND, FILL, 10)
|
||||
scrollable.add(box)
|
||||
scrollable.add(textview)
|
||||
content = self.get_content_area()
|
||||
content.set_spacing(0)
|
||||
content.add(scrollable)
|
||||
self.show_all()
|
||||
|
||||
|
||||
class ExceptionDialog(TextBufferDialog):
|
||||
@ -308,8 +308,6 @@ class ExceptionDialog(TextBufferDialog):
|
||||
content.set_spacing(0)
|
||||
content.add(scrollable)
|
||||
|
||||
self.show_all()
|
||||
|
||||
def _on_page_changed(
|
||||
self, notebook: Gtk.Notebook, child: Gtk.Box | Gtk.ScrolledWindow, index: int
|
||||
) -> None:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user