Update cosmic-panel-config

This commit is contained in:
Ian Douglas Scott 2022-06-29 13:32:50 -07:00
parent 04c7e73dec
commit e049343317
10 changed files with 245 additions and 116 deletions

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MPL-2.0-only
use cosmic_panel_config::config::{Anchor, CosmicPanelConfig};
use cosmic_panel_config::config::{PanelAnchor, CosmicPanelConfig};
use glib::SignalHandlerId;
use gtk4::subclass::prelude::*;
use gtk4::{gio, glib};
@ -23,7 +23,7 @@ pub struct DockList {
pub drag_end_signal: Rc<RefCell<Option<SignalHandlerId>>>,
pub drag_cancel_signal: Rc<RefCell<Option<SignalHandlerId>>>,
pub popover_menu_index: Rc<Cell<Option<u32>>>,
pub position: Rc<Cell<Anchor>>,
pub position: Rc<Cell<PanelAnchor>>,
pub tx: OnceCell<mpsc::Sender<Event>>,
pub config: OnceCell<CosmicPanelConfig>
}

View file

@ -5,7 +5,7 @@ use crate::dock_object::DockObject;
use crate::utils::data_path;
use crate::utils::{BoxedWindowList, Event, Item};
use cascade::cascade;
use cosmic_panel_config::config::{CosmicPanelConfig, XdgWrapperConfig, Anchor};
use cosmic_panel_config::config::{CosmicPanelConfig, PanelAnchor};
use gio::DesktopAppInfo;
use gio::Icon;
use glib::Object;
@ -174,7 +174,7 @@ impl DockList {
imp.list_view.set(list_view).unwrap();
}
pub fn set_position(&self, position: Anchor) {
pub fn set_position(&self, position: PanelAnchor) {
let imp = imp::DockList::from_instance(self);
let model = imp.model.get().unwrap();
imp.position.replace(position);