mirror of
https://github.com/oguzhaninan/Stacer.git
synced 2026-01-30 17:51:26 -05:00
added donate button
This commit is contained in:
@@ -18,7 +18,7 @@ public:
|
||||
static QString readStringFromFile(const QString &path, const QIODevice::OpenMode &mode = QIODevice::ReadOnly);
|
||||
static QStringList readListFromFile(const QString &path, const QIODevice::OpenMode &mode = QIODevice::ReadOnly);
|
||||
|
||||
static bool writeFile(const QString &path, const QString &content, const QIODevice::OpenMode &mode = QIODevice::ReadWrite);
|
||||
static bool writeFile(const QString &path, const QString &content, const QIODevice::OpenMode &mode = QIODevice::WriteOnly | QIODevice::Truncate);
|
||||
static QStringList directoryList(const QString &path);
|
||||
static quint64 getFileSize(const QString &path);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "ui_settings_page.h"
|
||||
#include "Managers/info_manager.h"
|
||||
#include "utilities.h"
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
SettingsPage::~SettingsPage()
|
||||
{
|
||||
@@ -51,7 +53,7 @@ void SettingsPage::init()
|
||||
}
|
||||
|
||||
QString dk = apm->getDiskName();
|
||||
ui->disksCmb->setCurrentText(dk);
|
||||
ui->disksCmb->setCurrentIndex(ui->disksCmb->findData(dk));
|
||||
|
||||
// start on boot
|
||||
startupAppPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
||||
@@ -70,6 +72,7 @@ void SettingsPage::init()
|
||||
Utilities::addDropShadow(ui->languagesCmb, 40);
|
||||
Utilities::addDropShadow(ui->themesCmb, 40);
|
||||
Utilities::addDropShadow(ui->disksCmb, 40);
|
||||
Utilities::addDropShadow(ui->btnDonate, 40);
|
||||
|
||||
connect(ui->languagesCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(languagesCmbChanged(int)));
|
||||
connect(ui->themesCmb, SIGNAL(currentIndexChanged(int)), this, SLOT(themesCmbChanged(int)));
|
||||
@@ -121,3 +124,8 @@ void SettingsPage::on_checkAutostart_clicked(bool checked)
|
||||
QFile::remove(startupAppPath);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsPage::on_btnDonate_clicked()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://www.patreon.com/oguzhaninan"));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ private slots:
|
||||
void languagesCmbChanged(const int &index);
|
||||
void diskCmbChanged(const int &index);
|
||||
void on_checkAutostart_clicked(bool checked);
|
||||
void on_btnDonate_clicked();
|
||||
|
||||
private:
|
||||
Ui::SettingsPage *ui;
|
||||
|
||||
@@ -140,22 +140,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="5" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="lblCreatedBy">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Created by <a href="https://github.com/oguzhaninan"><span style=" text-decoration: underline; color:#007af4;">Oğuzhan İNAN</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@@ -236,8 +220,55 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" alignment="Qt::AlignLeft">
|
||||
<widget class="QPushButton" name="btnDonate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Donate</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../static.qrc">
|
||||
<normaloff>:/static/themes/common/img/donate.png</normaloff>:/static/themes/common/img/donate.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="3">
|
||||
<widget class="QLabel" name="lblCreatedBy">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Created by <a href="https://github.com/oguzhaninan"><span style=" text-decoration: underline; color:#007af4;">Oğuzhan İNAN</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../static.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -50,7 +50,7 @@ void StartupApp::on_startupCheck_clicked(bool status)
|
||||
lines.append(QString("Hidden=%1").arg(_status));
|
||||
}
|
||||
|
||||
FileUtil::writeFile(filePath, lines.join('\n'));
|
||||
FileUtil::writeFile(filePath, lines.join('\n').append('\n'));
|
||||
}
|
||||
|
||||
void StartupApp::on_deleteAppBtn_clicked()
|
||||
|
||||
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
app.processEvents();
|
||||
|
||||
// QThread::sleep(10);
|
||||
QThread::sleep(1);
|
||||
|
||||
// qInstallMessageHandler(messageHandler);
|
||||
|
||||
|
||||
@@ -68,5 +68,6 @@
|
||||
<file>static/themes/default/img/ppa-repository.png</file>
|
||||
<file>static/splashscreen.png</file>
|
||||
<file>static/loading.svg</file>
|
||||
<file>static/themes/common/img/donate.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
BIN
stacer/static/themes/common/img/donate.png
Normal file
BIN
stacer/static/themes/common/img/donate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -131,9 +131,10 @@ QCheckBox[accessibleName="circle"]::indicator:checked {
|
||||
|
||||
QToolTip {
|
||||
color: @color05;
|
||||
background-color: @color04;
|
||||
border: 1px solid @color04;
|
||||
border-radius: 2;
|
||||
padding: 2;
|
||||
background-color: @sidebar;
|
||||
/*border: 1px solid @pageContent;*/
|
||||
border-radius: 3;
|
||||
}
|
||||
|
||||
/**************************
|
||||
@@ -149,7 +150,6 @@ QToolTip {
|
||||
font-size: 13pt;
|
||||
}
|
||||
|
||||
|
||||
QKeySequenceEdit {
|
||||
border-radius: 2;
|
||||
padding: 10;
|
||||
@@ -1105,3 +1105,16 @@ QRadioButton::indicator:checked {
|
||||
font-size: 9pt;
|
||||
color: @color06;
|
||||
}
|
||||
|
||||
#btnDonate {
|
||||
border-radius: 3;
|
||||
padding: 5 10;
|
||||
font-size: 11pt;
|
||||
background-color: @color03;
|
||||
color: @color07;
|
||||
}
|
||||
|
||||
#btnDonate:hover {
|
||||
background-color: @color10;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user