Separate CosmicAppletWindow and CosmicAppletButton
This commit is contained in:
parent
74f6c2eca6
commit
aac43de65d
16 changed files with 421 additions and 343 deletions
|
|
@ -5,8 +5,8 @@ use crate::dock_list::DockList;
|
|||
use crate::dock_list::DockListType;
|
||||
use crate::utils::Event;
|
||||
use cascade::cascade;
|
||||
use cosmic_panel_config::config::PanelAnchor;
|
||||
use cosmic_panel_config::config::CosmicPanelConfig;
|
||||
use cosmic_panel_config::config::PanelAnchor;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::Orientation;
|
||||
|
|
@ -68,13 +68,12 @@ impl AppsContainer {
|
|||
// Setup
|
||||
self_.setup_callbacks();
|
||||
self_.set_position(config.anchor);
|
||||
|
||||
|
||||
Self::setup_callbacks(&self_);
|
||||
|
||||
self_
|
||||
}
|
||||
|
||||
|
||||
pub fn model(&self, type_: DockListType) -> &gio::ListStore {
|
||||
// Get state
|
||||
let imp = imp::AppsContainer::from_instance(self);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: MPL-2.0-only
|
||||
|
||||
use cosmic_panel_config::config::{PanelAnchor, CosmicPanelConfig};
|
||||
use cosmic_panel_config::config::{CosmicPanelConfig, PanelAnchor};
|
||||
use glib::SignalHandlerId;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use gtk4::{gio, glib};
|
||||
|
|
@ -25,7 +25,7 @@ pub struct DockList {
|
|||
pub popover_menu_index: Rc<Cell<Option<u32>>>,
|
||||
pub position: Rc<Cell<PanelAnchor>>,
|
||||
pub tx: OnceCell<mpsc::Sender<Event>>,
|
||||
pub config: OnceCell<CosmicPanelConfig>
|
||||
pub config: OnceCell<CosmicPanelConfig>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue