cleanup styles

This commit is contained in:
uncor3
2025-11-02 03:39:31 -08:00
parent e715c78701
commit d3f4c74fbc
10 changed files with 143 additions and 138 deletions
+8 -16
View File
@@ -1,4 +1,5 @@
#include "welcomewidget.h"
#include "iDescriptor-ui.h"
#include "responsiveqlabel.h"
#include <QApplication>
#include <QDesktopServices>
@@ -68,6 +69,10 @@ void WelcomeWidget::setupUI()
createStyledLabel("Found an issue? Report it on GitHub", 12, false);
m_githubLabel->setAlignment(Qt::AlignCenter);
m_githubLabel->setCursor(Qt::PointingHandCursor);
connect(m_githubLabel, &ZLabel::clicked, this, []() {
QDesktopServices::openUrl(
QUrl("https://github.com/uncor3/iDescriptor"));
});
// Make it look like a link
QPalette githubPalette = m_githubLabel->palette();
@@ -84,13 +89,13 @@ void WelcomeWidget::setupUI()
m_mainLayout->addStretch(1);
// Set minimum size
setMinimumSize(600, 500);
// setMinimumSize(600, 500);
}
QLabel *WelcomeWidget::createStyledLabel(const QString &text, int fontSize,
ZLabel *WelcomeWidget::createStyledLabel(const QString &text, int fontSize,
bool isBold)
{
QLabel *label = new QLabel(text);
ZLabel *label = new ZLabel(text);
QFont font = label->font();
if (fontSize > 0) {
@@ -105,16 +110,3 @@ QLabel *WelcomeWidget::createStyledLabel(const QString &text, int fontSize,
return label;
}
bool WelcomeWidget::eventFilter(QObject *watched, QEvent *event)
{
if (watched == m_githubLabel && event->type() == QEvent::MouseButtonPress) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
if (mouseEvent->button() == Qt::LeftButton) {
QDesktopServices::openUrl(
QUrl("https://github.com/uncor3/iDescriptor"));
return true;
}
}
return QWidget::eventFilter(watched, event);
}