feat: the main window's skeleton is a UI file
src/ui/main-window.ui holds the window, its two panes, the plot column with the status line under it, and the sidebar's scroller. What stays in code is what depends on the stream: the events pane, the two plot areas, the sidebar's panels and the status popover, each put into a slot by id. The header bar is deliberately not in the file. It is the window's own titlebar, every button on it is wired to an action, and an AdwApplicationWindow refuses a titlebar outright -- a fatal Adwaita-ERROR rather than a warning that leaves the window merely ugly -- so the window is a GtkApplicationWindow and the header bar stays where it was. gtk_paned_set_position() is the other thing that had to stay in code, and the reason is order rather than shape: it clamps against its children *now*, so stating it before the sidebar's panels exist moved the plot column by ~180 px. The layout, events and box-zoom probes read what they read before this change, and the header reads window_button_w=130 bar_w=756 as it always has -- checked by building the previous commit and running the same probe against it, because the layout numbers in the notes turned out to be stale from an earlier session. Five UI files now.
This commit is contained in:
1 parent
68743a7d7f
commit
8073e7b3fd
8 files changed
+196
-70
No files matched your search
@@ -399,6 +399,9 @@ struct App {
|
||||
plot::Figure* area_b_figure = nullptr;
|
||||
std::unique_ptr<RowSet> rows_b;
|
||||
GtkWidget* plot_split = nullptr;
|
||||
/// The main window's builder. Held because the window belongs to its object list: it is replaced on
|
||||
/// the next build rather than reused, and everything found by id comes out of it.
|
||||
GtkBuilder* window_ui = nullptr;
|
||||
bool comparing = false;
|
||||
/// The last x/y range seen on each side of a comparison, one entry per row: a frame compares them
|
||||
/// with the plots' own to tell *which* side the user moved, and copies from that side to the other.
|
||||
|
||||
Reference in new issue
Block a user