mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
fix visibility toggle on input request
This commit is contained in:
parent
55afe17271
commit
179cad9a57
@ -28,6 +28,7 @@ impl Input {
|
|||||||
// Actions
|
// Actions
|
||||||
pub fn show(&self, placeholder: &str, sensitive: bool) {
|
pub fn show(&self, placeholder: &str, sensitive: bool) {
|
||||||
self.content.set(placeholder, sensitive);
|
self.content.set(placeholder, sensitive);
|
||||||
|
self.widget.show(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use adw::ToolbarView;
|
use adw::ToolbarView;
|
||||||
use gtk::Box;
|
use gtk::{prelude::WidgetExt, Box};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub struct Widget {
|
pub struct Widget {
|
||||||
@ -17,6 +17,11 @@ impl Widget {
|
|||||||
Arc::new(Self { gobject })
|
Arc::new(Self { gobject })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
pub fn show(&self, visible: bool) {
|
||||||
|
self.gobject.set_visible(visible);
|
||||||
|
}
|
||||||
|
|
||||||
// Getters
|
// Getters
|
||||||
pub fn gobject(&self) -> &ToolbarView {
|
pub fn gobject(&self) -> &ToolbarView {
|
||||||
&self.gobject
|
&self.gobject
|
||||||
|
Loading…
x
Reference in New Issue
Block a user