mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 04:01:56 -07:00
notifs: use empty color for auto
This commit is contained in:
@@ -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"); })) {
|
||||
// bad portal detected
|
||||
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();
|
||||
|
||||
PNOTIF->text = text;
|
||||
PNOTIF->color = color;
|
||||
PNOTIF->color = color == CColor(0) ? ICONS_COLORS[icon] : color;
|
||||
PNOTIF->started.reset();
|
||||
PNOTIF->timeMs = timeMs;
|
||||
PNOTIF->icon = icon;
|
||||
|
@@ -222,7 +222,7 @@ namespace HyprlandAPI {
|
||||
data has to contain:
|
||||
- text: std::string or const char*
|
||||
- time: uint64_t
|
||||
- color: CColor
|
||||
- color: CColor -> CColor(0) will apply the default color for the notification icon
|
||||
|
||||
data may contain:
|
||||
- icon: eIcons
|
||||
|
Reference in New Issue
Block a user