diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-16 13:02:46 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-16 13:02:46 +0200 |
| commit | 44d2614a260d2b029a79c59ee7fdd45e1958feb8 (patch) | |
| tree | a39e043acf3b9f86f570b2b376d61dd3b5d68124 /app/src/widgets/participant_row.cpp | |
| parent | 5bb826fa63b2b2d6f7b8bca354fa4a1606781dc3 (diff) | |
| download | turns-44d2614a260d2b029a79c59ee7fdd45e1958feb8.tar.xz turns-44d2614a260d2b029a79c59ee7fdd45e1958feb8.zip | |
app: extract turn order view
Diffstat (limited to 'app/src/widgets/participant_row.cpp')
| -rw-r--r-- | app/src/widgets/participant_row.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/app/src/widgets/participant_row.cpp b/app/src/widgets/participant_row.cpp index 9e0419a..75321e5 100644 --- a/app/src/widgets/participant_row.cpp +++ b/app/src/widgets/participant_row.cpp @@ -45,22 +45,14 @@ namespace turns::app::widgets if (participant) { - set_title(participant->get_name()); - auto priority = participant->get_priority(); - set_subtitle(std::vformat(_(lang::priority_number), std::make_format_args(priority))); - } - } - - auto participant_row::set_subtitle(Glib::ustring const & value) -> void - { - m_subtitle->property_label() = value; - } + m_title_label = Glib::Binding::bind_property(participant->property_name(), m_title->property_label(), Glib::Binding::Flags::SYNC_CREATE); - auto participant_row::set_title(Glib::ustring const & value) -> void - { - m_title->property_label() = value; + m_subtitle_label = Glib::Binding::bind_property(participant->property_priority(), + m_subtitle->property_label(), + Glib::Binding::Flags::SYNC_CREATE, + [](auto n) { return std::vformat(_(lang::priority_number), std::make_format_args(n)); }); + } } - auto participant_row::handle_delete() -> void { auto index = Glib::Variant<int>::create(get_index()); |
