forked from 1b-agent/opencadstudio-upstream
Center constraint glyph labels
This commit is contained in:
1 parent
b9ef0e3286
commit
7c90b8ea7f
1 file changed
+4
-2
+4
-2
@@ -1757,11 +1757,13 @@ impl canvas::Program<Message> for SelectionCanvas {
|
|||||||
frame.fill_text(canvas::Text {
|
frame.fill_text(canvas::Text {
|
||||||
content: label.clone(),
|
content: label.clone(),
|
||||||
position: Point::new(
|
position: Point::new(
|
||||||
top_left.x + CONSTRAINT_GLYPH_PAD_X,
|
top_left.x + size.width * 0.5,
|
||||||
top_left.y + CONSTRAINT_GLYPH_PAD_Y,
|
top_left.y + size.height * 0.5,
|
||||||
),
|
),
|
||||||
color: fg,
|
color: fg,
|
||||||
size: iced::Pixels(CONSTRAINT_GLYPH_SIZE),
|
size: iced::Pixels(CONSTRAINT_GLYPH_SIZE),
|
||||||
|
align_x: iced::alignment::Horizontal::Center.into(),
|
||||||
|
align_y: iced::alignment::Vertical::Center,
|
||||||
shaping: iced::advanced::text::Shaping::Advanced,
|
shaping: iced::advanced::text::Shaping::Advanced,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user