Support for Terminal commands #21

已关闭
crtxcr 请求将 3 次代码提交从 wip/terminalkeyword 合并至 master
仅显示提交 2b1fb5b0c2 的更改 - 显示所有提交

查看文件

@ -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())
{