summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/include/turns/app/widgets/participant_list_row.hpp19
-rw-r--r--app/src/widgets/participant_list_row.cpp17
2 files changed, 9 insertions, 27 deletions
diff --git a/app/include/turns/app/widgets/participant_list_row.hpp b/app/include/turns/app/widgets/participant_list_row.hpp
index 172e9ac..070d540 100644
--- a/app/include/turns/app/widgets/participant_list_row.hpp
+++ b/app/include/turns/app/widgets/participant_list_row.hpp
@@ -6,9 +6,8 @@
#include <array>
#include <glibmm/ustring.h>
-#include <gtkmm/box.h>
+#include <gtkmm/button.h>
#include <gtkmm/editablelabel.h>
-#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <gtkmm/listboxrow.h>
#include <gtkmm/togglebutton.h>
@@ -19,13 +18,9 @@ namespace turns::app::widgets
{
auto constexpr inline static children = std::array{
"edit",
- "header",
- "prefixes",
- "image",
- "title_box",
- "title",
"subtitle",
- "suffixes",
+ "title",
+ "toggle_defeated",
};
participant_list_row();
@@ -34,14 +29,10 @@ namespace turns::app::widgets
auto set_title(Glib::ustring const & value) -> void;
private:
- Gtk::ToggleButton * m_edit;
- Gtk::Box * m_header;
- Gtk::Image * m_image;
- Gtk::Box * m_prefixes;
+ Gtk::Button * m_edit;
Gtk::Label * m_subtitle;
- Gtk::Box * m_suffixes;
Gtk::EditableLabel * m_title;
- Gtk::Box * m_title_box;
+ Gtk::ToggleButton * m_toggle_defeated;
};
} // namespace turns::app::widgets
diff --git a/app/src/widgets/participant_list_row.cpp b/app/src/widgets/participant_list_row.cpp
index 10bcc2d..3be31b3 100644
--- a/app/src/widgets/participant_list_row.cpp
+++ b/app/src/widgets/participant_list_row.cpp
@@ -1,5 +1,7 @@
#include "turns/app/widgets/participant_list_row.hpp"
+#include <print>
+
#include <glibmm/ustring.h>
namespace turns::app::widgets
@@ -14,21 +16,10 @@ namespace turns::app::widgets
: Glib::ObjectBase(TYPE_NAME)
, template_widget<participant_list_row, Gtk::ListBoxRow>{TEMPLATE}
{
- m_edit = get_widget<Gtk::ToggleButton>("edit");
- m_header = get_widget<Gtk::Box>("header");
- m_image = get_widget<Gtk::Image>("image");
- m_prefixes = get_widget<Gtk::Box>("prefixes");
+ m_edit = get_widget<Gtk::Button>("edit");
m_subtitle = get_widget<Gtk::Label>("subtitle");
- m_suffixes = get_widget<Gtk::Box>("suffixes");
m_title = get_widget<Gtk::EditableLabel>("title");
- m_title_box = get_widget<Gtk::Box>("title_box");
-
- m_edit->signal_clicked().connect([this]{
- if(m_edit->get_active())
- {
- m_title->start_editing();
- }
- });
+ m_toggle_defeated = get_widget<Gtk::ToggleButton>("toggle_defeated");
}
auto participant_list_row::set_subtitle(Glib::ustring const & value) -> void