From: Ian Jackson Date: Sun, 17 Apr 2022 23:12:43 +0000 (+0100) Subject: ui: Improve a comment and make it a doc comment X-Git-Tag: otter-1.1.0~494 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=16df214a12c2de29eca90f7f865cacc90155a420;p=otter.git ui: Improve a comment and make it a doc comment Signed-off-by: Ian Jackson --- 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 }