From f040588570de1846ea3faff1d958b91547b8ab91 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 19 Apr 2021 17:28:38 +0200 Subject: [PATCH] ui/about: Replace buttons with clickable Entries This reduces the total amount of links Supporters can submit to just one instead of two. Additionally by removing the buttons and making the entry itself clickable, the UI can show more entries at once and allow users to easily make the connection between the entry and the link it opens when clicked. --- source/ui/ui-about-entry.cpp | 60 ++-------- source/ui/ui-about-entry.hpp | 10 +- source/ui/ui-about.cpp | 222 ++++++----------------------------- source/ui/ui-about.hpp | 21 +--- ui/about-entry.ui | 204 ++++++-------------------------- 5 files changed, 88 insertions(+), 429 deletions(-) diff --git a/source/ui/ui-about-entry.cpp b/source/ui/ui-about-entry.cpp index 9fb09a08..d8887b68 100644 --- a/source/ui/ui-about-entry.cpp +++ b/source/ui/ui-about-entry.cpp @@ -28,8 +28,7 @@ constexpr std::string_view i18n_role_supporter_github = "UI.About.Role.Supporte constexpr std::string_view i18n_role_supporter_twitch = "UI.About.Role.Supporter.Twitch"; constexpr std::string_view i18n_role_creator = "UI.About.Role.Creator"; -streamfx::ui::about_entry::about_entry(QWidget* parent, streamfx::ui::about::entry& entry) - : QWidget(parent), _last_click(std::chrono::high_resolution_clock::now()), _link1_url(), _link2_url() +streamfx::ui::about_entry::about_entry(QWidget* parent, streamfx::ui::about::entry& entry) : QWidget(parent), _link() { setupUi(this); @@ -74,61 +73,20 @@ streamfx::ui::about_entry::about_entry(QWidget* parent, streamfx::ui::about::ent break; } - std::tuple els[]{ - {entry.link1_type, entry.link1_address, entry.link1_text, link1, _link1_url}, - {entry.link2_type, entry.link2_address, entry.link2_text, link2, _link2_url}, - }; - for (auto el : els) { - switch (std::get<0>(el)) { - case streamfx::ui::about::link_type::NONE: - std::get<3>(el)->setHidden(true); - break; - case streamfx::ui::about::link_type::GENERIC: - std::get<3>(el)->setIcon(QIcon(":/linktype/generic")); - break; - case streamfx::ui::about::link_type::SOCIAL_TWITCH: - std::get<3>(el)->setIcon(QIcon(":/linktype/twitch")); - break; - case streamfx::ui::about::link_type::SOCIAL_YOUTUBE: - std::get<3>(el)->setIcon(QIcon(":/linktype/youtube")); - break; - case streamfx::ui::about::link_type::SOCIAL_DISCORD: - std::get<3>(el)->setIcon(QIcon(":/linktype/discord")); - break; - case streamfx::ui::about::link_type::SOCIAL_TWITTER: - std::get<3>(el)->setIcon(QIcon(":/linktype/twitter")); - break; - case streamfx::ui::about::link_type::SOCIAL_FACEBOOK: - std::get<3>(el)->setIcon(QIcon(":/linktype/facebook")); - break; - default: - break; - } - std::get<3>(el)->setText(QString::fromUtf8(std::get<2>(el).c_str())); - std::get<4>(el).setUrl(QString::fromStdString(std::get<1>(el))); + if (!entry.link.empty()) { + this->setCursor(Qt::PointingHandCursor); + _link = QUrl(QString::fromUtf8(entry.link.c_str())); } - connect(link1, &QPushButton::pressed, this, &streamfx::ui::about_entry::on_link1_clicked); - connect(link2, &QPushButton::pressed, this, &streamfx::ui::about_entry::on_link2_clicked); - - // Don't free up space when hidden. - /*if (!(link1->isVisible() || link2->isVisible())) { - QSizePolicy qsp = link1->sizePolicy(); - qsp.setRetainSizeWhenHidden(true); - link1->setSizePolicy(qsp); - }*/ } streamfx::ui::about_entry::~about_entry() {} -void streamfx::ui::about_entry::on_link1_clicked() +void streamfx::ui::about_entry::mousePressEvent(QMouseEvent* event) { - // FIXME! Button clicks twice? - for (size_t attempt = 0; (attempt < 10) && (!QDesktopServices::openUrl(_link1_url)); attempt++) { - } -} + if (_link.isEmpty()) + return; -void streamfx::ui::about_entry::on_link2_clicked() -{ - for (size_t attempt = 0; (attempt < 10) && (!QDesktopServices::openUrl(_link2_url)); attempt++) { + if (event->button() == Qt::LeftButton) { + QDesktopServices::openUrl(_link); } } diff --git a/source/ui/ui-about-entry.hpp b/source/ui/ui-about-entry.hpp index 6d161ef0..e5e4ac88 100644 --- a/source/ui/ui-about-entry.hpp +++ b/source/ui/ui-about-entry.hpp @@ -26,6 +26,7 @@ #pragma warning(push) #pragma warning(disable : 4251 4365 4371 4619 4946) #endif +#include #include "ui_about-entry.h" #ifdef _MSC_VER #pragma warning(pop) @@ -36,16 +37,13 @@ namespace streamfx::ui { Q_OBJECT private: - std::chrono::high_resolution_clock::time_point _last_click; - QUrl _link1_url; - QUrl _link2_url; + QUrl _link; public: about_entry(QWidget* parent, ui::about::entry& entry); ~about_entry(); - public slots: - void on_link1_clicked(); - void on_link2_clicked(); + protected: + virtual void mousePressEvent(QMouseEvent* event) override; }; } // namespace streamfx::ui diff --git a/source/ui/ui-about.cpp b/source/ui/ui-about.cpp index afeaeeeb..8987c2fc 100644 --- a/source/ui/ui-about.cpp +++ b/source/ui/ui-about.cpp @@ -46,201 +46,55 @@ static const std::vector _thankyous = { static const std::list _entries = { // Contributers + // - 2021 streamfx::ui::about::entry{"Michael \"Xaymar\" Dirks", streamfx::ui::about::role_type::CONTRIBUTOR, "", - streamfx::ui::about::link_type::GENERIC, "https://xaymar.com", "Blog & News", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/xaymar", - text_social_twitch.data()}, + "https://xaymar.com"}, + streamfx::ui::about::entry{"cpyarger", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/cpyarger"}, + streamfx::ui::about::entry{"tyten652", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/tytan652"}, + streamfx::ui::about::entry{"kilinbox", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/kilinbox"}, + // - 2020 + streamfx::ui::about::entry{"Oncorporation", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/Oncorporation"}, + streamfx::ui::about::entry{"dghodgson", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/dghodgson"}, + streamfx::ui::about::entry{"danimo", streamfx::ui::about::role_type::CONTRIBUTOR, "", "https://github.com/danimo"}, + streamfx::ui::about::entry{"brandonedens", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/brandonedens"}, + streamfx::ui::about::entry{"rjmoggach", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/rjmoggach"}, + // - 2019 + streamfx::ui::about::entry{"catb0t", streamfx::ui::about::role_type::CONTRIBUTOR, "", "https://github.com/catb0t"}, + streamfx::ui::about::entry{"Vainock", streamfx::ui::about::role_type::CONTRIBUTOR, "", + "https://github.com/Vainock"}, + streamfx::ui::about::entry{"wwj402", streamfx::ui::about::role_type::CONTRIBUTOR, "", "https://github.com/wwj402"}, + // - 2018 + + // Separator + streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", ""}, // Translators - /// https://www.patreon.com/user?u=4473266, https://crowdin.com/profile/kimbech, https://twitch.tv/frozennortherner (Proofreader, Norwegian) - streamfx::ui::about::entry{"FrozenNortherner", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/frozennortherner", - text_social_twitch.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://crowdin.com/profile/hydargos (Proofreader, French) - streamfx::ui::about::entry{"hydargos", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::SOCIAL_YOUTUBE, "https://www.youtube.com/hydargos", - text_social_youtube.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://crowdin.com/profile/saygo1125 (Proofreader, Japanese) - streamfx::ui::about::entry{"saygo1125", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::GENERIC, "https://crowdin.com/profile/saygo1125", - "Crowdin", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://crowdin.com/profile/Monsteer (Spanish) - streamfx::ui::about::entry{"Monsteer", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::SOCIAL_TWITTER, "https://twitter.com/cooliguay", - text_social_twitter.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://crowdin.com/profile/hellnano (Spanish) - streamfx::ui::about::entry{"Nanito", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/nanito", - text_social_twitch.data(), streamfx::ui::about::link_type::SOCIAL_FACEBOOK, - "https://facebook.com/nanitotv", text_social_facebook.data()}, - /// https://crowdin.com/profile/wownik98 (Russian) - streamfx::ui::about::entry{"WoWnik", streamfx::ui::about::role_type::TRANSLATOR, "", - streamfx::ui::about::link_type::GENERIC, "https://crowdin.com/profile/wownik98", - "Crowdin", streamfx::ui::about::link_type::NONE, "", ""}, // Separator - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", streamfx::ui::about::link_type::NONE, - "", "", streamfx::ui::about::link_type::NONE, "", ""}, + streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", ""}, - /* - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "", "Patreon", - streamfx::ui::about::link_type::NONE, "", ""}, - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - */ - - // Supporters - Tier 3 - /// https://www.patreon.com/eposvox - streamfx::ui::about::entry{"EposVox", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://www.twitch.tv/EposVox", - text_social_twitch.data(), streamfx::ui::about::link_type::SOCIAL_YOUTUBE, - "https://youtube.com/c/EposVox", text_social_youtube.data()}, - /// https://github.com/GranDroidTonight - streamfx::ui::about::entry{"GranDroidTonight", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://www.twitch.tv/GranDroidTonight", - text_social_twitch.data(), streamfx::ui::about::link_type::SOCIAL_YOUTUBE, - "https://youtube.com/channel/UCGoT2XFPpeKaL1QuY_NPDuA", text_social_youtube.data()}, - /// https://github.com/Joefis-x20s - streamfx::ui::about::entry{"Joefisx20s", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/Joefis-x20s", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - - // Supporters - Tier 2 - /// https://www.patreon.com/user?u=3569213 - streamfx::ui::about::entry{"B B", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=3569213", - "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://github.com/blackmoon1910 - streamfx::ui::about::entry{"blackmoon1910", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/blackmoon1910", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=32255073 (chillpanda) - streamfx::ui::about::entry{"ChillPanda", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=32255073", - "Patreon", streamfx::ui::about::link_type::SOCIAL_TWITCH, - "https://www.twitch.tv/chi11estpanda", text_social_twitch.data()}, - /// https://www.patreon.com/DandiDoesIt - streamfx::ui::about::entry{"DandiDoesIt", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://www.twitch.tv/DandiDoesIt", - text_social_twitch.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=13760765 - streamfx::ui::about::entry{"HoodlumCallum", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_YOUTUBE, - "https://www.youtube.com/channel/UC0cTVjYKgAnBrXQKcICyNmA", text_social_youtube.data(), - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://www.twitch.tv/hoodlumcallum", - text_social_twitch.data()}, - /// https://www.patreon.com/user?u=5208869 - streamfx::ui::about::entry{ - "KrisCheetah", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", streamfx::ui::about::link_type::GENERIC, - "https://www.patreon.com/user/creators?u=5208869", "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=2382106 - streamfx::ui::about::entry{ - "Sean", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", streamfx::ui::about::link_type::GENERIC, - "https://www.patreon.com/user/creators?u=2382106", "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://github.com/wild-wild-smif - streamfx::ui::about::entry{"Wild Wild Smif", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/wild-wild-smif", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://github.com/xuedi - streamfx::ui::about::entry{"xuedi", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/xuedi", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/y0himba - streamfx::ui::about::entry{"y0himba", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/y0himba1", - text_social_twitch.data(), streamfx::ui::about::link_type::SOCIAL_TWITTER, - "https://twitter.com/y0himba", text_social_twitter.data()}, - - // Supporters - Tier 1 - /// https://www.patreon.com/benman2785 - streamfx::ui::about::entry{"Benjamin Hoffmeister", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/benman2785", "Patreon", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=33587406 - streamfx::ui::about::entry{"Hana Pestle", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=33587406", - "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/scraplands - streamfx::ui::about::entry{"iamresist", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/iamresist", - text_social_twitch.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/jaid - streamfx::ui::about::entry{"Jaidchen", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/Jaidchen", - text_social_youtube.data(), streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=3214093 - streamfx::ui::about::entry{"JeffCraig", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=3214093", - "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://github.com/LagaV - streamfx::ui::about::entry{"LagaV", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/LagaV", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=283535 - streamfx::ui::about::entry{"MrProducer", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=283535", - "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/Nordern - streamfx::ui::about::entry{"Nordern", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::SOCIAL_YOUTUBE, "https://youtube.com/nordern", - text_social_youtube.data(), streamfx::ui::about::link_type::SOCIAL_TWITCH, - "https://www.twitch.tv/thenordern", text_social_twitch.data()}, - /// https://www.patreon.com/qappz - streamfx::ui::about::entry{"QappZ", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/qappz", "Patreon", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://github.com/TheB1gG - streamfx::ui::about::entry{"TheB1gG", streamfx::ui::about::role_type::GITHUB_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://github.com/TheB1gG", "Github", - streamfx::ui::about::link_type::NONE, "", ""}, - - // Supporters - No Tier - /// https://www.patreon.com/nwgat - streamfx::ui::about::entry{"nwgat.ninja", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/nwgat", "Patreon", - streamfx::ui::about::link_type::NONE, "", ""}, - /// https://www.patreon.com/user?u=742298 - streamfx::ui::about::entry{"olemars", streamfx::ui::about::role_type::PATREON_SUPPORTER, "", - streamfx::ui::about::link_type::GENERIC, "https://www.patreon.com/user?u=742298", - "Patreon", streamfx::ui::about::link_type::NONE, "", ""}, + // Supporters // Separator - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", streamfx::ui::about::link_type::NONE, - "", "", streamfx::ui::about::link_type::NONE, "", ""}, + streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", ""}, - // Family - streamfx::ui::about::entry{"Andrea Stenschke", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::NONE, "", "", streamfx::ui::about::link_type::NONE, "", - ""}, - streamfx::ui::about::entry{"Carsten Dirks", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::NONE, "", "", streamfx::ui::about::link_type::NONE, "", - ""}, - streamfx::ui::about::entry{"Gabriele Rantfl", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::NONE, "", "", streamfx::ui::about::link_type::NONE, "", - ""}, - streamfx::ui::about::entry{"Reiner Rantfl", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::NONE, "", "", streamfx::ui::about::link_type::NONE, "", - ""}, + // Family & Friends + streamfx::ui::about::entry{"Andrea Stenschke", streamfx::ui::about::role_type::FAMILY, "Xaymar", ""}, + streamfx::ui::about::entry{"Carsten Dirks", streamfx::ui::about::role_type::FAMILY, "Xaymar", ""}, + streamfx::ui::about::entry{"Gabriele Rantfl", streamfx::ui::about::role_type::FAMILY, "Xaymar", ""}, + streamfx::ui::about::entry{"Reiner Rantfl", streamfx::ui::about::role_type::FAMILY, "Xaymar", ""}, streamfx::ui::about::entry{"René \"Dex\" Dirks", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://twitch.tv/vektordex", - text_social_twitch.data(), streamfx::ui::about::link_type::GENERIC, - "https://worldofdex.de", "Website"}, - streamfx::ui::about::entry{"Christian \"Azekil\" Dirks", streamfx::ui::about::role_type::FAMILY, "Xaymar", - streamfx::ui::about::link_type::NONE, "", "", streamfx::ui::about::link_type::NONE, "", - ""}, - - // Friends + "https://worldofdex.de"}, + streamfx::ui::about::entry{"Christian \"Azekil\" Dirks", streamfx::ui::about::role_type::FAMILY, "Xaymar", ""}, streamfx::ui::about::entry{"Axelle", streamfx::ui::about::role_type::FRIEND, "Xaymar", - streamfx::ui::about::link_type::SOCIAL_TWITCH, "https://www.twitch.tv/axelle123", - text_social_twitch.data(), streamfx::ui::about::link_type::SOCIAL_TWITTER, - "https://twitter.com/AxellesNobody", text_social_twitter.data()}, - - // Separator - streamfx::ui::about::entry{"", streamfx::ui::about::role_type::THANKYOU, "", streamfx::ui::about::link_type::NONE, - "", "", streamfx::ui::about::link_type::NONE, "", ""}, - + "https://www.twitch.tv/axelle123"}, }; streamfx::ui::about::about() : QDialog(reinterpret_cast(obs_frontend_get_main_window())) diff --git a/source/ui/ui-about.hpp b/source/ui/ui-about.hpp index 2774964b..e7976d1c 100644 --- a/source/ui/ui-about.hpp +++ b/source/ui/ui-about.hpp @@ -47,32 +47,13 @@ namespace streamfx::ui { GITHUB_SUPPORTER, TWITCH_SUPPORTER, CREATOR, - - }; - enum class link_type : int32_t { - NONE, - GENERIC, - - // Social Links - SOCIAL_TWITCH = 2000, - SOCIAL_YOUTUBE, - SOCIAL_DISCORD, - SOCIAL_TWITTER, - SOCIAL_FACEBOOK, }; struct entry { std::string name; ui::about::role_type role; std::string role_custom; - - ui::about::link_type link1_type; - std::string link1_address; - std::string link1_text; - - ui::about::link_type link2_type; - std::string link2_address; - std::string link2_text; + std::string link; }; public: diff --git a/ui/about-entry.ui b/ui/about-entry.ui index df67bd53..9854495e 100644 --- a/ui/about-entry.ui +++ b/ui/about-entry.ui @@ -6,8 +6,8 @@ 0 0 - 195 - 99 + 200 + 50 @@ -55,180 +55,48 @@ QWidget[objectName="title"] { 0 - + + + + 0 + 0 + + + + + 14 + 75 + true + PreferAntialias + + + + Supporter Name + + + Qt::AlignCenter + + + + + 0 0 - - QFrame::StyledPanel + + + 10 + - - QFrame::Raised + + Supporter Title + + + Qt::AlignCenter - - - 5 - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - 0 - 0 - - - - - 14 - 75 - true - PreferAntialias - - - - Supporter Name - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 10 - - - - Supporter Title - - - Qt::AlignCenter - - - - - - - 5 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 36 - - - - - 16777215 - 36 - - - - - 0 - 36 - - - - - 10 - - - - YouTube - - - - :/social/youtube:/social/youtube - - - - 32 - 32 - - - - - - - - - 0 - 36 - - - - - 16777215 - 36 - - - - - 0 - 36 - - - - - 10 - - - - Twitch - - - - :/social/twitch:/social/twitch - - - - 32 - 32 - - - - - - -