mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
@ -50,7 +50,7 @@ AppearanceWidget::AppearanceWidget(bool themesOnly, QWidget* parent)
|
||||
|
||||
m_ui->catPreview->setGraphicsEffect(new QGraphicsOpacityEffect(this));
|
||||
|
||||
m_defaultFormat = new QTextCharFormat(m_ui->consolePreview->currentCharFormat());
|
||||
m_defaultFormat = QTextCharFormat(m_ui->consolePreview->currentCharFormat());
|
||||
|
||||
if (themesOnly) {
|
||||
m_ui->catPackLabel->hide();
|
||||
@ -224,10 +224,10 @@ void AppearanceWidget::updateConsolePreview()
|
||||
int fontSize = m_ui->fontSizeBox->value();
|
||||
QString fontFamily = m_ui->consoleFont->currentFont().family();
|
||||
m_ui->consolePreview->clear();
|
||||
m_defaultFormat->setFont(QFont(fontFamily, fontSize));
|
||||
m_defaultFormat.setFont(QFont(fontFamily, fontSize));
|
||||
|
||||
auto print = [this, colors](const QString& message, MessageLevel::Enum level) {
|
||||
QTextCharFormat format(*m_defaultFormat);
|
||||
QTextCharFormat format(m_defaultFormat);
|
||||
|
||||
QColor bg = colors.background.value(level);
|
||||
QColor fg = colors.foreground.value(level);
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <Application.h>
|
||||
#include <translations/TranslationsModel.h>
|
||||
#include <QTextCursor>
|
||||
#include "java/JavaChecker.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
|
||||
@ -56,6 +57,6 @@ class AppearanceWidget : public QWidget {
|
||||
void updateCatPreview();
|
||||
|
||||
Ui::AppearanceWidget* m_ui;
|
||||
QTextCharFormat* m_defaultFormat;
|
||||
QTextCharFormat m_defaultFormat;
|
||||
bool m_themesOnly;
|
||||
};
|
||||
|
Reference in New Issue
Block a user