mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-11 04:35:05 +01:00
Merge pull request #4010 from zhaowenlan1779/statusbar-retheme
qt_themes: add themed connected/disconnected icons for dark and fix status bar theme updating
This commit is contained in:
commit
7b46b7e29a
BIN
dist/qt_themes/qdarkstyle/icons/16x16/connected.png
vendored
Normal file
BIN
dist/qt_themes/qdarkstyle/icons/16x16/connected.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 397 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png
vendored
Normal file
BIN
dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 444 B |
2
dist/qt_themes/qdarkstyle/style.qrc
vendored
2
dist/qt_themes/qdarkstyle/style.qrc
vendored
@ -1,6 +1,8 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="icons/qdarkstyle">
|
<qresource prefix="icons/qdarkstyle">
|
||||||
<file alias="index.theme">icons/index.theme</file>
|
<file alias="index.theme">icons/index.theme</file>
|
||||||
|
<file alias="16x16/connected.png">icons/16x16/connected.png</file>
|
||||||
|
<file alias="16x16/disconnected.png">icons/16x16/disconnected.png</file>
|
||||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||||
|
@ -448,6 +448,8 @@ void GMainWindow::ConnectWidgetEvents() {
|
|||||||
connect(this, &GMainWindow::UpdateProgress, this, &GMainWindow::OnUpdateProgress);
|
connect(this, &GMainWindow::UpdateProgress, this, &GMainWindow::OnUpdateProgress);
|
||||||
connect(this, &GMainWindow::CIAInstallReport, this, &GMainWindow::OnCIAInstallReport);
|
connect(this, &GMainWindow::CIAInstallReport, this, &GMainWindow::OnCIAInstallReport);
|
||||||
connect(this, &GMainWindow::CIAInstallFinished, this, &GMainWindow::OnCIAInstallFinished);
|
connect(this, &GMainWindow::CIAInstallFinished, this, &GMainWindow::OnCIAInstallFinished);
|
||||||
|
connect(this, &GMainWindow::UpdateThemedIcons, multiplayer_state,
|
||||||
|
&MultiplayerState::UpdateThemedIcons);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::ConnectMenuEvents() {
|
void GMainWindow::ConnectMenuEvents() {
|
||||||
|
@ -134,6 +134,14 @@ void MultiplayerState::OnAnnounceFailed(const Common::WebResult& result) {
|
|||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MultiplayerState::UpdateThemedIcons() {
|
||||||
|
if (current_state == Network::RoomMember::State::Joined) {
|
||||||
|
status_icon->setPixmap(QIcon::fromTheme("connected").pixmap(16));
|
||||||
|
} else {
|
||||||
|
status_icon->setPixmap(QIcon::fromTheme("disconnected").pixmap(16));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void BringWidgetToFront(QWidget* widget) {
|
static void BringWidgetToFront(QWidget* widget) {
|
||||||
widget->show();
|
widget->show();
|
||||||
widget->activateWindow();
|
widget->activateWindow();
|
||||||
|
@ -46,6 +46,7 @@ public slots:
|
|||||||
void OnOpenNetworkRoom();
|
void OnOpenNetworkRoom();
|
||||||
void OnDirectConnectToRoom();
|
void OnDirectConnectToRoom();
|
||||||
void OnAnnounceFailed(const Common::WebResult&);
|
void OnAnnounceFailed(const Common::WebResult&);
|
||||||
|
void UpdateThemedIcons();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void NetworkStateChanged(const Network::RoomMember::State&);
|
void NetworkStateChanged(const Network::RoomMember::State&);
|
||||||
|
Loading…
Reference in New Issue
Block a user