From 6099fc6fdf09e9f4efa35da8f774e5700b23d99f Mon Sep 17 00:00:00 2001 From: joern274 Date: Wed, 28 Feb 2024 09:11:00 +0100 Subject: [PATCH] Grey out filedialog icon when disabled --- plugins/simulator/waveform_viewer/src/wizard.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/simulator/waveform_viewer/src/wizard.cpp b/plugins/simulator/waveform_viewer/src/wizard.cpp index e0b9f36ea7f..69712b54be9 100644 --- a/plugins/simulator/waveform_viewer/src/wizard.cpp +++ b/plugins/simulator/waveform_viewer/src/wizard.cpp @@ -467,7 +467,13 @@ namespace hal { hlay->addWidget(mEditFilename); mButFiledialog = new QPushButton(this); - mButFiledialog->setIcon(gui_utility::getStyledSvgIcon("all->#3192C5", ":/icons/folder")); + QSize iconSize(17,17); + QIcon iconFdAct = gui_utility::getStyledSvgIcon("all->#3192C5", ":/icons/folder"); + QIcon iconFdDis = gui_utility::getStyledSvgIcon("all->#515050", ":/icons/folder"); + QIcon iconFd; + iconFd.addPixmap(iconFdAct.pixmap(iconSize),QIcon::Normal); + iconFd.addPixmap(iconFdDis.pixmap(iconSize),QIcon::Disabled); + mButFiledialog->setIcon(iconFd); mButFiledialog->setIconSize(QSize(17, 17)); connect(mButFiledialog, &QPushButton::clicked, this, &PageInputData::openFileBrowser);