wip fix: use app id for grouping window lists & replace top level if it already exists & show separator for active and saved app lists
This commit is contained in:
parent
e7f9e95440
commit
223c7855cf
5 changed files with 38 additions and 30 deletions
|
|
@ -7,6 +7,7 @@ use crate::dock_list::DockListType;
|
|||
use crate::utils::AppListEvent;
|
||||
use cascade::cascade;
|
||||
use cosmic_panel_config::{PanelAnchor, CosmicPanelConfig};
|
||||
use gtk4::Separator;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::Orientation;
|
||||
|
|
@ -38,21 +39,21 @@ impl AppsContainer {
|
|||
let saved_app_list_view = DockList::new(DockListType::Saved, config.clone());
|
||||
self_.append(&saved_app_list_view);
|
||||
|
||||
// let separator_container = cascade! {
|
||||
// gtk4::Box::new(Orientation::Vertical, 0);
|
||||
// ..set_margin_top(8);
|
||||
// ..set_margin_bottom(8);
|
||||
// ..set_vexpand(true);
|
||||
// };
|
||||
// self_.append(&separator_container);
|
||||
// let separator = cascade! {
|
||||
// Separator::new(Orientation::Vertical);
|
||||
// ..set_margin_start(8);
|
||||
// ..set_margin_end(8);
|
||||
// ..set_vexpand(true);
|
||||
// ..add_css_class("dock_separator");
|
||||
// };
|
||||
// separator_container.append(&separator);
|
||||
let separator_container = cascade! {
|
||||
gtk4::Box::new(Orientation::Vertical, 0);
|
||||
..set_margin_top(8);
|
||||
..set_margin_bottom(8);
|
||||
..set_vexpand(true);
|
||||
};
|
||||
self_.append(&separator_container);
|
||||
let separator = cascade! {
|
||||
Separator::new(Orientation::Vertical);
|
||||
..set_margin_start(8);
|
||||
..set_margin_end(8);
|
||||
..set_vexpand(true);
|
||||
..add_css_class("dock_separator");
|
||||
};
|
||||
separator_container.append(&separator);
|
||||
let active_app_list_view = DockList::new(DockListType::Active, config.clone());
|
||||
self_.append(&active_app_list_view);
|
||||
// self_.connect_orientation_notify(glib::clone!(@weak separator => move |c| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue