jp: reduce y padding

This commit is contained in:
Adeeb Shihadeh
2026-04-21 10:11:10 -07:00
parent 341786acb5
commit 4286a64083
3 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ void configure_style() {
plot_style.LegendInnerPadding = ImVec2(6.0f, 3.0f);
plot_style.LegendSpacing = ImVec2(7.0f, 2.0f);
plot_style.PlotPadding = ImVec2(4.0f, 8.0f);
plot_style.FitPadding = ImVec2(0.02f, 0.4f);
plot_style.FitPadding = ImVec2(0.02f, static_cast<float>(PLOT_Y_PADDING_FRACTION));
ImPlot::MapInputDefault();
ImPlotInputMap &input_map = ImPlot::GetInputMap();
+1
View File
@@ -58,6 +58,7 @@ inline constexpr float SIDEBAR_MAX_WIDTH = 520.0f;
inline constexpr float TIMELINE_BAR_HEIGHT = 14.0f;
inline constexpr float STATUS_BAR_HEIGHT = 52.0f;
inline constexpr double MIN_HORIZONTAL_ZOOM_SECONDS = 2.0;
inline constexpr double PLOT_Y_PADDING_FRACTION = 0.05;
struct UiMetrics {
float width = 0.0f;
+1 -3
View File
@@ -7,8 +7,6 @@
#include <cstdio>
#include <limits>
constexpr double PLOT_Y_PAD_FRACTION = 0.4;
struct PlotBounds {
double x_min = 0.0;
double x_max = 1.0;
@@ -484,7 +482,7 @@ PlotBounds compute_plot_bounds(const Pane &pane,
min_value = std::min(min_value, 0.0);
max_value = std::max(max_value, 1.0);
}
ensure_non_degenerate_range(&min_value, &max_value, PLOT_Y_PAD_FRACTION, 0.1);
ensure_non_degenerate_range(&min_value, &max_value, PLOT_Y_PADDING_FRACTION, 0.1);
if (pane.range.has_y_limit_min) {
min_value = pane.range.y_limit_min;
}