Skip to content

Commit be22506

Browse files
committed
Make legend icons non-interactive
1 parent 3dddb48 commit be22506

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/mainwindow.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ void MainWindow::setup()
180180
w->setVisible(false);
181181
w->setChecked(false);
182182
}
183+
// Make legend buttons non-interactive (avoid hover/click hints)
184+
const QList<QAbstractButton *> legendButtons {
185+
ui->iconInstalledPackagesRepo,
186+
ui->iconUpgradableRepo,
187+
ui->iconInstalledPackages_2,
188+
ui->iconUpgradable_2,
189+
ui->iconInstalledPackages_4,
190+
};
191+
for (auto *button : legendButtons) {
192+
if (!button) {
193+
continue;
194+
}
195+
button->setFocusPolicy(Qt::NoFocus);
196+
button->setAttribute(Qt::WA_TransparentForMouseEvents, true);
197+
}
183198

184199
// Install custom header views with checkbox in column 0 (TreeCol::Check)
185200
headerEnabled = new CheckableHeaderView(Qt::Horizontal, ui->treeEnabled);

0 commit comments

Comments
 (0)