diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-16 15:59:45 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-16 16:00:32 +0200 |
| commit | 92fc3900c9d3084dd4d0d2386ab4d823e356da20 (patch) | |
| tree | 9240907e95bb58cc5acccbf4885640f3c2909919 /app/src | |
| parent | 1e90e6ff6ca16b39c813b73562e1ce37bc8f01a2 (diff) | |
| download | turns-92fc3900c9d3084dd4d0d2386ab4d823e356da20.tar.xz turns-92fc3900c9d3084dd4d0d2386ab4d823e356da20.zip | |
app/ui: add basic tracking UI definition
As part of #5, this change adds the basic definition of the turn
tracking UI. As of now, the UI is not functional due to several missing
window actions. Additionally, the UI is not only revealed when a turn
order is started (as there is no infrastructure in place to manage the
lifecycle of a turn order yet), but when the turn order is not empty.
Diffstat (limited to 'app/src')
| -rw-r--r-- | app/src/windows/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/windows/main.cpp b/app/src/windows/main.cpp index 04d7329..a532dc0 100644 --- a/app/src/windows/main.cpp +++ b/app/src/windows/main.cpp @@ -26,6 +26,7 @@ namespace turns::app::windows main::main(BaseObjectType * base, Glib::RefPtr<Gtk::Builder> const builder) : Gtk::ApplicationWindow{base} , m_adw{ADW_APPLICATION_WINDOW(gobj())} + , m_controls{builder->get_widget<Gtk::Revealer>("controls")} , m_empty(builder->get_widget<Gtk::Widget>("empty")) , m_stack{builder->get_widget<Gtk::Stack>("stack")} , m_title(ADW_WINDOW_TITLE(builder->get_widget<Gtk::Widget>("title")->gobj())) @@ -40,6 +41,10 @@ namespace turns::app::windows m_clear_action->property_enabled(), Glib::Binding::Flags::SYNC_CREATE); + m_controls_revealed = Glib::Binding::bind_property(m_turn_order->property_n_items(), + m_controls->property_reveal_child(), + Glib::Binding::Flags::SYNC_CREATE); + m_visible_child_widget = Glib::Binding::bind_property(m_turn_order->property_n_items(), m_stack->property_visible_child(), Glib::Binding::Flags::SYNC_CREATE, |
