mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 14:45:58 +01:00
notifs: use empty color for auto
This commit is contained in:
parent
34da16b7e6
commit
316674fecf
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue