refactor: move projects into a workspace

This commit is contained in:
Ashley Wulber 2022-12-23 15:14:15 -05:00 committed by Ashley Wulber
parent 2a417a9156
commit a1aa87f5bd
29 changed files with 1105 additions and 28224 deletions

File diff suppressed because it is too large Load diff

View file

@ -11,23 +11,4 @@ libpulse-binding = "2.26.0"
libpulse-glib-binding = "2.25.0"
tokio = { version = "1.20.1", features=["full"] }
libcosmic = { git = "https://github.com/pop-os/libcosmic/", branch = "master", default-features = false, features = ["wayland", "applet"] }
iced_sctk = { git = "https://github.com/pop-os/iced-sctk" }
sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", version = "0.16" }
[workspace]
resolved = "2"
[dependencies.iced]
git = "https://github.com/pop-os/iced.git"
branch = "sctk-cosmic"
# path = "../iced"
default-features = false
features = ["image", "svg", "tokio", "wayland"]
[dependencies.iced_native]
git = "https://github.com/pop-os/iced.git"
branch = "sctk-cosmic"
[dependencies.iced_futures]
git = "https://github.com/pop-os/iced.git"
branch = "sctk-cosmic"
sctk = { package = "smithay-client-toolkit", git = "https://github.com/Smithay/client-toolkit", rev = "73346019952f82ec7e4d4d15f5d66841b54e8b61" }

View file

@ -1,3 +1,5 @@
use cosmic::iced::wayland::SurfaceIdWrapper;
use cosmic::iced::widget;
use iced::widget::Space;
use cosmic::widget::{icon, toggler, horizontal_rule};
@ -10,17 +12,16 @@ use cosmic::iced_style::svg;
use cosmic::theme::{self, Svg};
use cosmic::{iced_style, settings, Element, Theme};
use cosmic::iced::{
self,
executor,
widget::{button, column, row, text, slider},
window, Alignment, Application, Command, Length, Subscription,
};
use iced_sctk::application::SurfaceIdWrapper;
use iced_sctk::command::platform_specific::wayland::window::SctkWindowSettings;
use iced_sctk::commands::popup::{destroy_popup, get_popup};
use iced_sctk::settings::InitialSurface;
use iced_sctk::Color;
use iced_sctk::widget::container;
use iced::wayland::popup::{destroy_popup, get_popup};
use iced::Color;
use iced::widget::container;
mod pulse;
use crate::pulse::DeviceInfo;
@ -96,7 +97,7 @@ impl Application for Audio {
self.theme
}
fn close_requested(&self, _id: iced_sctk::application::SurfaceIdWrapper) -> Self::Message {
fn close_requested(&self, _id: SurfaceIdWrapper) -> Self::Message {
Message::Ignore
}
@ -325,7 +326,7 @@ fn revealer<'a>(
options: Vec<String>,
toggle: Message,
_change: Message,
) -> iced_sctk::widget::Column<'a, Message, Renderer> {
) -> widget::Column<'a, Message, Renderer> {
if open {
options.iter().fold(
column![revealer_head(open, title, selected, toggle)].width(Length::Fill),
@ -341,7 +342,7 @@ fn revealer_head<'a>(
title: &'a str,
selected: String,
toggle: Message,
) -> iced_sctk::widget::Button<Message, Renderer> {
) -> widget::Button<Message, Renderer> {
button(row![row![title].width(Length::Fill), text(selected)])
.width(Length::Fill)
.on_press(toggle)

View file

@ -1,4 +1,4 @@
use iced_native::subscription::{self, Subscription};
use cosmic::iced_native::subscription::{self, Subscription};
use std::cell::RefCell;
use std::{rc::Rc, thread};