From a1729222bc585057299c385a34aa269f000bb689 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Wed, 25 Mar 2026 11:06:30 -0500 Subject: [PATCH] TabLabel sets its own tooltip so all tabs have a tooltip rather than just devices --- qt/OpenRGBDialog/OpenRGBDialog.cpp | 2 -- qt/TabLabel.cpp | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/OpenRGBDialog/OpenRGBDialog.cpp b/qt/OpenRGBDialog/OpenRGBDialog.cpp index 04c1604ec..7f3837912 100644 --- a/qt/OpenRGBDialog/OpenRGBDialog.cpp +++ b/qt/OpenRGBDialog/OpenRGBDialog.cpp @@ -1021,7 +1021,6 @@ void OpenRGBDialog::UpdateDevicesList() TabLabel* NewTabLabel = new TabLabel(OpenRGBFont::GetIconIDFromDeviceType(controllers[controller_idx]->GetDeviceType()), (char *)controllers[controller_idx]->GetName().c_str(), (char *)context, false); ui->DevicesTabBar->tabBar()->setTabButton(ui->DevicesTabBar->count() - 1, QTabBar::LeftSide, NewTabLabel); - ui->DevicesTabBar->tabBar()->setTabToolTip(ui->DevicesTabBar->count() - 1, QString::fromStdString(controllers[controller_idx]->GetName())); /*---------------------------------*\ | Now move the new tab to the | @@ -1089,7 +1088,6 @@ void OpenRGBDialog::UpdateDevicesList() TabLabel* NewTabLabel = new TabLabel(OpenRGBFont::GetIconIDFromDeviceType(controllers[controller_idx]->GetDeviceType()), (char *)controllers[controller_idx]->GetName().c_str(), (char *)context, false); ui->DevicesTabBar->tabBar()->setTabButton(ui->DevicesTabBar->count() - 1, QTabBar::LeftSide, NewTabLabel); - ui->DevicesTabBar->tabBar()->setTabToolTip(ui->DevicesTabBar->count() - 1, QString::fromStdString(controllers[controller_idx]->GetName())); /*-----------------------------------------*\ | Now move the new tab to the correct | diff --git a/qt/TabLabel.cpp b/qt/TabLabel.cpp index a5cd5908d..e83acf8cc 100644 --- a/qt/TabLabel.cpp +++ b/qt/TabLabel.cpp @@ -92,6 +92,7 @@ void TabLabel::UpdateLabel(bool in_constructor) \*-------------------------------------------------*/ QApplication* app = static_cast(QApplication::instance()); ui->name->setText(app->translate(context, label)); + setToolTip(app->translate(context, label)); } else if(in_constructor) { @@ -100,5 +101,6 @@ void TabLabel::UpdateLabel(bool in_constructor) | translatable as label buffer may not exist | \*-------------------------------------------------*/ ui->name->setText(label); + setToolTip(label); } }