Compare commits

..

No commits in common. "main" and "master" have entirely different histories.
main ... master

225 changed files with 1502 additions and 3108 deletions

View file

@ -17,13 +17,13 @@ jobs:
- name: Install Rust nightly - name: Install Rust nightly
uses: dtolnay/rust-toolchain@master uses: dtolnay/rust-toolchain@master
with: with:
toolchain: nightly-2026-04-27 toolchain: nightly-2025-07-31
- name: System dependencies - name: System dependencies
run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev
- name: Build documentation - name: Build documentation
run: | run: |
RUSTDOCFLAGS="--cfg docsrs" \ RUSTDOCFLAGS="--cfg docsrs" \
cargo +nightly-2026-04-27 doc --no-deps \ cargo +nightly-2025-07-31 doc --no-deps \
-p cosmic-client-toolkit \ -p cosmic-client-toolkit \
-p cosmic-protocols \ -p cosmic-protocols \
-p libcosmic \ -p libcosmic \

View file

@ -1,15 +0,0 @@
{
"format_on_save": "on",
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"command": "clippy",
},
"rustfmt": {
"extraArgs": ["+nightly"],
},
},
},
},
}

View file

@ -1,23 +1,20 @@
[package] [package]
# Yoda fork: hard-renamed. Every consumer (leyoda/cosmic-files fork + each name = "libcosmic"
# leyoda/cosmic-* app) depends directly on `libcosmic-yoda` by path, bypassing version = "1.0.0"
# pop-os/libcosmic entirely. No [patch] shenanigans needed — transitive deps
# that used to ask for `libcosmic` are replaced by deps on our forks that ask
# for `libcosmic-yoda`.
name = "libcosmic-yoda"
version = "0.1.0-yoda.2"
edition = "2024" edition = "2024"
rust-version = "1.93" rust-version = "1.90"
[lib] [lib]
name = "cosmic" name = "cosmic"
[features] [features]
default = [ default = [
"winit",
"tokio", "tokio",
"a11y", "a11y",
"dbus-config", "dbus-config",
"wayland", "x11",
"iced-wayland",
"multi-window", "multi-window",
] ]
advanced-shaping = ["iced/advanced-shaping"] advanced-shaping = ["iced/advanced-shaping"]
@ -38,6 +35,7 @@ animated-image = [
autosize = [] autosize = []
applet = [ applet = [
"autosize", "autosize",
"winit",
"wayland", "wayland",
"tokio", "tokio",
"cosmic-panel-config", "cosmic-panel-config",
@ -83,34 +81,32 @@ tokio = [
"cosmic-config/tokio", "cosmic-config/tokio",
] ]
# Tokio async runtime # Tokio async runtime
# Wayland window support (yoda fork is Wayland-only; always active in default). # Wayland window support
# We still need iced/winit because pop-os/iced hosts the runtime dispatcher iced-wayland = [
# (`iced_winit as shell`) there — the name is a misnomer, it's the same crate
# that provides both the winit path AND the sctk/cctk wayland path.
wayland = [
"ashpd?/wayland", "ashpd?/wayland",
"autosize", "autosize",
"iced/winit",
"iced/wayland", "iced/wayland",
"iced_winit/wayland", "iced_winit/wayland",
"surface-message",
]
wayland = [
"iced-wayland",
"iced_runtime/cctk", "iced_runtime/cctk",
"iced_winit/cctk", "iced_winit/cctk",
"iced_wgpu/cctk", "iced_wgpu/cctk",
"iced/cctk", "iced/cctk",
"dep:iced_winit",
"dep:cctk", "dep:cctk",
"surface-message",
] ]
surface-message = [] surface-message = []
# multi-window support # multi-window support
multi-window = [] multi-window = []
# Render with wgpu # Render with wgpu
wgpu = ["iced/wgpu", "iced_wgpu"] wgpu = ["iced/wgpu", "iced_wgpu"]
# Compat stubs — kept empty so upstream deps (cosmic-files, cosmic-text, …) # X11 window support via winit
# that still ask for `winit` / `x11` features resolve cleanly against the winit = ["iced/winit", "iced_winit"]
# yoda fork. Activating them has no effect: no code is gated on these. winit_debug = ["winit", "debug"]
winit = [] winit_tokio = ["winit", "tokio"]
x11 = [] winit_wgpu = ["winit", "wgpu"]
# Enables XDG portal integrations # Enables XDG portal integrations
xdg-portal = ["ashpd"] xdg-portal = ["ashpd"]
qr_code = ["iced/qr_code"] qr_code = ["iced/qr_code"]
@ -123,17 +119,18 @@ async-std = [
"zbus?/async-io", "zbus?/async-io",
"iced/async-std", "iced/async-std",
] ]
x11 = ["iced/x11", "iced_winit/x11"]
[dependencies] [dependencies]
apply = "0.3.0" apply = "0.3.0"
ashpd = { version = "0.12.3", default-features = false, optional = true } ashpd = { version = "0.12.3", default-features = false, optional = true }
async-fs = { version = "2.2", optional = true } async-fs = { version = "2.2", optional = true }
async-std = { workspace = true, optional = true } async-std = { version = "1.13", optional = true }
auto_enums = "0.8.8" auto_enums = "0.8.8"
cctk = { path = "../cosmic-protocols/client-toolkit", package = "cosmic-client-toolkit", optional = true } cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "160b086", optional = true }
jiff = "0.2" jiff = "0.2"
cosmic-config = { path = "cosmic-config" } cosmic-config = { path = "cosmic-config" }
cosmic-settings-config = { path = "../cosmic-settings-daemon/config", optional = true } cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
# Internationalization # Internationalization
i18n-embed = { version = "0.16.0", features = [ i18n-embed = { version = "0.16.0", features = [
"fluent-system", "fluent-system",
@ -153,35 +150,34 @@ image-extras = { version = "0.1.0", default-features = false, features = [
"xpm", "xpm",
"xbm", "xbm",
], optional = true } ], optional = true }
libc = { version = "0.2.186", optional = true } libc = { version = "0.2.183", optional = true }
log = "0.4" log = "0.4"
mime = { version = "0.3.17", optional = true } mime = { version = "0.3.17", optional = true }
palette.workspace = true palette = "0.7.6"
rfd = { version = "0.16.0", default-features = false, features = [ rfd = { version = "0.16.0", default-features = false, features = [
"xdg-portal", "xdg-portal",
], optional = true } ], optional = true }
rustix = { version = "1.1", features = ["pipe", "process"], optional = true } rustix = { version = "1.1", features = ["pipe", "process"], optional = true }
serde = { workspace = true, features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
slotmap = "1.1.1" slotmap = "1.1.1"
smol = { version = "2.0.2", optional = true } smol = { version = "2.0.2", optional = true }
thiserror.workspace = true thiserror = "2.0.18"
taffy = { version = "0.9.2", features = ["grid"] } taffy = { version = "0.9.2", features = ["grid"] }
tokio = { workspace = true, optional = true } tokio = { version = "1.50.0", optional = true }
tracing.workspace = true tracing = "0.1.44"
unicode-segmentation = "1.13" unicode-segmentation = "1.12"
url = "2.5.8" url = "2.5.8"
zbus = { workspace = true, optional = true } zbus = { version = "5.14.0", default-features = false, optional = true }
float-cmp = "0.10.0" float-cmp = "0.10.0"
ron = { workspace = true, optional = true }
# Enable DBus feature on Linux targets # Enable DBus feature on Linux targets
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]
cosmic-config = { path = "cosmic-config", features = ["dbus"] } cosmic-config = { path = "cosmic-config", features = ["dbus"] }
cosmic-settings-daemon = { path = "../dbus-settings-bindings/cosmic-settings-daemon" } cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings" }
zbus = { version = "5.14.0", default-features = false } zbus = { version = "5.14.0", default-features = false }
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] [target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
freedesktop-icons = { package = "cosmic-freedesktop-icons", path = "../cosmic-freedesktop-icons" } freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" }
freedesktop-desktop-entry = { version = "0.8.1", optional = true } freedesktop-desktop-entry = { version = "0.8.1", optional = true }
shlex = { version = "1.3.0", optional = true } shlex = { version = "1.3.0", optional = true }
@ -227,77 +223,35 @@ optional = true
[dependencies.iced_tiny_skia] [dependencies.iced_tiny_skia]
path = "./iced/tiny_skia" path = "./iced/tiny_skia"
# Yoda: drop the x11 default → softbuffer no longer pulls tiny-xlib/x11-dl/etc.
default-features = false
features = ["wayland"]
[dependencies.iced_winit] [dependencies.iced_winit]
path = "./iced/winit" path = "./iced/winit"
optional = true optional = true
# Yoda: drop the x11 default → winit won't pull winit-x11/tiny-xlib/x11-dl.
# Keep wayland + wayland-dlopen (default behaviour minus x11).
default-features = false
features = ["wayland", "wayland-dlopen"]
[dependencies.iced_wgpu] [dependencies.iced_wgpu]
path = "./iced/wgpu" path = "./iced/wgpu"
optional = true optional = true
[dependencies.cosmic-panel-config] [dependencies.cosmic-panel-config]
path = "../cosmic-panel/cosmic-panel-config" git = "https://github.com/pop-os/cosmic-panel"
# path = "../cosmic-panel/cosmic-panel-config"
optional = true optional = true
[patch.'https://github.com/pop-os/freedesktop-icons'] [dependencies.ron]
cosmic-freedesktop-icons = { path = "../cosmic-freedesktop-icons" } version = "0.12"
optional = true
[patch.'https://github.com/pop-os/softbuffer']
softbuffer = { path = "../softbuffer" }
[patch.'https://github.com/pop-os/smithay-clipboard']
smithay-clipboard = { path = "../smithay-clipboard" }
[patch.'https://github.com/pop-os/winit.git']
dpi = { path = "../winit/dpi" }
winit = { path = "../winit/winit" }
winit-android = { path = "../winit/winit-android" }
winit-appkit = { path = "../winit/winit-appkit" }
winit-common = { path = "../winit/winit-common" }
winit-core = { path = "../winit/winit-core" }
winit-orbital = { path = "../winit/winit-orbital" }
winit-uikit = { path = "../winit/winit-uikit" }
winit-wayland = { path = "../winit/winit-wayland" }
winit-web = { path = "../winit/winit-web" }
winit-win32 = { path = "../winit/winit-win32" }
winit-x11 = { path = "../winit/winit-x11" }
[workspace] [workspace]
members = [ members = [
"cosmic-config", "cosmic-config",
"cosmic-config-derive", "cosmic-config-derive",
"cosmic-theme", "cosmic-theme",
"examples/*",
] ]
# examples/* excluded — many depend on the removed winit/x11 features. exclude = ["iced"]
# They will be revisited and adapted in a later phase.
exclude = ["iced", "examples"]
[workspace.dependencies] [workspace.dependencies]
async-std = "1.13" dirs = "6.0.0"
dirs = "6.0"
palette = "0.7"
ron = "0.12"
serde = "1.0"
thiserror = "2.0"
tracing = "0.1"
tokio = "1.52"
zbus = {version = "5.15", default-features = false}
# Speed up snapshot diffing in cosmic-theme tests. Cargo silently ignores
# [profile.*] blocks in non-root manifests, so this lives at the
# workspace root.
[profile.dev.package.insta]
opt-level = 3
[profile.dev.package.similar]
opt-level = 3
[dev-dependencies] [dev-dependencies]
tempfile = "3.27.0" tempfile = "3.27.0"

View file

@ -20,24 +20,6 @@ While libcosmic is written entirely in Rust, some of its dependencies may requir
sudo apt install cargo cmake just libexpat1-dev libfontconfig-dev libfreetype-dev libxkbcommon-dev pkgconf sudo apt install cargo cmake just libexpat1-dev libfontconfig-dev libfreetype-dev libxkbcommon-dev pkgconf
``` ```
## Made-for-COSMIC Flatpak IDs
To identify a project as a COSMIC Application, add `<id>com.system76.CosmicApplication</id>` to the provides section of the project's metainfo.
```xml
<provides>
<id>com.system76.CosmicApplication</id>
</provides>
```
For COSMIC Applets, use `com.system76.CosmicApplet`.
```xml
<provides>
<id>com.system76.CosmicApplet</id>
</provides>
```
## Examples ## Examples
Some examples are included in the [examples](./examples) directory to to kickstart your Some examples are included in the [examples](./examples) directory to to kickstart your

View file

@ -10,21 +10,21 @@ macro = ["cosmic-config-derive"]
subscription = ["iced_futures"] subscription = ["iced_futures"]
[dependencies] [dependencies]
cosmic-settings-daemon = { path = "../../dbus-settings-bindings/cosmic-settings-daemon", optional = true } cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true }
zbus = { version = "5.14.0", default-features = false, optional = true } zbus = { version = "5.14.0", default-features = false, optional = true }
atomicwrites = { git = "https://github.com/jackpot51/rust-atomicwrites" } atomicwrites = { git = "https://github.com/jackpot51/rust-atomicwrites" }
calloop = { version = "0.14.4", optional = true } calloop = { version = "0.14.4", optional = true }
notify = "8.2.0" notify = "8.2.0"
ron.workspace = true ron = "0.12.0"
serde.workspace = true serde = "1.0.228"
cosmic-config-derive = { path = "../cosmic-config-derive/", optional = true } cosmic-config-derive = { path = "../cosmic-config-derive/", optional = true }
iced = { path = "../iced/", default-features = false, optional = true } iced = { path = "../iced/", default-features = false, optional = true }
iced_futures = { path = "../iced/futures/", default-features = false, optional = true } iced_futures = { path = "../iced/futures/", default-features = false, optional = true }
futures-util = { version = "0.3", optional = true } futures-util = { version = "0.3", optional = true }
dirs.workspace = true dirs.workspace = true
tokio = { workspace = true, optional = true, features = ["time"] } tokio = { version = "1.50", optional = true, features = ["time"] }
async-std = { workspace = true, optional = true } async-std = { version = "1.13", optional = true }
tracing.workspace = true tracing = "0.1"
[target.'cfg(unix)'.dependencies] [target.'cfg(unix)'.dependencies]
xdg = "3.0" xdg = "3.0"

View file

@ -1,12 +1,13 @@
use std::any::TypeId; use std::{any::TypeId, ops::Deref};
use std::ops::Deref;
use crate::{CosmicConfigEntry, Update}; use crate::{CosmicConfigEntry, Update};
use cosmic_settings_daemon::{Changed, ConfigProxy, CosmicSettingsDaemonProxy}; use cosmic_settings_daemon::{Changed, ConfigProxy, CosmicSettingsDaemonProxy};
use futures_util::SinkExt; use futures_util::SinkExt;
use iced_futures::futures::future::pending; use iced_futures::{
use iced_futures::futures::{self, StreamExt}; Subscription,
use iced_futures::{Subscription, stream}; futures::{self, StreamExt, future::pending},
stream,
};
pub async fn settings_daemon_proxy() -> zbus::Result<CosmicSettingsDaemonProxy<'static>> { pub async fn settings_daemon_proxy() -> zbus::Result<CosmicSettingsDaemonProxy<'static>> {
let conn = zbus::Connection::session().await?; let conn = zbus::Connection::session().await?;

View file

@ -1,13 +1,16 @@
//! Integrations for cosmic-config — the cosmic configuration system. //! Integrations for cosmic-config — the cosmic configuration system.
use notify::event::{EventKind, ModifyKind, RenameMode}; use notify::{
use notify::{RecommendedWatcher, Watcher}; RecommendedWatcher, Watcher,
use serde::Serialize; event::{EventKind, ModifyKind, RenameMode},
use serde::de::DeserializeOwned; };
use std::io::Write; use serde::{Serialize, de::DeserializeOwned};
use std::path::{Path, PathBuf}; use std::{
use std::sync::Mutex; env, fmt, fs,
use std::{env, fmt, fs}; io::Write,
path::{Path, PathBuf},
sync::Mutex,
};
/// Get the config directory, with Flatpak sandbox support. /// Get the config directory, with Flatpak sandbox support.
/// In Flatpak, HOST_XDG_CONFIG_HOME points to the real user config directory, /// In Flatpak, HOST_XDG_CONFIG_HOME points to the real user config directory,
@ -51,22 +54,6 @@ fn get_state_dir() -> Option<PathBuf> {
dirs::state_dir() dirs::state_dir()
} }
/// Get the data directory, with Flatpak sandbox support.
fn get_data_dir() -> Option<PathBuf> {
// Check if we're running in Flatpak
if env::var_os("FLATPAK_ID").is_some() {
// Try HOST_XDG_DATA_HOME first
if let Some(host_data) = env::var_os("HOST_XDG_DATA_HOME") {
return Some(PathBuf::from(host_data));
}
// Fallback: try to construct from HOME
if let Some(home) = env::var_os("HOME") {
return Some(PathBuf::from(home).join(".local").join("share"));
}
}
dirs::data_dir()
}
#[cfg(feature = "subscription")] #[cfg(feature = "subscription")]
mod subscription; mod subscription;
#[cfg(feature = "subscription")] #[cfg(feature = "subscription")]
@ -279,24 +266,6 @@ impl Config {
}) })
} }
/// Get data for the given application name and config version.
pub fn new_data(name: &str, version: u64) -> Result<Self, Error> {
// Look for [name]/v[version]
let path = sanitize_name(name)?.join(format!("v{}", version));
// Get libcosmic user data directory
let mut user_path = get_data_dir().ok_or(Error::NoConfigDirectory)?;
user_path.push("cosmic");
user_path.push(path);
// Create new data directory if not found.
fs::create_dir_all(&user_path)?;
Ok(Self {
system_path: None,
user_path: Some(user_path),
})
}
// Start a transaction (to set multiple configs at the same time) // Start a transaction (to set multiple configs at the same time)
#[inline] #[inline]
pub fn transaction(&self) -> ConfigTransaction<'_> { pub fn transaction(&self) -> ConfigTransaction<'_> {

View file

@ -1,9 +1,7 @@
use iced_futures::futures::channel::mpsc;
use iced_futures::futures::{SinkExt, Stream}; use iced_futures::futures::{SinkExt, Stream};
use iced_futures::stream; use iced_futures::{futures::channel::mpsc, stream};
use notify::RecommendedWatcher; use notify::RecommendedWatcher;
use std::borrow::Cow; use std::{borrow::Cow, hash::Hash};
use std::hash::Hash;
use crate::{Config, CosmicConfigEntry}; use crate::{Config, CosmicConfigEntry};
@ -79,8 +77,7 @@ async fn start_listening<T: 'static + Send + Sync + PartialEq + Clone + CosmicCo
state: ConfigState<T>, state: ConfigState<T>,
output: &mut mpsc::Sender<crate::Update<T>>, output: &mut mpsc::Sender<crate::Update<T>>,
) -> ConfigState<T> { ) -> ConfigState<T> {
use iced_futures::futures::StreamExt; use iced_futures::futures::{StreamExt, future::pending};
use iced_futures::futures::future::pending;
match state { match state {
ConfigState::Init(config_id, version, is_state) => { ConfigState::Init(config_id, version, is_state) => {

View file

@ -15,13 +15,13 @@ export = ["serde_json"]
no-default = [] no-default = []
[dependencies] [dependencies]
palette = { workspace = true, features = ["serializing"] } palette = { version = "0.7.6", features = ["serializing"] }
almost = "0.2" almost = "0.2"
serde = { workspace = true, features = ["derive"] } serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149", optional = true, features = [ serde_json = { version = "1.0.149", optional = true, features = [
"preserve_order", "preserve_order",
] } ] }
ron.workspace = true ron = "0.12.0"
csscolorparser = { version = "0.8.3", features = ["serde"] } csscolorparser = { version = "0.8.3", features = ["serde"] }
cosmic-config = { path = "../cosmic-config/", default-features = false, features = [ cosmic-config = { path = "../cosmic-config/", default-features = false, features = [
"subscription", "subscription",
@ -29,8 +29,11 @@ cosmic-config = { path = "../cosmic-config/", default-features = false, features
] } ] }
configparser = "3.1.0" configparser = "3.1.0"
dirs.workspace = true dirs.workspace = true
thiserror.workspace = true thiserror = "2.0.18"
[dev-dependencies] [dev-dependencies]
insta = "1.47.2" insta = "1.47.2"
[profile.dev.package]
insta.opt-level = 3
similar.opt-level = 3

View file

@ -29,51 +29,3 @@ impl Default for CornerRadii {
} }
} }
} }
/// Roundness options for the Cosmic theme
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
pub enum Roundness {
/// Round style
#[default]
Round,
/// Slightly round style
SlightlyRound,
/// Square style
Square,
}
impl From<Roundness> for CornerRadii {
fn from(value: Roundness) -> Self {
match value {
Roundness::Round => CornerRadii::default(),
Roundness::SlightlyRound => CornerRadii {
radius_0: [0.0; 4],
radius_xs: [2.0; 4],
radius_s: [8.0; 4],
radius_m: [8.0; 4],
radius_l: [8.0; 4],
radius_xl: [8.0; 4],
},
Roundness::Square => CornerRadii {
radius_0: [0.0; 4],
radius_xs: [2.0; 4],
radius_s: [2.0; 4],
radius_m: [2.0; 4],
radius_l: [2.0; 4],
radius_xl: [2.0; 4],
},
}
}
}
impl From<CornerRadii> for Roundness {
fn from(value: CornerRadii) -> Self {
if (value.radius_m[0] - 16.0).abs() < 0.01 {
Self::Round
} else if (value.radius_m[0] - 8.0).abs() < 0.01 {
Self::SlightlyRound
} else {
Self::Square
}
}
}

