Skip to content

Commit

Permalink
library: Ported Popover in RUST (#574)
Browse files Browse the repository at this point in the history
* library: Ported Popover in RUST

* Update code.rs
  • Loading branch information
onkarrai06 authored Sep 5, 2023
1 parent 8c53bdf commit 68e3055
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Library/demos/Popovers/code.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::workbench;
use gtk::prelude::*;

pub fn main() {
let popover_ids = ["plain_popover", "popover_menu"];

for id in popover_ids {
let popover: gtk::Popover = workbench::builder().object(id).unwrap();

popover.connect_closed(move |popover| {
let popover_name = popover.widget_name();
println!("{popover_name} closed.")
});
}
}

0 comments on commit 68e3055

Please sign in to comment.