@@ -261,20 +261,25 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
261261 UpdateDevicesList ();
262262
263263 /* -----------------------------------------------------*\
264- | Add Server Tab |
264+ | Add Client Tab |
265265 \*-----------------------------------------------------*/
266- AddServerTab ();
266+ AddClientTab ();
267267
268268 /* -----------------------------------------------------*\
269- | Add Client Tab |
269+ | Add Server Tab |
270270 \*-----------------------------------------------------*/
271- AddClientTab ();
271+ AddServerTab ();
272272
273273 /* -----------------------------------------------------*\
274274 | Add the Software Info page |
275275 \*-----------------------------------------------------*/
276276 AddSoftwareInfoPage ();
277277
278+ /* -----------------------------------------------------*\
279+ | Add the upported Devices page |
280+ \*-----------------------------------------------------*/
281+ AddSupportedDevicesPage ();
282+
278283 /* -----------------------------------------------------*\
279284 | Add the SMBus Tools page if enabled |
280285 \*-----------------------------------------------------*/
@@ -324,6 +329,35 @@ void OpenRGBDialog2::AddSoftwareInfoPage()
324329 ui->InformationTabBar ->tabBar ()->setTabButton (ui->InformationTabBar ->tabBar ()->count () - 1 , QTabBar::LeftSide, SoftwareTabLabel);
325330}
326331
332+ void OpenRGBDialog2::AddSupportedDevicesPage ()
333+ {
334+ /* -----------------------------------------------------*\
335+ | Create the Supported Devices page |
336+ \*-----------------------------------------------------*/
337+ SupportedPage = new OpenRGBSupportedDevicesPage ();
338+
339+ ui->SettingsTabBar ->addTab (SupportedPage, " " );
340+
341+ QString SupportedLabelString = " <html><table><tr><td width='30'><img src='" ;
342+ SupportedLabelString += " :/software" ;
343+ if (IsDarkTheme ()) SupportedLabelString += " _dark" ;
344+ SupportedLabelString += " .png' height='16' width='16'></td><td>Supported Devices</td></tr></table></html>" ;
345+
346+ QLabel *SupportedTabLabel = new QLabel ();
347+ SupportedTabLabel->setText (SupportedLabelString);
348+ SupportedTabLabel->setIndent (20 );
349+ if (IsDarkTheme ())
350+ {
351+ SupportedTabLabel->setGeometry (0 , 25 , 200 , 50 );
352+ }
353+ else
354+ {
355+ SupportedTabLabel->setGeometry (0 , 0 , 200 , 25 );
356+ }
357+
358+ ui->SettingsTabBar ->tabBar ()->setTabButton (ui->SettingsTabBar ->tabBar ()->count () - 1 , QTabBar::LeftSide, SupportedTabLabel);
359+ }
360+
327361void OpenRGBDialog2::AddI2CToolsPage ()
328362{
329363 ShowI2CTools = true ;
@@ -365,7 +399,7 @@ void OpenRGBDialog2::AddClientTab()
365399 if (ClientInfoPage == NULL )
366400 {
367401 ClientInfoPage = new OpenRGBClientInfoPage ();
368- ui->MainTabBar ->addTab ( ClientInfoPage, " SDK Client" );
402+ ui->MainTabBar ->insertTab ( 2 , ClientInfoPage, " SDK Client" );
369403
370404 /* -----------------------------------------------------*\
371405 | Connect the page's Set All button to the Set All slot |
@@ -394,7 +428,7 @@ void OpenRGBDialog2::AddServerTab()
394428 | Add server information tab if there is a server |
395429 \*-----------------------------------------------------*/
396430 OpenRGBServerInfoPage *ServerInfoPage = new OpenRGBServerInfoPage (ResourceManager::get ()->GetServer ());
397- ui->MainTabBar ->addTab ( ServerInfoPage, " SDK Server" );
431+ ui->MainTabBar ->insertTab ( 2 , ServerInfoPage, " SDK Server" );
398432}
399433
400434void OpenRGBDialog2::ClearDevicesList ()
@@ -426,7 +460,7 @@ void OpenRGBDialog2::UpdateDevicesList()
426460 \*-----------------------------------------------------*/
427461 bool found = false ;
428462
429- for (unsigned int tab_idx = 0 ; tab_idx < ui->DevicesTabBar ->count (); tab_idx++)
463+ for (int tab_idx = 0 ; tab_idx < ui->DevicesTabBar ->count (); tab_idx++)
430464 {
431465 OpenRGBDevicePage* page = (OpenRGBDevicePage*) ui->DevicesTabBar ->widget (tab_idx);
432466
@@ -501,7 +535,7 @@ void OpenRGBDialog2::UpdateDevicesList()
501535 \*-----------------------------------------------------*/
502536 found = false ;
503537
504- for (unsigned int tab_idx = 0 ; tab_idx < ui->InformationTabBar ->count (); tab_idx++)
538+ for (int tab_idx = 0 ; tab_idx < ui->InformationTabBar ->count (); tab_idx++)
505539 {
506540 /* -----------------------------------------------------*\
507541 | If type is a device info page, check it |
@@ -581,7 +615,7 @@ void OpenRGBDialog2::UpdateDevicesList()
581615 | Remove all remaining device information tabs, leaving |
582616 | other information tabs alone |
583617 \*-----------------------------------------------------*/
584- for (unsigned int tab_idx = controllers.size (); tab_idx < ui->InformationTabBar ->count (); tab_idx++)
618+ for (int tab_idx = controllers.size (); tab_idx < ui->InformationTabBar ->count (); tab_idx++)
585619 {
586620 std::string type_str = ui->InformationTabBar ->widget (tab_idx)->metaObject ()->className ();
587621 if (type_str == " Ui::OpenRGBDeviceInfoPage" )
0 commit comments