View file

@ -0,0 +1,69 @@
use crate::Spacing;
use serde::{Deserialize, Serialize};
/// Density options for the Cosmic theme
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
pub enum Density {
/// Lower padding/spacing of elements
Compact,
/// Higher padding/spacing of elements
Spacious,
/// Standard padding/spacing of elements
#[default]
Standard,
}
impl From<Density> for Spacing {
fn from(value: Density) -> Self {
match value {
Density::Compact => Spacing {
space_none: 0,
space_xxxs: 4,
space_xxs: 4,
space_xs: 8,
space_s: 8,
space_m: 16,
space_l: 24,
space_xl: 32,
space_xxl: 48,
space_xxxl: 64,
},
Density::Spacious => Spacing {
space_none: 4,
space_xxxs: 8,
space_xxs: 12,
space_xs: 16,
space_s: 24,
space_m: 32,
space_l: 48,
space_xl: 64,
space_xxl: 128,
space_xxxl: 160,
},
Density::Standard => Spacing {
space_none: 0,
space_xxxs: 4,
space_xxs: 8,
space_xs: 12,
space_s: 16,
space_m: 24,
space_l: 32,
space_xl: 48,
space_xxl: 64,
space_xxxl: 128,
},
}
}
}
impl From<Spacing> for Density {
fn from(value: Spacing) -> Self {
if value.space_m.saturating_sub(16) == 0 {
Self::Compact
} else if value.space_m.saturating_sub(24) == 0 {
Self::Standard
} else {
Self::Spacious
}
}
}

