use a 1 pixel margin for text in event bars
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
This commit is contained in:
parent
ee34ecc130
commit
3f3425563c
@ -215,10 +215,18 @@ fn render_events_in_row<Renderer>(
|
||||
},
|
||||
params.ev_bg,
|
||||
);
|
||||
let ev_text_size = Size {
|
||||
height: ev_bar.bounds.height - 2.0,
|
||||
width: ev_bar.bounds.width,
|
||||
};
|
||||
let ev_text_position = Point {
|
||||
x: ev_bar.bounds.x,
|
||||
y: ev_bar.bounds.y + 1.0,
|
||||
};
|
||||
renderer.fill_text(
|
||||
Text {
|
||||
content: ev_bar.ev.text.as_str(),
|
||||
bounds: ev_bar.bounds.size(),
|
||||
bounds: ev_text_size,
|
||||
size: params.ev_fontsize.into(),
|
||||
line_height: LineHeight::default(),
|
||||
font: renderer.default_font(),
|
||||
@ -226,7 +234,7 @@ fn render_events_in_row<Renderer>(
|
||||
vertical_alignment: alignment::Vertical::Top,
|
||||
shaping: Shaping::default(),
|
||||
},
|
||||
ev_bar.bounds.position(),
|
||||
ev_text_position,
|
||||
fg,
|
||||
ev_bar.bounds,
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user