From e504579e175e41c2d9af8a625ce7d376f6ac6798 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 27 Apr 2026 23:48:29 +0200 Subject: [PATCH] Round font size --- src/Theme.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Theme.cpp b/src/Theme.cpp index 41bb561..7df731e 100644 --- a/src/Theme.cpp +++ b/src/Theme.cpp @@ -2,6 +2,7 @@ #include "../include/Config.hpp" #include "../include/GsrInfo.hpp" +#include #include namespace gsr { @@ -39,9 +40,9 @@ namespace gsr { window_width = window_size.x; window_height = window_size.y; - theme->title_font_desc = std::string("Noto Sans Bold ") + std::to_string((int)(std::max(16.0f, window_size.y * 0.019f)/1.77)); - theme->top_bar_font_desc = std::string("Noto Sans Bold ") + std::to_string((int)(std::max(23.0f, window_size.y * 0.03f)/1.77)); - theme->body_font_desc = std::string("Noto Sans ") + std::to_string((int)(std::max(13.0f, window_size.y * 0.015f)/1.77)); + theme->title_font_desc = std::string("Noto Sans Bold ") + std::to_string(std::round(std::max(16.0f, window_size.y * 0.019f)/1.8)); + theme->top_bar_font_desc = std::string("Noto Sans Bold ") + std::to_string(std::round(std::max(23.0f, window_size.y * 0.03f)/1.8)); + theme->body_font_desc = std::string("Noto Sans ") + std::to_string(std::round(std::max(13.0f, window_size.y * 0.015f)/1.8)); theme->camera_setup_font_desc = "Noto Sans 14"; return true;