diff --git a/qt/DeviceView.cpp b/qt/DeviceView.cpp
index d1b3ff6d..e1be4a41 100644
--- a/qt/DeviceView.cpp
+++ b/qt/DeviceView.cpp
@@ -390,6 +390,14 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
QPainter painter(this);
QFont font = painter.font();
+ /*-----------------------------------------------------*\
+ | If Device View is hidden, don't paint |
+ \*-----------------------------------------------------*/
+ if(isHidden())
+ {
+ return;
+ }
+
/*-----------------------------------------------------*\
| If controller has resized, reinitialize local data |
\*-----------------------------------------------------*/
diff --git a/qt/OpenRGBDevicePage.cpp b/qt/OpenRGBDevicePage.cpp
index fc1251b8..ee68af2e 100644
--- a/qt/OpenRGBDevicePage.cpp
+++ b/qt/OpenRGBDevicePage.cpp
@@ -28,6 +28,7 @@ OpenRGBDevicePage::OpenRGBDevicePage(RGBController *dev, QWidget *parent) :
QPalette pal;
ui->DeviceViewBox->setController(device);
+ ui->DeviceViewBox->hide();
device->RegisterUpdateCallback(UpdateCallback, this);
@@ -1114,3 +1115,13 @@ void Ui::OpenRGBDevicePage::on_ResizeButton_clicked()
break;
}
}
+
+void Ui::OpenRGBDevicePage::ShowDeviceView()
+{
+ ui->DeviceViewBox->show();
+}
+
+void Ui::OpenRGBDevicePage::HideDeviceView()
+{
+ ui->DeviceViewBox->hide();
+}
diff --git a/qt/OpenRGBDevicePage.h b/qt/OpenRGBDevicePage.h
index 11a1819a..b471e766 100644
--- a/qt/OpenRGBDevicePage.h
+++ b/qt/OpenRGBDevicePage.h
@@ -23,6 +23,8 @@ public:
void UpdateDevice();
void UpdateMode();
void UpdateModeUi();
+ void ShowDeviceView();
+ void HideDeviceView();
private slots:
void UpdateInterface();
diff --git a/qt/OpenRGBDevicePage.ui b/qt/OpenRGBDevicePage.ui
index 92eeb39e..c31cd5f6 100644
--- a/qt/OpenRGBDevicePage.ui
+++ b/qt/OpenRGBDevicePage.ui
@@ -14,138 +14,30 @@
Frame
- -
-
-
- -
-
-
- 255
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- S:
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
- 255
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- G:
-
-
-
- -
-
-
- Colors:
-
-
-
- -
-
-
- 359
-
-
-
- -
-
-
- 255
-
-
-
- -
-
-
- Per-LED
-
-
-
- -
-
-
- H:
-
-
+
-
+
-
- -
-
-
- Mode:
+
-
+
+
+ 255
- -
-
+
-
+
-
+ Dir:
- -
-
+
-
+
-
-
-
-
- -
-
-
- R:
-
-
-
- -
-
-
- V:
-
-
-
- -
-
-
- Speed:
+ Zone:
@@ -156,24 +48,48 @@
- -
-
-
- B:
+
-
+
+
+ -
+
+
+ 255
- -
-
+
-
+
- -
-
-
- 255
+
-
+
+
+ Resize
+
+
+
+ -
+
+
+ LED:
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ Speed:
@@ -188,49 +104,81 @@
0
- 100
+ 0
- -
-
+
-
+
+ -
+
+
+ H:
+
+
+
+ -
+
+
+ Mode:
+
+
+
+ -
+
+
+ Per-LED
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Colors:
+
+
+
+ -
+
+
+ 255
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ 359
+
+
+
-
- -
-
-
- -
-
-
- Mode-Specific
-
-
-
- -
-
-
- LED:
-
-
-
- -
-
-
- Random
-
-
-
- -
-
-
- Dir:
+
-
+
+
+ 255
@@ -241,17 +189,31 @@
- -
-
+
-
+
- Resize
+ V:
- -
-
+
-
+
- Zone:
+ R:
+
+
+
+ -
+
+
+ Random
+
+
+
+ -
+
+
+ S:
@@ -262,6 +224,44 @@
+ -
+
+
+ B:
+
+
+
+ -
+
+
+ Mode-Specific
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ G:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
diff --git a/qt/OpenRGBDialog2.cpp b/qt/OpenRGBDialog2.cpp
index 8c9a014a..974c0667 100644
--- a/qt/OpenRGBDialog2.cpp
+++ b/qt/OpenRGBDialog2.cpp
@@ -79,6 +79,7 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector& bus, std::vec
SMBusToolsPage = NULL;
SoftInfoPage = NULL;
+ ui->ButtonToggleDeviceView->setVisible(false);
ui->ButtonLoadProfile->setVisible(false);
ui->ButtonSaveProfile->setVisible(false);
ui->ButtonDeleteProfile->setVisible(false);
@@ -452,6 +453,7 @@ void OpenRGBDialog2::on_ClientListUpdated()
ui->DetectionProgressBar->setVisible(false);
ui->DetectionProgressLabel->setVisible(false);
+ ui->ButtonToggleDeviceView->setVisible(true);
ui->ButtonLoadProfile->setVisible(true);
ui->ButtonSaveProfile->setVisible(true);
ui->ButtonDeleteProfile->setVisible(true);
@@ -586,3 +588,23 @@ void Ui::OpenRGBDialog2::on_ButtonDeleteProfile_clicked()
}
}
}
+
+void Ui::OpenRGBDialog2::on_ButtonToggleDeviceView_clicked()
+{
+ if(device_view_showing)
+ {
+ for(int device = 0; device < ui->DevicesTabBar->count(); device++)
+ {
+ qobject_cast(ui->DevicesTabBar->widget(device))->HideDeviceView();
+ }
+ device_view_showing = false;
+ }
+ else
+ {
+ for(int device = 0; device < ui->DevicesTabBar->count(); device++)
+ {
+ qobject_cast(ui->DevicesTabBar->widget(device))->ShowDeviceView();
+ }
+ device_view_showing = true;
+ }
+}
diff --git a/qt/OpenRGBDialog2.h b/qt/OpenRGBDialog2.h
index 00780500..a6a05dc1 100644
--- a/qt/OpenRGBDialog2.h
+++ b/qt/OpenRGBDialog2.h
@@ -72,6 +72,8 @@ private:
void UpdateProfileList();
void closeEvent(QCloseEvent *event);
+ bool device_view_showing = false;
+
private slots:
void on_Exit();
void on_LightsOff();
@@ -90,6 +92,7 @@ private slots:
void on_ButtonSaveProfile_clicked();
void on_ButtonLoadProfile_clicked();
void on_ButtonDeleteProfile_clicked();
+ void on_ButtonToggleDeviceView_clicked();
};
#endif // OPENRGBDIALOG2_H
diff --git a/qt/OpenRGBDialog2.ui b/qt/OpenRGBDialog2.ui
index 719ed297..4220afff 100644
--- a/qt/OpenRGBDialog2.ui
+++ b/qt/OpenRGBDialog2.ui
@@ -15,7 +15,28 @@
- -
+
-
+
+
+ 24
+
+
+
+ -
+
+
+ Delete Profile
+
+
+
+ -
+
+
+ Load Profile
+
+
+
+ -
QTabWidget::Rounded
@@ -62,30 +83,6 @@
- -
-
-
- Delete Profile
-
-
-
- -
-
-
- -
-
-
- Load Profile
-
-
-
- -
-
-
- Save Profile
-
-
-
-
@@ -96,10 +93,20 @@
- -
-
-
- 24
+
-
+
+
+ -
+
+
+ Toggle LED View
+
+
+
+ -
+
+
+ Save Profile