co-authored by
Nathan Sobo
parent
c55d99022e
commit
d5a9bab4a0
@@ -53,6 +53,11 @@ impl Container {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_padding_bottom(mut self, padding: f32) -> Self {
|
||||
self.padding.bottom = padding;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_background_color(mut self, color: impl Into<ColorU>) -> Self {
|
||||
self.background_color = Some(color.into());
|
||||
self
|
||||
|
||||
@@ -38,7 +38,11 @@ impl Element for LineBox {
|
||||
.select_font(self.family_id, &self.font_properties)
|
||||
{
|
||||
Ok(font_id) => {
|
||||
let line_height = ctx.font_cache.bounding_box(font_id, self.font_size).y();
|
||||
let line_height = ctx
|
||||
.font_cache
|
||||
.bounding_box(font_id, self.font_size)
|
||||
.y()
|
||||
.ceil();
|
||||
let child_max = vec2f(
|
||||
constraint.max.x(),
|
||||
ctx.font_cache.ascent(font_id, self.font_size)
|
||||
|
||||
Reference in New Issue
Block a user