From 12093d1bb606c739b70405ef5e5ffb799a15a521 Mon Sep 17 00:00:00 2001 From: apa420 <17131426+apa420@users.noreply.github.com> Date: Thu, 12 Jul 2018 18:58:56 +0200 Subject: [PATCH] Adding elements to the preview in the look tab (#605) * fixes issue #584 * Added different elements to the preview in the look tab --- resources/images/pajaDank.png | Bin 0 -> 3862 bytes resources/resources.qrc | 1 + src/singletons/Resources.cpp | 2 ++ src/singletons/Resources.hpp | 2 ++ src/widgets/settingspages/LookPage.cpp | 18 +++++++++++++----- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 resources/images/pajaDank.png diff --git a/resources/images/pajaDank.png b/resources/images/pajaDank.png new file mode 100644 index 0000000000000000000000000000000000000000..c8746932b373445fa60c3d2baa388c9edef000fa GIT binary patch literal 3862 zcmV+x59#oUP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA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cs!q&8LE3p->5xn&|6R)7z(SEi0SXAB6V*OZ zKqwHPjc||`cdmwRpBuUk1p*Wh1q3J{Fhr1_A64G}isQ9L&&S=x;KB_N(T{K8EBd4r zZb~VviGhUz^nt#>*(4MQ3k9%Hi_y6eEv@F(eWn5mgoOfFsD(70ylnJ*Iu@$);0qK8 z3k4`3aPt~y`nn_`O)~4CGvm@VnB{f_P#`Q6RIP<>zW)@u9p9F(}SNnHc6yEs{#eWLV@#*yv|#Ve6wAyDd&>%1 zwV66vn~hkdN!tZbAPNX9PN6!<(KV}-#$aV;777F?p!Wo;5AUidx06giidD^Tcam&U zxPwkZlTD%9`PW#>HR5(CrJz7qD5$K3o=f$rr@3*AL_|27B;vpPrt>)?$#(ICt^@oT Y00ymLjPQ&xv;Y7A07*qoM6N<$f`I`Y_W%F@ literal 0 HcmV?d00001 diff --git a/resources/resources.qrc b/resources/resources.qrc index cf41c3469..129713804 100644 --- a/resources/resources.qrc +++ b/resources/resources.qrc @@ -74,6 +74,7 @@ avatars/pajlada.png images/download_update.png images/download_update_error.png + images/pajaDank.png qt.conf diff --git a/src/singletons/Resources.cpp b/src/singletons/Resources.cpp index 0180c581b..fdbbf9bbf 100644 --- a/src/singletons/Resources.cpp +++ b/src/singletons/Resources.cpp @@ -287,6 +287,8 @@ Resources::Resources() , splitHeaderContext(lli(":/images/tool_moreCollapser_off16.png")) , buttonBan(lli(":/images/button_ban.png", 0.25)) , buttonTimeout(lli(":/images/button_timeout.png", 0.25)) + , pajaDank(lli(":/images/pajaDank.png", 0.25)) + , ppHop(new Image("https://fourtf.com/ppHop.gif", 0.25)) { this->split.left = QIcon(":/images/split/splitleft.png"); this->split.right = QIcon(":/images/split/splitright.png"); diff --git a/src/singletons/Resources.hpp b/src/singletons/Resources.hpp index 7327c4da0..86db4d84a 100644 --- a/src/singletons/Resources.hpp +++ b/src/singletons/Resources.hpp @@ -86,6 +86,8 @@ public: Image *buttonBan; Image *buttonTimeout; + Image *pajaDank; + Image *ppHop; struct JSONCheermoteSet { QString prefix; diff --git a/src/widgets/settingspages/LookPage.cpp b/src/widgets/settingspages/LookPage.cpp index 7769d5b6d..6f556f025 100644 --- a/src/widgets/settingspages/LookPage.cpp +++ b/src/widgets/settingspages/LookPage.cpp @@ -62,7 +62,7 @@ void LookPage::initializeUi() auto channelView = layout.emplace(); auto channel = this->createPreviewChannel(); channelView->setChannel(channel); - channelView->setScaleIndependantHeight(64); + channelView->setScaleIndependantHeight(74); } void LookPage::addInterfaceTab(LayoutCreator layout) @@ -276,24 +276,32 @@ ChannelPtr LookPage::createPreviewChannel() { auto message = MessagePtr(new Message()); + message->addElement(new TimestampElement(QTime(8, 13, 42))); message->addElement(new ImageElement(getApp()->resources->badgeModerator, MessageElement::BadgeChannelAuthority)); message->addElement(new ImageElement(getApp()->resources->badgeSubscriber, MessageElement::BadgeSubscription)); - message->addElement(new TimestampElement(QTime(8, 13, 42))); message->addElement(new TextElement("username1:", MessageElement::Username, QColor("#0094FF"), FontStyle::ChatMediumBold)); - message->addElement(new TextElement("This is a preview message :)", MessageElement::Text)); + message->addElement(new TextElement("This is a preview message", MessageElement::Text)); + message->addElement(new EmoteElement(EmoteData(getApp()->resources->pajaDank), + MessageElement::Flags::AlwaysShow)); + // message->addElement(new) channel->addMessage(message); } { auto message = MessagePtr(new Message()); + message->addElement(new TimestampElement(QTime(8, 15, 21))); message->addElement(new ImageElement(getApp()->resources->badgePremium, MessageElement::BadgeChannelAuthority)); - message->addElement(new TimestampElement(QTime(8, 15, 21))); message->addElement(new TextElement("username2:", MessageElement::Username, QColor("#FF6A00"), FontStyle::ChatMediumBold)); - message->addElement(new TextElement("This is another one :)", MessageElement::Text)); + message->addElement(new TextElement("This is another one", MessageElement::Text)); + message->addElement( + new EmoteElement(EmoteData(getApp()->resources->ppHop), MessageElement::BttvEmote)); + message->addElement( + (new TextElement("www.fourtf.com", MessageElement::Text, MessageColor::Link)) + ->setLink(Link(Link::Url, "https://www.fourtf.com"))); channel->addMessage(message); }