View file

@ -1,5 +1,6 @@
pub use corner::*; pub use corner::*;
pub use cosmic_palette::*; pub use cosmic_palette::*;
pub use density::*;
pub use derivation::*; pub use derivation::*;
pub use mode::*; pub use mode::*;
pub use spacing::*; pub use spacing::*;
@ -7,6 +8,7 @@ pub use theme::*;
mod corner; mod corner;
mod cosmic_palette; mod cosmic_palette;
mod density;
mod derivation; mod derivation;
mod mode; mod mode;
mod spacing; mod spacing;

View file

@ -41,59 +41,3 @@ impl Default for Spacing {
} }
} }
} }
/// Density options for the Cosmic theme
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
pub enum Density {
/// Lower padding/spacing of elements
Compact,
/// Standard padding/spacing of elements
#[default]
Standard,
/// Higher padding/spacing of elements
Spacious,
}
impl From<Density> for Spacing {
fn from(value: Density) -> Self {
match value {
Density::Compact => Spacing {
space_none: 0,
space_xxxs: 4,
space_xxs: 4,
space_xs: 8,
space_s: 8,
space_m: 16,
space_l: 24,
space_xl: 32,
space_xxl: 48,
space_xxxl: 64,
},
Density::Standard => Spacing::default(),
Density::Spacious => Spacing {
space_none: 4,
space_xxxs: 8,
space_xxs: 12,
space_xs: 16,
space_s: 24,
space_m: 32,
space_l: 48,
space_xl: 64,
space_xxl: 128,
space_xxxl: 160,
},
}
}
}
impl From<Spacing> for Density {
fn from(value: Spacing) -> Self {
if value.space_m.saturating_sub(16) == 0 {
Self::Compact
} else if value.space_m.saturating_sub(24) == 0 {
Self::Standard
} else {
Self::Spacious
}
}
}

