Skip to content

Commit 4093969

Browse files
committed
initviz: use larger default window size with adjusted xscale
Change default window size from fixed 750x550 to 95% of screen dimensions for better utilization of available screen space. Increase xscale from 3.0 to 5.0 for the full tree view to compensate for the larger window, preventing content from appearing too zoomed in. This makes the default view more comfortable, equivalent to zooming out about 2-3 clicks from the previous default with the larger window. Adapted from xrmx/bootchart#42 (PATCH 018/182) Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent a7170ed commit 4093969

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

initviz/gui.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,9 @@ def __init__(self, trace, app_options):
735735

736736
window = self
737737
window.set_title("Bootchart %s" % trace.filename)
738-
window.set_default_size(750, 550)
738+
screen = window.get_screen()
739+
window.set_default_size(int(screen.get_width() * 0.95),
740+
int(screen.get_height() * 0.95))
739741

740742
self.trace = trace
741743
self.app_options = app_options
@@ -902,7 +904,7 @@ def __init__(self, trace, app_options):
902904
GObject.timeout_add(5000, lambda: statusbar.pop(0))
903905

904906
full_opts = RenderOptions(app_options)
905-
full_tree = PyBootchartShell(window, trace, full_opts, 3.0)
907+
full_tree = PyBootchartShell(window, trace, full_opts, 5.0)
906908
tab_page.append_page(full_tree, gtk.Label("Full tree"))
907909
self.tabs = [full_tree]
908910

@@ -1250,7 +1252,7 @@ def status(self, msg): print(msg)
12501252

12511253
# Recreate tabs
12521254
full_opts = draw.RenderOptions(self.app_options)
1253-
full_tree = PyBootchartShell(self, new_trace, full_opts, 3.0)
1255+
full_tree = PyBootchartShell(self, new_trace, full_opts, 5.0)
12541256
self.tab_page.append_page(full_tree, gtk.Label("Full tree"))
12551257
self.tabs = [full_tree]
12561258

0 commit comments

Comments
 (0)