wip: example applet

This commit is contained in:
Ashley Wulber 2022-11-11 05:06:54 +01:00
parent 45ccc8c3d2
commit b1c3a52589
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
18 changed files with 525 additions and 103 deletions

View file

@ -1,4 +1,7 @@
use cosmic::{iced::{Application, sctk_settings::InitialSurface}, settings};
use cosmic::{
iced::{sctk_settings::InitialSurface, Application},
settings,
};
mod window;
pub use window::*;

View file

@ -6,8 +6,8 @@ use cosmic::{
},
iced::{self, Alignment, Application, Color, Command, Length},
iced_lazy::responsive,
iced_winit::window::{drag, maximize, minimize},
iced_native::window,
iced_winit::window::{drag, maximize, minimize},
list_view, list_view_item, list_view_row, list_view_section, scrollable,
theme::{self, Theme},
widget::{button, header_bar, list_box, list_row, list_view::*, toggler},
@ -15,7 +15,6 @@ use cosmic::{
};
use std::collections::BTreeMap;
#[derive(Default)]
pub struct Window {
page: u8,
@ -112,8 +111,8 @@ impl Application for Window {
unimplemented!()
}
fn view_layer_surface(
&self,
window: cosmic::iced_native::window::Id,
&self,
window: cosmic::iced_native::window::Id,
) -> iced::Element<'_, Self::Message, iced::Renderer<Self::Theme>> {
unimplemented!()
}
@ -184,9 +183,7 @@ impl Application for Window {
vec![nav_bar_page("Wi-Fi")],
),
(
nav_bar_section()
.title("Bluetooth")
.icon("cs-bluetooth"),
nav_bar_section().title("Bluetooth").icon("cs-bluetooth"),
vec![nav_bar_page("Devices")],
),
(
@ -213,9 +210,7 @@ impl Application for Window {
vec![nav_bar_page("Keyboard")],
),
(
nav_bar_section()
.title("Power & Battery")
.icon("battery"),
nav_bar_section().title("Power & Battery").icon("battery"),
vec![nav_bar_page("Status")],
),
(