View file

@ -1,13 +1,13 @@
use crate::composite::over;
use crate::steps::{color_index, get_small_widget_color, get_surface_color, get_text, steps};
use crate::{ use crate::{
Component, Container, CornerRadii, CosmicPalette, CosmicPaletteInner, DARK_PALETTE, Component, Container, CornerRadii, CosmicPalette, CosmicPaletteInner, DARK_PALETTE,
LIGHT_PALETTE, NAME, Spacing, ThemeMode, LIGHT_PALETTE, NAME, Spacing, ThemeMode,
composite::over,
steps::{color_index, get_small_widget_color, get_surface_color, get_text, steps},
}; };
use cosmic_config::{Config, CosmicConfigEntry}; use cosmic_config::{Config, CosmicConfigEntry};
use palette::color_difference::Wcag21RelativeContrast; use palette::{
use palette::rgb::Rgb; IntoColor, Oklcha, Srgb, Srgba, WithAlpha, color_difference::Wcag21RelativeContrast, rgb::Rgb,
use palette::{IntoColor, Oklcha, Srgb, Srgba, WithAlpha}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
@ -75,8 +75,6 @@ pub struct Theme {
pub icon_button: Component, pub icon_button: Component,
/// link button element colors /// link button element colors
pub link_button: Component, pub link_button: Component,
/// list button element colors
pub list_button: Component,
/// text button element colors /// text button element colors
pub text_button: Component, pub text_button: Component,
/// button component styling /// button component styling
@ -955,12 +953,6 @@ impl ThemeBuilder {
} }
#[allow(clippy::too_many_lines)] #[allow(clippy::too_many_lines)]
// The component_hovered/pressed_overlay vars are seeded once near the
// top of this fn and then reassigned inside each container block
// (primary, secondary, …) before being read again. The initial seed
// is therefore overwritten before any read, which is what the
// unused_assignments lint flags below.
#[allow(unused_assignments)]
/// build the theme /// build the theme
pub fn build(self) -> Theme { pub fn build(self) -> Theme {
let Self { let Self {
@ -1293,15 +1285,6 @@ impl ThemeBuilder {
component.on_disabled = over(component.on.with_alpha(0.5), component.base); component.on_disabled = over(component.on.with_alpha(0.5), component.base);
component component
}, },
list_button: Component::component(
Srgba::new(0.0, 0.0, 0.0, 0.0),
accent,
on_bg_component,
Srgba::new(0.0, 0.0, 0.0, 0.0),
button_pressed_overlay,
is_high_contrast,
control_steps_array[8],
),
success: Component::colored_component( success: Component::colored_component(
success, success,
control_steps_array[0], control_steps_array[0],

View file

@ -1,12 +1,10 @@
use crate::{Component, Theme, composite::over, steps::steps}; use crate::{Component, Theme, composite::over, steps::steps};
use configparser::ini::Ini;
use palette::{Darken, IntoColor, Lighten, Srgba, WithAlpha, rgb::Rgba}; use palette::{Darken, IntoColor, Lighten, Srgba, WithAlpha, rgb::Rgba};
use std::{ use std::{
fs::{self, File}, fs::{self, File},
io::{self, Write}, io::{self, Write},
num::NonZeroUsize, num::NonZeroUsize,
path::Path, path::Path,
process::Command,
}; };
use super::{OutputError, to_rgba}; use super::{OutputError, to_rgba};
@ -219,50 +217,6 @@ impl Theme {
Ok(()) Ok(())
} }
/// Apply the preferred GTK client-side decoration button layout.
///
/// This writes the GTK 3/4 `settings.ini` value used by GTK header bars and
/// also best-effort updates GNOME's `button-layout` GSettings key for apps
/// that still consult it.
///
/// # Errors
///
/// Returns an `OutputError` if the GTK settings files cannot be written.
#[cold]
pub fn apply_gtk_decoration_layout(buttons_at_start: bool) -> Result<(), OutputError> {
let Some(config_dir) = dirs::config_dir() else {
return Err(OutputError::MissingConfigDir);
};
let layout = if buttons_at_start {
"close,minimize,maximize:"
} else {
":minimize,maximize,close"
};
for gtk_version in ["gtk-3.0", "gtk-4.0"] {
let gtk_dir = config_dir.join(gtk_version);
fs::create_dir_all(&gtk_dir).map_err(OutputError::Io)?;
Self::write_gtk_settings_key(
&gtk_dir.join("settings.ini"),
"gtk-decoration-layout",
layout,
)?;
}
// best-effort: gsettings is absent on non-GNOME systems
let _ = Command::new("gsettings")
.args([
"set",
"org.gnome.desktop.wm.preferences",
"button-layout",
layout,
])
.status();
Ok(())
}
/// Reset the applied gtk css /// Reset the applied gtk css
/// ///
/// # Errors /// # Errors
@ -302,20 +256,6 @@ impl Theme {
Ok(()) Ok(())
} }
#[cold]
fn write_gtk_settings_key(path: &Path, key: &str, value: &str) -> Result<(), OutputError> {
let mut ini = Ini::new_cs();
if path.exists() {
let file_content = fs::read_to_string(path).map_err(OutputError::Io)?;
ini.read(file_content).map_err(OutputError::Ini)?;
}
ini.setstr("Settings", key, Some(value));
ini.pretty_write(path, &super::qt_settings_ini_style())
.map_err(OutputError::Io)
}
fn is_cosmic_css(path: &Path, cosmic_css: &Path) -> io::Result<Option<bool>> { fn is_cosmic_css(path: &Path, cosmic_css: &Path) -> io::Result<Option<bool>> {
if !path.exists() { if !path.exists() {
return Ok(None); return Ok(None);

View file

@ -1,6 +1,5 @@
use configparser::ini::WriteOptions; use configparser::ini::WriteOptions;
use palette::Srgba; use palette::{Srgba, rgb::Rgba};
use palette::rgb::Rgba;
use thiserror::Error; use thiserror::Error;
use crate::Theme; use crate::Theme;

View file

@ -1,12 +1,12 @@
use crate::Theme; use crate::Theme;
use configparser::ini::Ini; use configparser::ini::Ini;
use palette::blend::Compose; use palette::{Mix, Srgba, WithAlpha, blend::Compose, rgb::Rgba};
use palette::rgb::Rgba; use std::{
use palette::{Mix, Srgba, WithAlpha}; fs::{self, File},
use std::fs::{self, File}; io::Write,
use std::io::Write; path::PathBuf,
use std::path::PathBuf; vec,
use std::vec; };
use super::{OutputError, qt_settings_ini_style}; use super::{OutputError, qt_settings_ini_style};

View file

@ -1,11 +1,12 @@
use crate::Theme; use crate::Theme;
use configparser::ini::Ini; use configparser::ini::Ini;
use cosmic_config::CosmicConfigEntry; use cosmic_config::CosmicConfigEntry;
use palette::blend::Compose; use palette::{Mix, Srgba, blend::Compose};
use palette::{Mix, Srgba}; use std::{
use std::fs::{self, File}; fs::{self, File},
use std::io::{self, Write}; io::{self, Write},
use std::path::{Path, PathBuf}; path::{Path, PathBuf},
};
use super::{OutputError, qt_settings_ini_style}; use super::{OutputError, qt_settings_ini_style};

View file

@ -266,14 +266,6 @@ impl From<Theme> for VsTheme {
} }
impl Theme { impl Theme {
/// Write this theme to VS Code's `settings.json` as a
/// `workbench.colorCustomizations` entry, and enable
/// `window.autoDetectColorScheme` so VS Code follows the system theme.
///
/// # Errors
///
/// Returns an `OutputError` if the user config dir is missing, the
/// settings file cannot be read/written, or its JSON is invalid.
#[cold] #[cold]
pub fn apply_vs_code(self) -> Result<(), OutputError> { pub fn apply_vs_code(self) -> Result<(), OutputError> {
let vs_theme = VsTheme::from(self); let vs_theme = VsTheme::from(self);
@ -299,13 +291,6 @@ impl Theme {
Ok(()) Ok(())
} }
/// Remove the `workbench.colorCustomizations` entry previously written
/// by [`Theme::apply_vs_code`] from VS Code's `settings.json`.
///
/// # Errors
///
/// Returns an `OutputError` if the user config dir is missing, the
/// settings file cannot be read/written, or its JSON is invalid.
#[cold] #[cold]
pub fn reset_vs_code() -> Result<(), OutputError> { pub fn reset_vs_code() -> Result<(), OutputError> {
let mut config_dir = dirs::config_dir().ok_or(OutputError::MissingConfigDir)?; let mut config_dir = dirs::config_dir().ok_or(OutputError::MissingConfigDir)?;

View file

@ -1,8 +1,7 @@
use std::num::NonZeroUsize; use std::num::NonZeroUsize;
use almost::equal; use almost::equal;
use palette::convert::FromColorUnclamped; use palette::{ClampAssign, FromColor, Lch, Oklcha, Srgb, Srgba, convert::FromColorUnclamped};
use palette::{ClampAssign, FromColor, Lch, Oklcha, Srgb, Srgba};
/// Get an array of 100 colors with a specific hue and chroma /// Get an array of 100 colors with a specific hue and chroma
/// over the full range of lightness. /// over the full range of lightness.

View file

@ -6,7 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
open = "5.3.3" open = "5.3.3"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = [ features = [
"debug", "debug",

View file

@ -8,8 +8,7 @@ use cosmic::app::{Core, Settings, Task};
use cosmic::executor; use cosmic::executor;
use cosmic::iced::{alignment, Length, Size}; use cosmic::iced::{alignment, Length, Size};
use cosmic::prelude::*; use cosmic::prelude::*;
use cosmic::widget::about::About; use cosmic::widget::{self, about::About, nav_bar};
use cosmic::widget::{self, nav_bar};
/// Runs application with these settings /// Runs application with these settings
#[rustfmt::skip] #[rustfmt::skip]

View file

@ -12,7 +12,7 @@ tracing = "0.1"
env_logger = "0.10.2" env_logger = "0.10.2"
log = "0.4.29" log = "0.4.29"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
default-features = false default-features = false
features = ["applet-token"] features = ["applet-token"]

View file

@ -4,8 +4,7 @@ use cosmic::iced::core::window;
use cosmic::iced::window::Id; use cosmic::iced::window::Id;
use cosmic::iced::{Length, Rectangle}; use cosmic::iced::{Length, Rectangle};
use cosmic::surface::action::{app_popup, destroy_popup}; use cosmic::surface::action::{app_popup, destroy_popup};
use cosmic::widget::dropdown::popup_dropdown; use cosmic::widget::{dropdown::popup_dropdown, list_column, settings, toggler};
use cosmic::widget::{list_column, settings, toggler};
use cosmic::Element; use cosmic::Element;
const ID: &str = "com.system76.CosmicAppletExample"; const ID: &str = "com.system76.CosmicAppletExample";

View file

@ -5,12 +5,12 @@ edition = "2021"
[features] [features]
default = ["wayland"] default = ["wayland"]
wayland = ["libcosmic-yoda/wayland"] wayland = ["libcosmic/wayland"]
[dependencies] [dependencies]
env_logger = "0.11" env_logger = "0.11"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = [ features = [
"debug", "debug",

View file

@ -5,10 +5,9 @@
use cosmic::app::Settings; use cosmic::app::Settings;
use cosmic::iced::{Alignment, Length, Size}; use cosmic::iced::{Alignment, Length, Size};
use cosmic::prelude::*;
use cosmic::widget::menu::{self, KeyBind}; use cosmic::widget::menu::{self, KeyBind};
use cosmic::widget::nav_bar; use cosmic::widget::nav_bar;
use cosmic::{executor, iced, widget, Core}; use cosmic::{executor, iced, prelude::*, widget, Core};
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::LazyLock; use std::sync::LazyLock;
@ -240,9 +239,7 @@ impl cosmic::Application for App {
widget::progress_bar::linear::Linear::new() widget::progress_bar::linear::Linear::new()
.girth(10.0) .girth(10.0)
.progress(self.progress) .progress(self.progress)
.width(Length::Fill) .width(Length::Fill),
.markers([0.25, 0.5, 0.75])
.segment_spacing(2),
) )
.push( .push(
widget::progress_bar::circular::Circular::new() widget::progress_bar::circular::Circular::new()

View file

@ -8,6 +8,6 @@ edition = "2024"
[dependencies] [dependencies]
jiff = "0.2" jiff = "0.2"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"] features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -88,7 +88,4 @@ pub fn main() {
println!("Testing state"); println!("Testing state");
test_config(Config::new_state("com.system76.Example", 1).unwrap()); test_config(Config::new_state("com.system76.Example", 1).unwrap());
println!("Testing data");
test_config(Config::new_data("com.system76.Example", 1).unwrap());
} }

View file

@ -8,7 +8,7 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
tracing-log = "0.2.0" tracing-log = "0.2.0"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = [ features = [
"debug", "debug",

View file

@ -8,7 +8,7 @@ publish = false
[dependencies] [dependencies]
apply = "0.3.0" apply = "0.3.0"
fraction = "0.15.3" fraction = "0.15.3"
libcosmic-yoda = { path = "../..", features = [ libcosmic = { path = "../..", features = [
"debug", "debug",
"winit", "winit",
"tokio", "tokio",

View file

@ -23,11 +23,15 @@ use cosmic::{
Element, Element,
}; };
use cosmic_time::{Instant, Timeline}; use cosmic_time::{Instant, Timeline};
use std::cell::RefCell; use std::{
use std::rc::Rc; cell::RefCell,
use std::sync::atomic::{AtomicU32, Ordering}; rc::Rc,
use std::sync::Arc; sync::{
use std::vec; atomic::{AtomicU32, Ordering},
Arc,
},
vec,
};
// XXX The use of button is removed because it assigns the same ID to multiple buttons, causing a crash when a11y is enabled... // XXX The use of button is removed because it assigns the same ID to multiple buttons, causing a crash when a11y is enabled...
// static BTN: Lazy<id::Id> = Lazy::new(|| id::Id::new("BTN")); // static BTN: Lazy<id::Id> = Lazy::new(|| id::Id::new("BTN"));

View file

@ -1,7 +1,9 @@
use super::{Page, Window}; use super::{Page, Window};
use cosmic::iced::widget::{column, text}; use cosmic::{
use cosmic::widget::{list_column, settings, toggler}; iced::widget::{column, text},
use cosmic::Element; widget::{list_column, settings, toggler},
Element,
};
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub enum Message { pub enum Message {

View file

@ -1,17 +1,19 @@
use std::cell::RefCell; use std::{cell::RefCell, rc::Rc};
use std::rc::Rc;
use apply::Apply; use apply::Apply;
use cosmic::iced::widget::{checkbox, column, progress_bar, radio, slider, text}; use cosmic::{
use cosmic::iced::{Alignment, Length}; cosmic_theme,
use cosmic::iced_core::id; iced::widget::{checkbox, column, progress_bar, radio, slider, text},
use cosmic::theme::ThemeType; iced::{Alignment, Length},
use cosmic::widget::color_picker::ColorPickerUpdate; iced_core::id,
use cosmic::widget::{ theme::ThemeType,
button, dropdown, icon, layer_container as container, segmented_button, segmented_control, widget::{
settings, spin_button, tab_bar, toggler, ColorPickerModel, button, color_picker::ColorPickerUpdate, dropdown, icon, layer_container as container,
segmented_button, segmented_control, settings, spin_button, tab_bar, toggler,
ColorPickerModel,
},
Element,
}; };
use cosmic::{cosmic_theme, Element};
use cosmic_time::{anim, chain, Timeline}; use cosmic_time::{anim, chain, Timeline};
use fraction::{Decimal, ToPrimitive}; use fraction::{Decimal, ToPrimitive};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;

View file

@ -1,7 +1,10 @@
use cosmic::iced::widget::{column, container, horizontal_space, image, row, svg, text}; use cosmic::{
use cosmic::iced::Length; iced::widget::{column, container, horizontal_space, image, row, svg, text},
use cosmic::widget::{list_column, settings, toggler}; iced::Length,
use cosmic::{theme, Element}; theme,
widget::{list_column, settings, toggler},
Element,
};
use super::{Page, SubPage, Window}; use super::{Page, SubPage, Window};

View file

@ -1,7 +1,9 @@
use cosmic::iced::widget::{horizontal_space, row, text}; use cosmic::{
use cosmic::iced::Length; iced::widget::{horizontal_space, row, text},
use cosmic::widget::{icon, list_column, settings}; iced::Length,
use cosmic::Element; widget::{icon, list_column, settings},
Element,
};
use super::{Message, Page, SubPage, Window}; use super::{Message, Page, SubPage, Window};

View file

@ -7,6 +7,6 @@ edition = "2021"
tracing = "0.1.44" tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "wgpu", "tokio"] features = ["debug", "winit", "wgpu", "tokio"]

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
tracing-log = "0.2.0" tracing-log = "0.2.0"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"] features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -9,9 +9,11 @@ use std::{env, process};
use cosmic::app::{Core, Settings, Task}; use cosmic::app::{Core, Settings, Task};
use cosmic::iced::alignment::{Horizontal, Vertical}; use cosmic::iced::alignment::{Horizontal, Vertical};
use cosmic::iced::keyboard::Key; use cosmic::iced::keyboard::Key;
use cosmic::iced::{window, Length, Size}; use cosmic::iced::window;
use cosmic::iced::{Length, Size};
use cosmic::widget::menu::action::MenuAction; use cosmic::widget::menu::action::MenuAction;
use cosmic::widget::menu::key_bind::{KeyBind, Modifier}; use cosmic::widget::menu::key_bind::KeyBind;
use cosmic::widget::menu::key_bind::Modifier;
use cosmic::widget::menu::{self, ItemHeight, ItemWidth}; use cosmic::widget::menu::{self, ItemHeight, ItemWidth};
use cosmic::widget::RcElementWrapper; use cosmic::widget::RcElementWrapper;
use cosmic::{executor, Element}; use cosmic::{executor, Element};

View file

@ -6,4 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
libcosmic-yoda = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] } libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }

View file

@ -1,11 +1,13 @@
use std::collections::HashMap; use std::collections::HashMap;
use cosmic::app::Core; use cosmic::{
use cosmic::iced::core::{id, Alignment, Length, Point}; app::Core,
use cosmic::iced::widget::{column, container, scrollable, text}; iced::core::{id, Alignment, Length, Point},
use cosmic::iced::{self, event, window, Subscription}; iced::widget::{column, container, scrollable, text},
use cosmic::prelude::*; iced::{self, event, window, Subscription},
use cosmic::widget::{button, header_bar}; prelude::*,
widget::{button, header_bar},
};
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub enum Message { pub enum Message {

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
tracing-log = "0.2.0" tracing-log = "0.2.0"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"] features = ["debug", "winit", "tokio", "xdg-portal", "wgpu"]

View file

@ -5,8 +5,8 @@ edition = "2021"
[features] [features]
default = ["xdg-portal"] default = ["xdg-portal"]
rfd = ["libcosmic-yoda/rfd"] rfd = ["libcosmic/rfd"]
xdg-portal = ["libcosmic-yoda/xdg-portal"] xdg-portal = ["libcosmic/xdg-portal"]
[dependencies] [dependencies]
apply = "0.3.0" apply = "0.3.0"
@ -15,6 +15,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
url = "2.5.8" url = "2.5.8"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
features = ["debug", "winit", "wgpu", "wayland", "tokio"] features = ["debug", "winit", "wgpu", "wayland", "tokio"]
path = "../../" path = "../../"

View file

@ -6,7 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
fraction = "0.15.3" fraction = "0.15.3"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
features = ["debug", "wgpu", "winit", "desktop", "tokio"] features = ["debug", "wgpu", "winit", "desktop", "tokio"]
path = "../.." path = "../.."
default-features = false default-features = false

View file

@ -1,8 +1,15 @@
use cosmic::app::{Core, Task}; use cosmic::iced::Length;
use cosmic::iced::alignment::{Horizontal, Vertical};
use cosmic::iced::{self, Alignment, Length, Size};
use cosmic::widget::{column, container, spin_button}; use cosmic::widget::{column, container, spin_button};
use cosmic::{Application, Apply, Element}; use cosmic::Apply;
use cosmic::{
app::{Core, Task},
iced::{
self,
alignment::{Horizontal, Vertical},
Alignment, Size,
},
Application, Element,
};
use fraction::Decimal; use fraction::Decimal;
pub struct SpinButtonExamplApp { pub struct SpinButtonExamplApp {

View file

@ -5,6 +5,6 @@ edition = "2024"
[dependencies] [dependencies]
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"] features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]

View file

@ -5,8 +5,7 @@
use cosmic::app::{Core, Settings, Task}; use cosmic::app::{Core, Settings, Task};
use cosmic::iced::Subscription; use cosmic::iced::Subscription;
use cosmic::prelude::*; use cosmic::{executor, prelude::*, widget};
use cosmic::{executor, widget};
/// Runs application with these settings /// Runs application with these settings
fn main() -> Result<(), Box<dyn std::error::Error>> { fn main() -> Result<(), Box<dyn std::error::Error>> {

View file

@ -9,6 +9,6 @@ tracing-subscriber = "0.3.22"
tracing-log = "0.2.0" tracing-log = "0.2.0"
chrono = "*" chrono = "*"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
features = ["debug", "wgpu", "winit", "desktop", "tokio"] features = ["debug", "wgpu", "winit", "desktop", "tokio"]
path = "../.." path = "../.."

View file

@ -9,7 +9,8 @@ use chrono::Datelike;
use cosmic::app::{Core, Settings, Task}; use cosmic::app::{Core, Settings, Task};
use cosmic::iced::Size; use cosmic::iced::Size;
use cosmic::prelude::*; use cosmic::prelude::*;
use cosmic::widget::{self, nav_bar, table}; use cosmic::widget::table;
use cosmic::widget::{self, nav_bar};
use cosmic::{executor, iced}; use cosmic::{executor, iced};
#[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Hash)] #[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Hash)]

View file

@ -8,6 +8,6 @@ tracing = "0.1.44"
tracing-subscriber = "0.3.22" tracing-subscriber = "0.3.22"
tracing-log = "0.2.0" tracing-log = "0.2.0"
[dependencies.libcosmic-yoda] [dependencies.libcosmic]
path = "../../" path = "../../"
features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"] features = ["debug", "winit", "wgpu", "tokio", "xdg-portal"]

View file

@ -1,34 +0,0 @@
close = Κλείσιμο
february = Φεβρουάριος { $year }
documenters = Τεκμηριωτές
november = Νοέμβριος { $year }
may = Μάιος { $year }
april = Απρίλιος { $year }
translators = Μεταφραστές
artists = Καλλιτέχνες
license = Άδεια χρήσης
december = Δεκέμβριος { $year }
links = Σύνδεσμοι
march = Μάρτιος { $year }
june = Ιούνιος { $year }
august = Αύγουστος { $year }
developers = Προγραμματιστές
july = Ιούλιος { $year }
september = Σεπτέμβριος { $year }
designers = Σχεδιαστές
october = Οκτώβριος { $year }
january = Ιανουάριος { $year }
monday = Δευτέρα
mon = Δευ
tuesday = Τρίτη
tue = Τρί
wednesday = Τετάρτη
wed = Τετ
thursday = Πέμπτη
thu = Πέμ
friday = Παρασκευή
fri = Παρ
saturday = Σάββατο
sat = Σάβ
sunday = Κυριακή
sun = Κυρ

Some files were not shown because too many files have changed in this diff Show more