clean up after text fix

This commit is contained in:
2025-08-24 22:40:33 -04:00
parent 5cb84047b9
commit 880d7eca50

View File

@@ -153,11 +153,7 @@ impl<'a, Ctx> Painter<'a, Ctx> {
pub fn draw_text(&mut self, content: &str, attrs: &TextAttrs) { pub fn draw_text(&mut self, content: &str, attrs: &TextAttrs) {
let handle = self.text.draw(content, attrs, self.textures); let handle = self.text.draw(content, attrs, self.textures);
let dims: Vec2 = self.textures[&handle].dimensions().into(); let dims: Vec2 = self.textures[&handle].dimensions().into();
let mut region = self.state.region.center().expand(dims); let region = self.state.region.center().expand(dims);
// TODO: I feel like this shouldn't be needed
// what this does is makes sure the text doesn't get squeezed into one pixel less
// I'm unsure exactly why it happens or if this will ever expand it too much
// region.bot_right.shift(0.01);
self.draw_texture_at(&handle, region); self.draw_texture_at(&handle, region);
} }