Skip to content

Commit

Permalink
Fix bezier_tool placeholder text alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Apr 10, 2020
1 parent b549b50 commit 47d44af
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/bezier_tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ mod bezier {
// implemented by `iced_wgpu` and other renderers.
use iced_native::{
input, layout, Clipboard, Color, Element, Event, Font, Hasher,
HorizontalAlignment, Layout, Length, MouseCursor, Point, Size, Vector,
VerticalAlignment, Widget,
HorizontalAlignment, Layout, Length, MouseCursor, Point, Rectangle,
Size, Vector, VerticalAlignment, Widget,
};
use iced_wgpu::{
triangle::{Mesh2D, Vertex2D},
Expand Down Expand Up @@ -189,7 +189,11 @@ mod bezier {
&& self.state.pending.is_none()
{
let instructions = Primitive::Text {
bounds,
bounds: Rectangle {
x: bounds.center_x(),
y: bounds.center_y(),
..bounds
},
color: Color {
a: defaults.text.color.a * 0.7,
..defaults.text.color
Expand Down

0 comments on commit 47d44af

Please sign in to comment.