applet: Place in a popover with a button
This commit is contained in:
parent
3b2b01e259
commit
ab8131f5e6
2 changed files with 88 additions and 77 deletions
|
|
@ -2,11 +2,11 @@
|
|||
Name=Cosmic Dock App List
|
||||
Comment=Write a GTK + Rust application
|
||||
Type=Application
|
||||
Exec=cosmic-dock-app-list
|
||||
Exec=cosmic-applet-audio
|
||||
Terminal=false
|
||||
Categories=GNOME;GTK;
|
||||
Keywords=Gnome;GTK;
|
||||
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
|
||||
Icon=com.system76.CosmicDockAppList.svg
|
||||
Icon=com.system76.CosmicAppletAudio.svg
|
||||
StartupNotify=true
|
||||
NoDisplay=true
|
||||
|
|
|
|||
|
|
@ -79,9 +79,17 @@ fn app(application: &Application) {
|
|||
window = ApplicationWindow {
|
||||
set_application: Some(application),
|
||||
set_title: Some("COSMIC Network Applet"),
|
||||
set_default_width: 400,
|
||||
set_default_height: 300,
|
||||
set_decorated: false,
|
||||
set_resizable: false,
|
||||
set_width_request: 1,
|
||||
set_height_request: 1,
|
||||
|
||||
#[wrap(Some)]
|
||||
set_child = >k4::MenuButton {
|
||||
// TODO: adjust based on volume, mute
|
||||
set_icon_name: "multimedia-volume-control-symbolic",
|
||||
#[wrap(Some)]
|
||||
set_popover = >k4::Popover {
|
||||
#[wrap(Some)]
|
||||
set_child: window_box = &GtkBox {
|
||||
set_orientation: Orientation::Vertical,
|
||||
|
|
@ -165,6 +173,9 @@ fn app(application: &Application) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glib::MainContext::default().spawn_local(
|
||||
clone!(@weak inputs, @weak current_input, @weak input_volume, @strong pa => async move {
|
||||
while let Some(()) = refresh_input_rx.next().await {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue