fix placeholder position

This commit is contained in:
yggverse 2024-12-18 07:04:33 +02:00
parent a9e2e4431f
commit 96095db415

View File

@ -1,4 +1,6 @@
use gtk::{prelude::WidgetExt, Label}; use gtk::{prelude::WidgetExt, Align, Label};
const MARGIN: i32 = 6;
pub struct Placeholder { pub struct Placeholder {
pub label: Label, pub label: Label,
@ -12,7 +14,9 @@ impl Placeholder {
Self { Self {
label: Label::builder() label: Label::builder()
.css_classes(["error"]) .css_classes(["error"])
.halign(Align::Start)
.label("Search action requires activation!") .label("Search action requires activation!")
.margin_start(MARGIN)
.build(), .build(),
} }
} }