mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
22 lines
370 B
Rust
22 lines
370 B
Rust
use gtk::Image;
|
|
|
|
pub struct Pin {
|
|
widget: Image,
|
|
}
|
|
|
|
impl Pin {
|
|
// Construct
|
|
pub fn new(visible: bool) -> Pin {
|
|
let widget = Image::builder()
|
|
.icon_name("view-pin-symbolic")
|
|
.visible(visible)
|
|
.build();
|
|
|
|
Self { widget }
|
|
}
|
|
|
|
// Getters
|
|
pub fn widget(&self) -> &Image {
|
|
&self.widget
|
|
}
|
|
}
|