diff --git a/README.md b/README.md index e4da54ec..234762d1 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ Parameters that are enabled by default have to be explicitly disabled. These (cu | `cpu_load_change` | Changes the color of the CPU load depending on load | | `cpu_load_color` | Set the colors for the gpu load change low,medium and high. e.g `cpu_load_color=0000FF,00FFFF,FF00FF` | | `cpu_load_value` | Set the values for medium and high load e.g `cpu_load_value=50,90` | +| `cellpadding_y` | Set the vertical cellpadding, default is `-0.085` | Example: `MANGOHUD_CONFIG=cpu_temp,gpu_temp,position=top-right,height=500,font_size=32` diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 5b22c8b6..1db0f7ce 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -344,6 +344,7 @@ parse_font_glyph_ranges(const char *str) #define parse_alpha(s) parse_float(s) #define parse_permit_upload(s) parse_unsigned(s) #define parse_no_small_font(s) parse_unsigned(s) != 0 +#define parse_cellpadding_y(s) parse_float(s) #define parse_cpu_color(s) parse_color(s) #define parse_gpu_color(s) parse_color(s) @@ -533,6 +534,7 @@ parse_overlay_config(struct overlay_params *params, params->benchmark_percentiles = { "97", "AVG", "1", "0.1" }; params->gpu_load_value = { 90, 60 }; params->cpu_load_value = { 90, 60 }; + params->cellpadding_y = -0.085; diff --git a/src/overlay_params.h b/src/overlay_params.h index 798ddc76..314ad188 100644 --- a/src/overlay_params.h +++ b/src/overlay_params.h @@ -113,6 +113,7 @@ typedef unsigned long KeySym; OVERLAY_PARAM_CUSTOM(cpu_load_value) \ OVERLAY_PARAM_CUSTOM(gpu_load_color) \ OVERLAY_PARAM_CUSTOM(cpu_load_color) \ + OVERLAY_PARAM_CUSTOM(cellpadding_y) \ enum overlay_param_position { LAYER_POSITION_TOP_LEFT, @@ -182,6 +183,7 @@ struct overlay_params { float font_size_text; float font_scale_media_player; float background_alpha, alpha; + float cellpadding_y; std::vector toggle_hud; std::vector toggle_fps_limit; std::vector toggle_logging; diff --git a/src/vulkan.cpp b/src/vulkan.cpp index 98b96fbd..e2c2e61c 100644 --- a/src/vulkan.cpp +++ b/src/vulkan.cpp @@ -1782,7 +1782,7 @@ void convert_colors(bool do_conv, struct swapchain_stats& sw_stats, struct overl style.Colors[ImGuiCol_PlotHistogram] = convert(params.frametime_color); style.Colors[ImGuiCol_WindowBg] = convert(params.background_color); style.Colors[ImGuiCol_Text] = convert(params.text_color); - style.CellPadding.y = -0.085 * real_font_size.y; + style.CellPadding.y = params.cellpadding_y * real_font_size.y; } // TODO probably needs colorspace check too