Skip to content

Commit 278d49f

Browse files
authored
Add supporters tab (Mudlet#2880)
* Add initial tab and icon * Refactor text setting into separate methods * Comment improvement * Added a super simplistic structure for the Patreon tab * Added new HTML in * Add images * Remove PlaceholderText, fix Qt 5.7 compile * Add images in * Add missing end tag * Remove obsolete end tag * Set minimum size on about dialog to one that looks okay * Re-save with GIMP and fix libpng warnings * Draw our own images * Update names and white space * Layout * Typo * Dont create if already existing * Dont crash when closing Mudlet * Drop %3, save screen space * Don't print supporter's introduction big
1 parent 426b836 commit 278d49f

7 files changed

Lines changed: 299 additions & 178 deletions

File tree

src/dlgAboutDialog.cpp

Lines changed: 249 additions & 178 deletions
Large diffs are not rendered by default.

src/dlgAboutDialog.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "pre_guard.h"
2626
#include "ui_about_dialog.h"
27+
#include <memory>
2728
#include "post_guard.h"
2829

2930

@@ -34,6 +35,13 @@ class dlgAboutDialog : public QDialog, public Ui::about_dialog
3435
public:
3536
Q_DISABLE_COPY(dlgAboutDialog)
3637
dlgAboutDialog(QWidget* parent = nullptr);
38+
39+
private:
40+
std::unique_ptr<QTextDocument> supportersDocument;
41+
void setAboutTab(const QString& htmlHead) const;
42+
void setLicenseTab(const QString& htmlHead) const;
43+
void setThirdPartyTab(const QString& htmlHead) const;
44+
void setSupportersTab(const QString &htmlHead);
3745
};
3846

3947
#endif // MUDLET_DLGABOUTDIALOG_H

src/icons/Patreon_Mark_Primary.png

9.57 KB
Loading

src/icons/frame_plaque.png

21.9 KB
Loading

src/icons/frame_swords.png

24.3 KB
Loading

src/mudlet.qrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,8 @@
180180
<file>mudlet-lua/lua/generic-mapper/generic_mapper.xml</file>
181181
<file>icons/clessidra.jpg</file>
182182
<file>mudlet-lua/lua/utf8_filenames.lua</file>
183+
<file>icons/Patreon_Mark_Primary.png</file>
184+
<file>icons/frame_plaque.png</file>
185+
<file>icons/frame_swords.png</file>
183186
</qresource>
184187
</RCC>

src/ui/about_dialog.ui

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,12 @@
624624
<verstretch>0</verstretch>
625625
</sizepolicy>
626626
</property>
627+
<property name="minimumSize">
628+
<size>
629+
<width>450</width>
630+
<height>0</height>
631+
</size>
632+
</property>
627633
<property name="palette">
628634
<palette>
629635
<active>
@@ -713,6 +719,39 @@
713719
</item>
714720
</layout>
715721
</widget>
722+
<widget class="QWidget" name="tab_supporters">
723+
<attribute name="icon">
724+
<iconset resource="../mudlet.qrc">
725+
<normaloff>:/icons/Patreon_Mark_Primary.png</normaloff>:/icons/Patreon_Mark_Primary.png</iconset>
726+
</attribute>
727+
<attribute name="title">
728+
<string>Supporters</string>
729+
</attribute>
730+
<layout class="QVBoxLayout" name="verticalLayout_4">
731+
<property name="spacing">
732+
<number>0</number>
733+
</property>
734+
<property name="leftMargin">
735+
<number>0</number>
736+
</property>
737+
<property name="topMargin">
738+
<number>0</number>
739+
</property>
740+
<property name="rightMargin">
741+
<number>0</number>
742+
</property>
743+
<property name="bottomMargin">
744+
<number>0</number>
745+
</property>
746+
<item>
747+
<widget class="QTextBrowser" name="textBrowser_supporters">
748+
<property name="frameShape">
749+
<enum>QFrame::NoFrame</enum>
750+
</property>
751+
</widget>
752+
</item>
753+
</layout>
754+
</widget>
716755
<widget class="QWidget" name="tab_license">
717756
<attribute name="title">
718757
<string>License</string>

0 commit comments

Comments
 (0)