forked from nuttyartist/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaboutwindow.cpp
More file actions
46 lines (39 loc) · 2.27 KB
/
Copy pathaboutwindow.cpp
File metadata and controls
46 lines (39 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "aboutwindow.h"
#include "ui_aboutwindow.h"
#include <QDebug>
/**
* Initializes the window components and configures the AboutWindow
*/
AboutWindow::AboutWindow(QWidget *parent) :
QWidget(parent),
m_ui(new Ui::AboutWindow)
{
m_ui->setupUi(this);
this->setWindowFlags(Qt::Window);
setWindowTitle(tr("About") + " " + qApp->applicationName());
m_ui->aboutText->setText("<p>Notes was founded by <a href='https://rubymamistvalove.com'>Ruby Mamistvalove</a>, to create an elegant yet powerful cross-platform and open-source note-taking app.</p><a href='https://github.com/nuttyartist/notes'>Source code on Github</a>.<br/><br/><strong>Acknowledgments</strong><br/>This project couldn't have come this far without the help of these amazing people:<br/><br/><strong>Programmers:</strong><br/>Diep Ngoc<br/>Ali Diouri<br/>Thorbjørn Lindeijer<br/>Waqar Ahmed<br/>Alex Spataru<br/>David Planella<br/><br/><strong>Designers:</strong><br/>Kevin Doyle<br/><br/>And to the many of our beloved users who keep sending us feedback, you are an essential force in helping us improve, thank you!<br/><br/><strong>Notes makes use of the following third-party libraries:</strong><br/><br/>QMarkdownTextEdit<br/>QSimpleUpdater<br/>QAutostart<br/>QXT<br/><br/><strong>Notes makes use of the following open source fonts:</strong><br/><br/>Roboto<br/>Source Sans Pro<br/>Trykker<br/>Mate<br/>iA Writer Mono<br/>iA Writer Duo<br/>iA Writer Quattro<br/>");
m_ui->aboutText->setTextColor(QColor(26, 26, 26));
#ifdef __APPLE__
QFont fontToUse = QFont(QStringLiteral("SF Pro Text")).exactMatch() ? QStringLiteral("SF Pro Text") : QStringLiteral("Roboto");
m_ui->aboutText->setFont(fontToUse);
#elif _WIN32
QFont fontToUse = QFont(QStringLiteral("Segoe UI")).exactMatch() ? QStringLiteral("Segoe UI") : QStringLiteral("Roboto");
m_ui->aboutText->setFont(fontToUse);
#else
m_ui->aboutText->setFont(QFont(QStringLiteral("Roboto")));
#endif
}
AboutWindow::~AboutWindow()
{
/* Delete UI controls */
delete m_ui;
}
void AboutWindow::setTheme(QColor backgroundColor, QColor textColor)
{
QString ss = "QTextBrowser { "
"background-color: %1;"
"color: %2;"
"}";
ss = ss.arg(backgroundColor.name(), textColor.name());
m_ui->aboutText->setStyleSheet(ss);
}