Make sure all sizes are scaled by window size, make sure all elements are visible for very low resolutions and text doesn't get too small

This commit is contained in:
dec05eba
2024-08-06 08:59:38 +02:00
parent b3f5a53ece
commit b229b060ad
8 changed files with 81 additions and 45 deletions

View File

@@ -37,13 +37,13 @@ namespace gsr {
if(!theme->title_font_file.load("/usr/share/fonts/noto/NotoSans-Bold.ttf", mgl::MemoryMappedFile::LoadOptions{true, false}))
goto error;
if(!theme->title_font.load_from_file(theme->title_font_file, window_size.y * 0.019f))
if(!theme->title_font.load_from_file(theme->title_font_file, std::max(16.0f, window_size.y * 0.019f)))
goto error;
if(!theme->top_bar_font.load_from_file(theme->title_font_file, window_size.y * 0.03f))
if(!theme->top_bar_font.load_from_file(theme->title_font_file, std::max(23.0f, window_size.y * 0.03f)))
goto error;
if(!theme->body_font.load_from_file(theme->body_font_file, window_size.y * 0.015f))
if(!theme->body_font.load_from_file(theme->body_font_file, std::max(13.0f, window_size.y * 0.015f)))
goto error;
if(!theme->combobox_arrow.load_from_file((resources_path + "images/combobox_arrow.png").c_str(), {false, false, false}))