From bc293a2c61435397597e577ae7e368784d555bac Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 2 Mar 2020 00:01:05 +0100 Subject: [PATCH] Add action buttons to PostWidget. --- gui/src/widget_post.cpp | 4 +- gui/src/widget_post.hpp | 2 +- gui/ui/widget_post.ui | 86 +++++++++++++++++++++++++++++++++++++++-- 3 files changed, 85 insertions(+), 7 deletions(-) diff --git a/gui/src/widget_post.cpp b/gui/src/widget_post.cpp index b3de182..7e9ba4d 100644 --- a/gui/src/widget_post.cpp +++ b/gui/src/widget_post.cpp @@ -23,7 +23,7 @@ void PostWidget::show_hide_elements() { const bool has_subject{!label_subject->text().isEmpty()}; label_subject->setVisible(has_subject); - button_more->setVisible(has_subject); + button_show_more->setVisible(has_subject); label_content->setHidden(has_subject); if (label_avatar->pixmap() == nullptr) @@ -32,7 +32,7 @@ void PostWidget::show_hide_elements() } } -void PostWidget::toggled_button(const bool &toggled) +void PostWidget::toggled_button_show_more(const bool &toggled) { label_content->setVisible(toggled); } diff --git a/gui/src/widget_post.hpp b/gui/src/widget_post.hpp index 1049a63..94abaa3 100644 --- a/gui/src/widget_post.hpp +++ b/gui/src/widget_post.hpp @@ -60,7 +60,7 @@ public: void show_hide_elements(); private slots: - void toggled_button(const bool &toggled); + void toggled_button_show_more(const bool &toggled); }; } // namespace FediPotato diff --git a/gui/ui/widget_post.ui b/gui/ui/widget_post.ui index 61f1500..a97ccac 100644 --- a/gui/ui/widget_post.ui +++ b/gui/ui/widget_post.ui @@ -157,7 +157,7 @@ - + 0 @@ -212,6 +212,84 @@ + + + + + + + 0 + 0 + + + + 🔁 + + + true + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + 0 + 0 + + + + 🔖 + + + true + + + + + + + + 0 + 0 + + + + ... + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + @@ -219,10 +297,10 @@ - button_more + button_show_more toggled(bool) PostWidget - toggled_button(bool) + toggled_button_show_more(bool) 113 @@ -236,6 +314,6 @@ - toggled_button(bool) + toggled_button_show_more(bool)