mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
init search on page feature once
This commit is contained in:
parent
4b357f8229
commit
f767c11789
23 changed files with 449 additions and 266 deletions
29
src/app/browser/window/tab/item/page/search/placeholder.rs
Normal file
29
src/app/browser/window/tab/item/page/search/placeholder.rs
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue