mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(ui): set icon in dialog constructor
Fixes #4430. Moved `setWindowIcon` to dialog constructor and removed all other occurrences.
This commit is contained in:
parent
65b1463933
commit
b518aa8488
|
@ -841,7 +841,6 @@ void Widget::onShowSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
setActiveToolMenuButton(ActiveToolMenuButton::None);
|
setActiveToolMenuButton(ActiveToolMenuButton::None);
|
||||||
settingsWidget->setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
|
||||||
} else {
|
} else {
|
||||||
hideMainForms(nullptr);
|
hideMainForms(nullptr);
|
||||||
settingsWidget->show(contentLayout);
|
settingsWidget->show(contentLayout);
|
||||||
|
@ -858,7 +857,6 @@ void Widget::showProfile() // onAvatarClicked, onUsernameClicked
|
||||||
}
|
}
|
||||||
|
|
||||||
setActiveToolMenuButton(ActiveToolMenuButton::None);
|
setActiveToolMenuButton(ActiveToolMenuButton::None);
|
||||||
settingsWidget->setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
|
||||||
} else {
|
} else {
|
||||||
hideMainForms(nullptr);
|
hideMainForms(nullptr);
|
||||||
profileForm->show(contentLayout);
|
profileForm->show(contentLayout);
|
||||||
|
@ -1521,6 +1519,7 @@ ContentLayout* Widget::createContentDialog(DialogType type) const
|
||||||
restoreGeometry(Settings::getInstance().getDialogSettingsGeometry());
|
restoreGeometry(Settings::getInstance().getDialogSettingsGeometry());
|
||||||
Translator::registerHandler(std::bind(&Dialog::retranslateUi, this), this);
|
Translator::registerHandler(std::bind(&Dialog::retranslateUi, this), this);
|
||||||
retranslateUi();
|
retranslateUi();
|
||||||
|
setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
||||||
|
|
||||||
connect(Core::getInstance(), &Core::usernameSet, this, &Dialog::retranslateUi);
|
connect(Core::getInstance(), &Core::usernameSet, this, &Dialog::retranslateUi);
|
||||||
}
|
}
|
||||||
|
@ -1536,7 +1535,6 @@ ContentLayout* Widget::createContentDialog(DialogType type) const
|
||||||
{
|
{
|
||||||
setWindowTitle(Core::getInstance()->getUsername() + QStringLiteral(" - ")
|
setWindowTitle(Core::getInstance()->getUsername() + QStringLiteral(" - ")
|
||||||
+ Widget::fromDialogType(type));
|
+ Widget::fromDialogType(type));
|
||||||
setWindowIcon(QIcon(":/img/icons/qtox.svg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user