From 2b1fb5b0c2757bfda0503c9ad0d941541dc22cde Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 5 Oct 2020 22:28:18 +0200 Subject: [PATCH] EntryPushButton: Set term icon for terminal cmds w/o icon --- entrypushbutton.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/entrypushbutton.cpp b/entrypushbutton.cpp index 2f44b51..c2d29bf 100644 --- a/entrypushbutton.cpp +++ b/entrypushbutton.cpp @@ -23,7 +23,15 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton() { this->setText(config.name); this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - QIcon icon = resolveIcon(config.iconPath); + QIcon icon; + if(config.isTerminalCommand && config.iconPath.isEmpty()) + { + icon = resolveIcon("utilities-terminal"); + } + else + { + icon = resolveIcon(config.iconPath); + } this->setIcon(icon); if(!icon.availableSizes().isEmpty()) {