init search on page feature once

This commit is contained in:
yggverse 2024-12-17 01:50:12 +02:00
parent 4b357f8229
commit f767c11789
23 changed files with 449 additions and 266 deletions

View file

@ -0,0 +1,29 @@
use gtk::{prelude::WidgetExt, Label};
pub struct Placeholder {
pub label: Label,
}
impl Placeholder {
// Constructors
/// Create new `Self`
pub fn new() -> Self {
Self {
label: Label::builder()
.css_classes(["error"])
.label("Search action requires activation!")
.build(),
}
}
// Actions
pub fn show(&self) {
self.label.set_visible(true)
}
pub fn hide(&self) {
self.label.set_visible(false)
}
}