From 067df84388be41b7b2352918060c2e9d88717740 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 6 Mar 2024 22:20:26 +0100 Subject: notify: Add custom fontsize support for notifications (#4981) * Add custom fontsize support for notifications * Remove debug stuff * Use original default font size * Handle fontsize as keyword arg * Use CVarList::join instead of for loop * Use size_t for msgidx --- src/debug/HyprNotificationOverlay.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/debug/HyprNotificationOverlay.hpp') diff --git a/src/debug/HyprNotificationOverlay.hpp b/src/debug/HyprNotificationOverlay.hpp index ef81b014..5599b71b 100644 --- a/src/debug/HyprNotificationOverlay.hpp +++ b/src/debug/HyprNotificationOverlay.hpp @@ -31,8 +31,9 @@ struct SNotification { std::string text = ""; CColor color; CTimer started; - float timeMs = 0; - eIcons icon = ICON_NONE; + float timeMs = 0; + eIcons icon = ICON_NONE; + float fontSize = 13.f; }; class CHyprNotificationOverlay { @@ -40,7 +41,7 @@ class CHyprNotificationOverlay { CHyprNotificationOverlay(); void draw(CMonitor* pMonitor); - void addNotification(const std::string& text, const CColor& color, const float timeMs, const eIcons icon = ICON_NONE); + void addNotification(const std::string& text, const CColor& color, const float timeMs, const eIcons icon = ICON_NONE, const float fontSize = 13.f); void dismissNotifications(const int amount); bool hasAny(); -- cgit v1.2.3