Switch crash reporter to system fonts
This should prevent nested crashes when loading custom fonts
This commit is contained in:
parent
8d2805f226
commit
bae9af1076
|
@ -32,8 +32,6 @@ constexpr auto kDefaultProxyPort = 80;
|
||||||
PreLaunchWindow *PreLaunchWindowInstance = nullptr;
|
PreLaunchWindow *PreLaunchWindowInstance = nullptr;
|
||||||
|
|
||||||
PreLaunchWindow::PreLaunchWindow(QString title) {
|
PreLaunchWindow::PreLaunchWindow(QString title) {
|
||||||
style::internal::StartFonts();
|
|
||||||
|
|
||||||
setWindowIcon(Window::CreateIcon());
|
setWindowIcon(Window::CreateIcon());
|
||||||
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
|
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
|
||||||
|
|
||||||
|
@ -99,7 +97,6 @@ PreLaunchWindow::~PreLaunchWindow() {
|
||||||
|
|
||||||
PreLaunchLabel::PreLaunchLabel(QWidget *parent) : QLabel(parent) {
|
PreLaunchLabel::PreLaunchLabel(QWidget *parent) : QLabel(parent) {
|
||||||
QFont labelFont(font());
|
QFont labelFont(font());
|
||||||
labelFont.setFamily(style::internal::GetFontOverride(style::internal::FontSemibold));
|
|
||||||
labelFont.setWeight(QFont::DemiBold);
|
labelFont.setWeight(QFont::DemiBold);
|
||||||
labelFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
labelFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
||||||
setFont(labelFont);
|
setFont(labelFont);
|
||||||
|
@ -119,7 +116,6 @@ void PreLaunchLabel::setText(const QString &text) {
|
||||||
|
|
||||||
PreLaunchInput::PreLaunchInput(QWidget *parent, bool password) : QLineEdit(parent) {
|
PreLaunchInput::PreLaunchInput(QWidget *parent, bool password) : QLineEdit(parent) {
|
||||||
QFont logFont(font());
|
QFont logFont(font());
|
||||||
logFont.setFamily(style::internal::GetFontOverride());
|
|
||||||
logFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
logFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
||||||
setFont(logFont);
|
setFont(logFont);
|
||||||
|
|
||||||
|
@ -140,7 +136,6 @@ PreLaunchInput::PreLaunchInput(QWidget *parent, bool password) : QLineEdit(paren
|
||||||
|
|
||||||
PreLaunchLog::PreLaunchLog(QWidget *parent) : QTextEdit(parent) {
|
PreLaunchLog::PreLaunchLog(QWidget *parent) : QTextEdit(parent) {
|
||||||
QFont logFont(font());
|
QFont logFont(font());
|
||||||
logFont.setFamily(style::internal::GetFontOverride());
|
|
||||||
logFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
logFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
||||||
setFont(logFont);
|
setFont(logFont);
|
||||||
|
|
||||||
|
@ -163,7 +158,6 @@ PreLaunchButton::PreLaunchButton(QWidget *parent, bool confirm) : QPushButton(pa
|
||||||
setObjectName(confirm ? "confirm" : "cancel");
|
setObjectName(confirm ? "confirm" : "cancel");
|
||||||
|
|
||||||
QFont closeFont(font());
|
QFont closeFont(font());
|
||||||
closeFont.setFamily(style::internal::GetFontOverride(style::internal::FontSemibold));
|
|
||||||
closeFont.setWeight(QFont::DemiBold);
|
closeFont.setWeight(QFont::DemiBold);
|
||||||
closeFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
closeFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
||||||
setFont(closeFont);
|
setFont(closeFont);
|
||||||
|
@ -183,7 +177,6 @@ PreLaunchCheckbox::PreLaunchCheckbox(QWidget *parent) : QCheckBox(parent) {
|
||||||
setCheckState(Qt::Checked);
|
setCheckState(Qt::Checked);
|
||||||
|
|
||||||
QFont closeFont(font());
|
QFont closeFont(font());
|
||||||
closeFont.setFamily(style::internal::GetFontOverride(style::internal::FontSemibold));
|
|
||||||
closeFont.setWeight(QFont::DemiBold);
|
closeFont.setWeight(QFont::DemiBold);
|
||||||
closeFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
closeFont.setPixelSize(static_cast<PreLaunchWindow*>(parent)->basicSize());
|
||||||
setFont(closeFont);
|
setFont(closeFont);
|
||||||
|
|
Loading…
Reference in New Issue