notifs: use empty color for auto

This commit is contained in:
vaxerski 2023-03-20 15:32:11 +00:00
parent 34da16b7e6
commit 316674fecf
3 changed files with 3 additions and 3 deletions

View file

@ -2299,6 +2299,6 @@ void CCompositor::performUserChecks() {
if (std::ranges::any_of(BAD_PORTALS, [&](const std::string& portal) { return std::filesystem::exists("/usr/share/xdg-desktop-portal/portals/" + portal + ".portal"); })) { if (std::ranges::any_of(BAD_PORTALS, [&](const std::string& portal) { return std::filesystem::exists("/usr/share/xdg-desktop-portal/portals/" + portal + ".portal"); })) {
// bad portal detected // bad portal detected
g_pHyprNotificationOverlay->addNotification("You have one or more incompatible xdg-desktop-portal impls installed. Please remove incompatible ones to avoid issues.", g_pHyprNotificationOverlay->addNotification("You have one or more incompatible xdg-desktop-portal impls installed. Please remove incompatible ones to avoid issues.",
ICONS_COLORS[ICON_ERROR], 15000, ICON_ERROR); CColor(0), 15000, ICON_ERROR);
} }
} }

View file

@ -40,7 +40,7 @@ void CHyprNotificationOverlay::addNotification(const std::string& text, const CC
const auto PNOTIF = m_dNotifications.emplace_back(std::make_unique<SNotification>()).get(); const auto PNOTIF = m_dNotifications.emplace_back(std::make_unique<SNotification>()).get();
PNOTIF->text = text; PNOTIF->text = text;
PNOTIF->color = color; PNOTIF->color = color == CColor(0) ? ICONS_COLORS[icon] : color;
PNOTIF->started.reset(); PNOTIF->started.reset();
PNOTIF->timeMs = timeMs; PNOTIF->timeMs = timeMs;
PNOTIF->icon = icon; PNOTIF->icon = icon;

View file

@ -222,7 +222,7 @@ namespace HyprlandAPI {
data has to contain: data has to contain:
- text: std::string or const char* - text: std::string or const char*
- time: uint64_t - time: uint64_t
- color: CColor - color: CColor -> CColor(0) will apply the default color for the notification icon
data may contain: data may contain:
- icon: eIcons - icon: eIcons