diff options
Diffstat (limited to 'app/src/widgets/participant_row.cpp')
| -rw-r--r-- | app/src/widgets/participant_row.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/app/src/widgets/participant_row.cpp b/app/src/widgets/participant_row.cpp index 3494834..87cc217 100644 --- a/app/src/widgets/participant_row.cpp +++ b/app/src/widgets/participant_row.cpp @@ -73,14 +73,14 @@ namespace turns::app::widgets if (participant) { - Glib::Binding::bind_property(participant->property_name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE); + Glib::Binding::bind_property(participant->name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE); - Glib::Binding::bind_property(participant->property_priority(), + Glib::Binding::bind_property(participant->priority(), m_subtitle->property_label(), Glib::Binding::Flags::SYNC_CREATE, [](auto n) { return std::vformat(_(lang::priority_number), std::make_format_args(n)); }); - Glib::Binding::bind_property(participant->property_disposition(), + Glib::Binding::bind_property(participant->disposition(), m_toggle_defeated->property_css_classes(), Glib::Binding::Flags::SYNC_CREATE, [this](auto value) { @@ -92,6 +92,19 @@ namespace turns::app::widgets classes.push_back(css_class_for(value)); return classes; }); + + Glib::Binding::bind_property(participant->is_active(), property_css_classes(), Glib::Binding::Flags::SYNC_CREATE, [this](auto value) { + auto classes = get_css_classes(); + if (!value) + { + std::erase(classes, "active-participant"); + } + else + { + classes.push_back("active-participant"); + } + return classes; + }); } } |
