summaryrefslogtreecommitdiff
path: root/src/debug/HyprNotificationOverlay.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-08-14 19:44:56 +0500
committerGitHub <noreply@github.com>2025-08-14 15:44:56 +0100
commitbeee22a95ed9044950e5486f22edd813e00ffa2c (patch)
tree4612fa3d9b17275d417a059c19f998c64e871997 /src/debug/HyprNotificationOverlay.cpp
parentaa6a78f0a4e17c49ed4aff8b58c3f7ec7ef0408f (diff)
refactor: Use new hyprutils casts (#11377)
Diffstat (limited to 'src/debug/HyprNotificationOverlay.cpp')
-rw-r--r--src/debug/HyprNotificationOverlay.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp
index 1e244446..4c3c0520 100644
--- a/src/debug/HyprNotificationOverlay.cpp
+++ b/src/debug/HyprNotificationOverlay.cpp
@@ -58,7 +58,7 @@ void CHyprNotificationOverlay::dismissNotifications(const int amount) {
if (amount == -1)
m_notifications.clear();
else {
- const int AMT = std::min(amount, static_cast<int>(m_notifications.size()));
+ const int AMT = std::min(amount, sc<int>(m_notifications.size()));
for (int i = 0; i < AMT; ++i) {
m_notifications.erase(m_notifications.begin());
@@ -94,7 +94,7 @@ CBox CHyprNotificationOverlay::drawNotifications(PHLMONITOR pMonitor) {
for (auto const& notif : m_notifications) {
const auto ICONPADFORNOTIF = notif->icon == ICON_NONE ? 0 : ICON_PAD;
- const auto FONTSIZE = std::clamp((int)(notif->fontSize * ((pMonitor->m_pixelSize.x * SCALE) / 1920.f)), 8, 40);
+ const auto FONTSIZE = std::clamp(sc<int>(notif->fontSize * ((pMonitor->m_pixelSize.x * SCALE) / 1920.f)), 8, 40);
// first rect (bg, col)
const float FIRSTRECTANIMP =
@@ -189,7 +189,7 @@ CBox CHyprNotificationOverlay::drawNotifications(PHLMONITOR pMonitor) {
// cleanup notifs
std::erase_if(m_notifications, [](const auto& notif) { return notif->started.getMillis() > notif->timeMs; });
- return CBox{(int)(pMonitor->m_position.x + pMonitor->m_size.x - maxWidth - 20), (int)pMonitor->m_position.y, (int)maxWidth + 20, (int)offsetY + 10};
+ return CBox{sc<int>(pMonitor->m_position.x + pMonitor->m_size.x - maxWidth - 20), sc<int>(pMonitor->m_position.y), sc<int>(maxWidth) + 20, sc<int>(offsetY) + 10};
}
void CHyprNotificationOverlay::draw(PHLMONITOR pMonitor) {