1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Set window icons on settings window

This commit is contained in:
agilob 2016-01-03 13:06:24 +00:00
parent cb43a9b70e
commit f7118071b7
No known key found for this signature in database
GPG Key ID: 296F0B764741106C
2 changed files with 5 additions and 2 deletions

View File

@ -1094,7 +1094,7 @@ QSplitter:handle{
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>775</width> <width>775</width>
<height>284</height> <height>279</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"/> <layout class="QVBoxLayout" name="verticalLayout_5"/>

View File

@ -682,7 +682,7 @@ void Widget::setWindowTitle(const QString& title)
void Widget::forceShow() void Widget::forceShow()
{ {
hide(); // Workaround to force minimized window to be restored hide(); // Workaround to force minimized window to be restored
show(); show();
activateWindow(); activateWindow();
} }
@ -785,6 +785,7 @@ void Widget::onSettingsClicked()
settingsWidget->show(createContentDialog(SettingDialog)); settingsWidget->show(createContentDialog(SettingDialog));
setActiveToolMenuButton(Widget::None); setActiveToolMenuButton(Widget::None);
settingsWidget->setWindowIcon(QIcon(":/img/settings.svg"));
} }
else else
{ {
@ -803,6 +804,7 @@ void Widget::showProfile() // onAvatarClicked, onUsernameClicked
profileForm->show(createContentDialog(ProfileDialog)); profileForm->show(createContentDialog(ProfileDialog));
setActiveToolMenuButton(Widget::None); setActiveToolMenuButton(Widget::None);
settingsWidget->setWindowIcon(QIcon(":/img/icons/qtox.svg"));
} }
else else
{ {
@ -1368,6 +1370,7 @@ ContentLayout* Widget::createContentDialog(DialogType type)
void retranslateUi() void retranslateUi()
{ {
setWindowTitle(Core::getInstance()->getUsername() + QStringLiteral(" - ") + Widget::fromDialogType(type)); setWindowTitle(Core::getInstance()->getUsername() + QStringLiteral(" - ") + Widget::fromDialogType(type));
setWindowIcon(QIcon(":/img/settings.svg"));
} }
protected: protected: