Skip to content

Commit

Permalink
Fix icon not being displayed for matches
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Mar 17, 2024
1 parent c880d99 commit 9e8bed5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/runner/nordvpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <KConfigGroup>
#include <KSharedConfig>
#include <QFileInfo>

void NordVPN::init()
{
Expand All @@ -24,12 +25,14 @@ void NordVPN::init()
suspendMatching(true);
vpnStatus.updateConnectionStatus();
});
reloadConfiguration();
}

void NordVPN::reloadConfiguration()
{
const KConfigGroup cg = config();
icon = QIcon::fromTheme(cg.readEntry("icon", "nordvpn"), QIcon("/var/lib/nordvpn/icon.svg"));
QIcon fallback{QFileInfo::exists("/var/lib/nordvpn/icon.svg") ? QIcon("/var/lib/nordvpn/icon.svg") : QIcon()};
icon = QIcon::fromTheme(cg.readEntry("icon", "/usr/share/pixmaps/nordvpn.png"), fallback);
notify = cg.readEntry("notify", true);
}

Expand Down

0 comments on commit 9e8bed5

Please sign in to comment.