summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer/widget/checkbox.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-10 01:34:22 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-10 01:39:36 +0200
commitb549b509c9454944dc629c4510b7f7e92ec21085 (patch)
tree898d585d046a0bfb509105ef648c4c5fef760d01 /wgpu/src/renderer/widget/checkbox.rs
parent19f6a5e2fd685c76a06576e45c64e7c9e3b3a57f (diff)
downloadiced-b549b509c9454944dc629c4510b7f7e92ec21085.tar.gz
iced-b549b509c9454944dc629c4510b7f7e92ec21085.tar.bz2
iced-b549b509c9454944dc629c4510b7f7e92ec21085.zip
Align text in `iced_wgpu` on a case-by-case basis
Diffstat (limited to 'wgpu/src/renderer/widget/checkbox.rs')
-rw-r--r--wgpu/src/renderer/widget/checkbox.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/wgpu/src/renderer/widget/checkbox.rs b/wgpu/src/renderer/widget/checkbox.rs
index ecacf1de..c0f1bf21 100644
--- a/wgpu/src/renderer/widget/checkbox.rs
+++ b/wgpu/src/renderer/widget/checkbox.rs
@@ -38,7 +38,11 @@ impl checkbox::Renderer for Renderer {
content: crate::text::CHECKMARK_ICON.to_string(),
font: crate::text::BUILTIN_ICONS,
size: bounds.height * 0.7,
- bounds,
+ bounds: Rectangle {
+ x: bounds.center_x(),
+ y: bounds.center_y(),
+ ..bounds
+ },
color: style.checkmark_color,
horizontal_alignment: HorizontalAlignment::Center,
vertical_alignment: VerticalAlignment::Center,