From 16df214a12c2de29eca90f7f865cacc90155a420 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 18 Apr 2022 00:12:43 +0100 Subject: [PATCH] ui: Improve a comment and make it a doc comment Signed-off-by: Ian Jackson --- src/ui.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 9fdd951d..a668f61f 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -23,11 +23,13 @@ pub const INVISIBLE_EDGE_SENSITIVE: f64 = 2.; pub const LABEL_FONT_SIZE: f64 = 4.0; -// When trying to centre text, we use text-align and/or text-anchor -// to do the horizontal positioning, but vertical positioning is -// troublesome. We bodge it. Multiple the font size (in pixels) -// by this, and add it to the SVG y coordinate (ie, shufting the text -// down). +/// Fudge factor +/// +/// When trying to centre text, we use text-align and/or text-anchor +/// to do the horizontal positioning, but vertical positioning is +/// troublesome. We bodge it. Multiple the font size (in pixels) +/// by this, and add it to the SVG y coordinate (ie, shufting the text +/// down). pub const SVG_FONT_Y_ADJUST_OF_FONT_SIZE: f64 = 0.35; pub fn default_edge_width() -> f64 { DEFAULT_EDGE_WIDTH } -- 2.30.2