aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-03-20 15:32:11 +0000
committervaxerski <[email protected]>2023-03-20 15:32:11 +0000
commit316674fecf0934998ba5eb9cdcc1e3c1cbef0197 (patch)
tree9c55bf2d300fb5e0246345bd9e94a5e6388b5d5d
parent34da16b7e626be4d96c3098b5265e2c008fb2d65 (diff)
downloadHyprland-316674fecf0934998ba5eb9cdcc1e3c1cbef0197.tar.gz
Hyprland-316674fecf0934998ba5eb9cdcc1e3c1cbef0197.zip
notifs: use empty color for auto
-rw-r--r--src/Compositor.cpp2
-rw-r--r--src/debug/HyprNotificationOverlay.cpp2
-rw-r--r--src/plugins/PluginAPI.hpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 25950a27..5650a657 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -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);
}
}
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index fd4932c6..b19f56fa 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -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;
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index 80744bc3..813d7462 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -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