Compare commits

...
Sign in to create a new pull request.

50 commits
master ... main

Author SHA1 Message Date
f7bdd84ae4 chore: use local graphics dependencies 2026-05-25 19:36:38 +02:00
4a00191ac9 chore: point iced at local glyphon 2026-05-25 18:28:10 +02:00
d4d421511a chore: use local COSMIC support crates 2026-05-25 18:09:50 +02:00
f3db54342c fix: drop iced_winit/single-instance feature ref
Upstream dc84488c "fix(iced): double IME commit on GNOME desktop" wires
the libcosmic single-instance feature through iced_winit/single-instance,
but our pinned iced fork (yoda-wayland-only @ 81639935) does not carry
that feature yet. Drop the ref so libcosmic-yoda compiles after rebase;
the GNOME IME fix needs to be ported separately into the iced submodule
before this can be reinstated.

Leyoda 2026 – GPLv3
2026-05-25 13:13:30 +02:00
6722f1e581 yoda: use local dbus settings bindings 2026-05-25 13:10:12 +02:00
5f50d74477 feat(flex_row): reorderable rows with shadow constant gated (squashed)
Squash of 2 yoda commits:
- 7dd0ee83 feat: reorderable flex row
- b1b8203a fix: gate reorderable flex row shadow constant
2026-05-25 13:08:39 +02:00
7a191cf086 yoda: warning cleanup sweep (dead code + clippy --fix) (squashed)
Squash of 4 yoda commits:
- 84437e21 yoda: libcosmic-yoda dead-code purge (14->0 warnings)
- 999db0a4 yoda: cosmic-theme cleanup (4->0 warnings) — workspace at 0 warnings total
- 4743bb8e yoda: cargo clippy --fix on libcosmic-yoda (115->33 warnings)
- 675f3b59 chore: reduce local stack warnings
2026-05-25 13:07:48 +02:00
38acba82b4 yoda: bump iced submodule + cargo auto-fix sweeps (squashed)
Squash of 6 yoda commits:
- 282813c8 yoda: bump iced -> window_clipboard via public Forgejo fork
- cdf34938 yoda: cargo fix --lib (libcosmic-yoda) — drop 99 trivial warnings
- 38a988cb yoda: cargo fix on cosmic-config + bump iced auto-fix commit
- 301bbf6e yoda: bump iced submodule -> iced_winit warning cleanup (0 left)
- b94c03d9 yoda: bump iced submodule -> iced_widget cleanup (0 left)
- a9492d76 yoda: bump iced submodule -> all iced crates at 0 warnings
2026-05-25 13:07:13 +02:00
ef8f69134f feat(cosmic-theme): add apply_gtk_decoration_layout helper
Writes the gtk-decoration-layout key to ~/.config/gtk-{3,4}.0/settings.ini
and best-effort updates GNOME's button-layout GSettings key for apps that
still consult it. Factors out write_gtk_settings_key for reuse.

Leyoda 2026 – GPLv3
2026-05-25 13:05:50 +02:00
597aba3e9f yoda: bump iced submodule (Wayland-only + softbuffer cuts) (squashed)
Squash of 3 yoda commits:
- c118f5a2 yoda: bump iced submodule ref -> yoda-wayland-only HEAD 8f6be798
- 388e0655 yoda: bump iced submodule -> softbuffer + window_clipboard cuts
- 9b2a3643 Update iced warning fixes
2026-05-25 13:05:22 +02:00
e3dcdf1fce yoda: fork pivot — Wayland-only + ungate winit + soft-fork libcosmic-yoda (squashed)
Squash of 7 yoda commits forming the fork pivot:
- 255cf7cc rename: libcosmic -> libcosmic-yoda (fork 0.1.0-yoda)
- 8701aa31 feat(yoda): Wayland-only cut — drop winit and x11 features
- 6736a596 yoda: soft-fork pivot — keep Cargo name 'libcosmic' for dep unification
- 3e23d087 yoda: re-apply hard rename — libcosmic -> libcosmic-yoda (0.1.0-yoda)
- aec3eb61 yoda: ungate remaining winit+wayland combined cfgs
- 8ab7b158 yoda-v2: color_picker Theme ref + context_menu/menu ungate winit
- 8d1d8739 yoda: drop x11 defaults on iced_winit + iced_tiny_skia
2026-05-25 13:05:05 +02:00
10422b8f4a header_bar: add WindowControlsPosition (macOS-style left controls)
Adds a new public enum `WindowControlsPosition { Start, End }` and a
matching field on `HeaderBar`, allowing window controls (close / minimize
/ maximize) to be packed on the start side of the headerbar (macOS
style, icon order close → minimize → maximize) instead of the default
end side (Linux / GNOME style, minimize → maximize → close).

Wiring:
- `crate::widget::WindowControlsPosition` re-exported alongside
  `HeaderBar`.
- `HeaderBar::controls_position(Option<WindowControlsPosition>)` setter;
  when left unset, falls back to `crate::config::window_controls_position()`
  (reads `CosmicTk.window_controls_position`), mirroring how `density`
  falls back to `header_size()`.
- New `CosmicTk.window_controls_position` field with default `End` for
  backwards compatibility; serde-friendly enum so existing configs keep
  working via `#[serde(default)]` semantics.

Tested with cosmic-yoterm, cosmic-settings, cosmic-edit, cosmic-files
rebuilt against this libcosmic via a local `[patch]` override. Config
changes picked up live through the existing cosmic-config subscription.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 13:04:22 +02:00
87510782ae feat(segmented_button): on_double_click + internal tab reorder (squashed)
Squash of 2 yoda commits:
- 108441ef segmented_button: add on_double_click callback
- a322516f segmented_button: fix internal tab reorder end-to-end
2026-05-25 13:03:13 +02:00
ea17ada931 perf: throttle malloc_trim + avoid VecDeque clones (squashed)
Squash of 2 yoda commits:
- 77262dd0 perf(malloc): throttle malloc_trim to 1 Hz in hot paths
- 1d98eee6 perf(widget): avoid VecDeque clone in segmented_button/table Model::clear
2026-05-25 13:03:13 +02:00
Hojjat
8fa6a01d04 feat: add ability to provide extra paths to search for icons 2026-05-22 01:26:34 +02:00
Michael Aaron Murphy
113e0ae1f9
chore(applet): gracefully exit with log when panel exits
This was causing confusion for users that thought this symptom may be the cause of a problem.
2026-05-22 01:21:03 +02:00
Michael Aaron Murphy
2f022280f2
docs: fix cargo doc generation 2026-05-20 17:04:07 +02:00
Michael Aaron Murphy
e2b172e0bc
feat(iced): X11 resize fix, f16 shader compat, & selectable text feature 2026-05-20 16:06:07 +02:00
Hojjat
b279d82240 fix: circular progressbar crashes on very small windows 2026-05-20 07:25:00 -04:00
Hojjat
147306d581 chore: update iced 2026-05-20 07:25:00 -04:00
Vukašin Vojinović
466e25d9f8 feat(progress_bar): linear progress markers 2026-05-19 20:00:14 +02:00
Michael Aaron Murphy
6f863f1905 chore: cargo +nightly fmt 2026-05-18 09:25:23 -04:00
Andrei Ivanou
5782cb927e fix(process): safely exit forked child after spawn
Co-Authored-By: Michael Murphy <michael@mmurphy.dev>
2026-05-18 09:25:23 -04:00
DanielKaleby
631c81b170
feat(cosmic-config): add new_data method. 2026-05-14 16:19:43 +02:00
Ilia Malanin
cab9d5aff2
feat!(menu): support physical key matches for non-Latin keyboard layouts 2026-05-14 16:10:59 +02:00
Michael Aaron Murphy
2aa9133f9d
docs(readme): add Made for COSMIC Flatpak section 2026-05-13 16:14:34 +02:00
Michael Murphy
4fab6c777d
i18n: translation update from Hosted Weblate (#1269)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [Pop
OS/libcosmic](https://hosted.weblate.org/projects/pop-os/libcosmic/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pop-os/libcosmic/horizontal-auto.svg)
2026-05-12 17:12:40 +02:00
KENZ
b105e9a108
feat(iced): IME support improvements 2026-05-08 17:25:49 +02:00
Ashley Wulber
528513725d chore: update iced 2026-05-07 18:46:53 +02:00
Hojjat
0e0960f3c7 feat: reorderable flex row 2026-05-04 21:26:58 +02:00
Vukašin Vojinović
9c2a86a8f4 chore: add rustfmt config 2026-05-04 11:55:17 -04:00
Vukašin Vojinović
9abc4d483b chore: update dependencies 2026-05-04 11:55:17 -04:00
Vukašin Vojinović
34326b3925 chore(cosmic-theme): move Roundness to libcosmic 2026-05-04 11:55:17 -04:00
Hosted Weblate
15a8a535dd
i18n: translation updates from weblate
Co-authored-by: BoneNI <bounkirdni@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Марко М. Костић <marko.m.kostic@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/libcosmic/sr/
Translation: Pop OS/libcosmic
2026-05-03 01:52:48 +02:00
Vukašin Vojinović
564ef834ce improv(theme): list_button style
This adds a new `list_button` field to theme, which makes ListItem buttons stay transparent when pressed. It's essentially a mix of `text_button` and `background.component`, without hover highlights (as per designs).
2026-04-28 13:59:25 +02:00
Michael Murphy
99c038a66a
i18n: translation update from Hosted Weblate (#1263)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [Pop
OS/libcosmic](https://hosted.weblate.org/projects/pop-os/libcosmic/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pop-os/libcosmic/horizontal-auto.svg)
2026-04-27 16:24:57 +02:00
Hosted Weblate
cae05f3ffb
i18n: translation updates from weblate
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/libcosmic/el/
Translation: Pop OS/libcosmic
2026-04-27 16:10:11 +02:00
Vukašin Vojinović
8768bce2e2 fix(menu_bar): menu border radius 2026-04-27 15:28:03 +02:00
Michael Aaron Murphy
49846d9f28
fix: wgpu validation error on float16 shader with older GPUs 2026-04-27 15:05:05 +02:00
Rakshat
51be7dc42d
fix(menu_bar): use corner radius from theme for menu border 2026-04-27 15:00:52 +02:00
Will Sheehan
5825afb0da fix(segmented_button): reset menu state when reopening context menu
When a context menu is open and the user right-clicks a different item,
the overlay's close handler resets the menu state but no longer captures
the event (since e10459f). The right-click propagates to the widget,
which reopens the menu with stale `MenuBounds` from the previous context
menu. If the new menu has a different number of items, this causes an
assertion failure in `MenuState::layout`.

Call `data.reset()` before setting `data.open = true` in the right-click
handler to ensure stale `MenuBounds` are cleared before the next layout
pass rebuilds them.
2026-04-27 14:58:46 +02:00
Michael Aaron Murphy
f3fc763b5f
ci(pages): update Rust toolchain to latest nightly 2026-04-27 14:43:39 +02:00
Michael Aaron Murphy
21977ef617
feat(iced): update to wgpu 28 & cosmic-text 0.19 2026-04-27 14:39:52 +02:00
Michael Aaron Murphy
58b7532849
chore: update MSRV to Rust 1.93 2026-04-27 14:37:22 +02:00
Vukašin Vojinović
17291536a1 fix(header_bar): prevent double coloring 2026-04-23 11:15:32 -04:00
Vukašin Vojinović
dad5f1e273 fix(progress_bar): sync determinate animation clock on target change
This prevents the time delta from becoming very large when the widget hasn't animated for a bit, leading to snapping instead of a smooth animation.
Also prevents animating on widget creation, since it doesn't feel good in `cosmic-osd`.
2026-04-22 15:03:14 +02:00
Vukašin Vojinović
8b4c8adec8 feat(progress_bar): animate determinate progress 2026-04-21 13:39:43 -04:00
Vukašin Vojinović
4d39cf3d7b improv(progress_bar): unify indeterminate animations 2026-04-21 13:39:43 -04:00
KENZ
dc84488cd8
fix(iced): double IME commit on GNOME desktop 2026-04-19 17:03:20 +02:00
KENZ
6dba6a2561
fix(iced): make IME event forwarding to sctk optional
pulls in the change to make IME events forwarding to sctk optionally
2026-04-19 17:02:26 +02:00
225 changed files with 3112 additions and 1506 deletions

View file

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

15
.zed/settings.json Normal file
View file

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

View file

@ -1,20 +1,23 @@
[package]
name = "libcosmic"
version = "1.0.0"
# Yoda fork: hard-renamed. Every consumer (leyoda/cosmic-files fork + each
# leyoda/cosmic-* app) depends directly on `libcosmic-yoda` by path, bypassing
# 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"
rust-version = "1.90"
rust-version = "1.93"
[lib]
name = "cosmic"
[features]
default = [
"winit",
"tokio",
"a11y",
"dbus-config",
"x11",
"iced-wayland",
"wayland",
"multi-window",
]
advanced-shaping = ["iced/advanced-shaping"]
@ -35,7 +38,6 @@ animated-image = [
autosize = []
applet = [
"autosize",
"winit",
"wayland",
"tokio",
"cosmic-panel-config",
@ -81,32 +83,34 @@ tokio = [
"cosmic-config/tokio",
]
# Tokio async runtime
# Wayland window support
iced-wayland = [
# Wayland window support (yoda fork is Wayland-only; always active in default).
# We still need iced/winit because pop-os/iced hosts the runtime dispatcher
# (`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",
"autosize",
"iced/winit",
"iced/wayland",
"iced_winit/wayland",
"surface-message",
]
wayland = [
"iced-wayland",
"iced_runtime/cctk",
"iced_winit/cctk",
"iced_wgpu/cctk",
"iced/cctk",
"dep:iced_winit",
"dep:cctk",
"surface-message",
]
surface-message = []
# multi-window support
multi-window = []
# Render with wgpu
wgpu = ["iced/wgpu", "iced_wgpu"]
# X11 window support via winit
winit = ["iced/winit", "iced_winit"]
winit_debug = ["winit", "debug"]
winit_tokio = ["winit", "tokio"]
winit_wgpu = ["winit", "wgpu"]
# Compat stubs — kept empty so upstream deps (cosmic-files, cosmic-text, …)
# that still ask for `winit` / `x11` features resolve cleanly against the
# yoda fork. Activating them has no effect: no code is gated on these.
winit = []
x11 = []
# Enables XDG portal integrations
xdg-portal = ["ashpd"]
qr_code = ["iced/qr_code"]
@ -119,18 +123,17 @@ async-std = [
"zbus?/async-io",
"iced/async-std",
]
x11 = ["iced/x11", "iced_winit/x11"]
[dependencies]
apply = "0.3.0"
ashpd = { version = "0.12.3", default-features = false, optional = true }
async-fs = { version = "2.2", optional = true }
async-std = { version = "1.13", optional = true }
async-std = { workspace = true, optional = true }
auto_enums = "0.8.8"
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "160b086", optional = true }
cctk = { path = "../cosmic-protocols/client-toolkit", package = "cosmic-client-toolkit", optional = true }
jiff = "0.2"
cosmic-config = { path = "cosmic-config" }
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
cosmic-settings-config = { path = "../cosmic-settings-daemon/config", optional = true }
# Internationalization
i18n-embed = { version = "0.16.0", features = [
"fluent-system",
@ -150,34 +153,35 @@ image-extras = { version = "0.1.0", default-features = false, features = [
"xpm",
"xbm",
], optional = true }
libc = { version = "0.2.183", optional = true }
libc = { version = "0.2.186", optional = true }
log = "0.4"
mime = { version = "0.3.17", optional = true }
palette = "0.7.6"
palette.workspace = true
rfd = { version = "0.16.0", default-features = false, features = [
"xdg-portal",
], optional = true }
rustix = { version = "1.1", features = ["pipe", "process"], optional = true }
serde = { version = "1.0.228", features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
slotmap = "1.1.1"
smol = { version = "2.0.2", optional = true }
thiserror = "2.0.18"
thiserror.workspace = true
taffy = { version = "0.9.2", features = ["grid"] }
tokio = { version = "1.50.0", optional = true }
tracing = "0.1.44"
unicode-segmentation = "1.12"
tokio = { workspace = true, optional = true }
tracing.workspace = true
unicode-segmentation = "1.13"
url = "2.5.8"
zbus = { version = "5.14.0", default-features = false, optional = true }
zbus = { workspace = true, optional = true }
float-cmp = "0.10.0"
ron = { workspace = true, optional = true }
# Enable DBus feature on Linux targets
[target.'cfg(target_os = "linux")'.dependencies]
cosmic-config = { path = "cosmic-config", features = ["dbus"] }
cosmic-settings-daemon = { git = "https://github.com/pop-os/dbus-settings-bindings" }
cosmic-settings-daemon = { path = "../dbus-settings-bindings/cosmic-settings-daemon" }
zbus = { version = "5.14.0", default-features = false }
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
freedesktop-icons = { package = "cosmic-freedesktop-icons", git = "https://github.com/pop-os/freedesktop-icons" }
freedesktop-icons = { package = "cosmic-freedesktop-icons", path = "../cosmic-freedesktop-icons" }
freedesktop-desktop-entry = { version = "0.8.1", optional = true }
shlex = { version = "1.3.0", optional = true }
@ -223,35 +227,77 @@ optional = true
[dependencies.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]
path = "./iced/winit"
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]
path = "./iced/wgpu"
optional = true
[dependencies.cosmic-panel-config]
git = "https://github.com/pop-os/cosmic-panel"
# path = "../cosmic-panel/cosmic-panel-config"
path = "../cosmic-panel/cosmic-panel-config"
optional = true
[dependencies.ron]
version = "0.12"
optional = true
[patch.'https://github.com/pop-os/freedesktop-icons']
cosmic-freedesktop-icons = { path = "../cosmic-freedesktop-icons" }
[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]
members = [
"cosmic-config",
"cosmic-config-derive",
"cosmic-theme",
"examples/*",
]
exclude = ["iced"]
# examples/* excluded — many depend on the removed winit/x11 features.
# They will be revisited and adapted in a later phase.
exclude = ["iced", "examples"]
[workspace.dependencies]
dirs = "6.0.0"
async-std = "1.13"
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]
tempfile = "3.27.0"

View file

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

View file

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

View file

@ -1,16 +1,13 @@
//! Integrations for cosmic-config — the cosmic configuration system.
use notify::{
RecommendedWatcher, Watcher,
event::{EventKind, ModifyKind, RenameMode},
};
use serde::{Serialize, de::DeserializeOwned};
use std::{
env, fmt, fs,
io::Write,
path::{Path, PathBuf},
sync::Mutex,
};
use notify::event::{EventKind, ModifyKind, RenameMode};
use notify::{RecommendedWatcher, Watcher};
use serde::Serialize;
use serde::de::DeserializeOwned;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::sync::Mutex;
use std::{env, fmt, fs};
/// Get the config directory, with Flatpak sandbox support.
/// In Flatpak, HOST_XDG_CONFIG_HOME points to the real user config directory,
@ -54,6 +51,22 @@ fn get_state_dir() -> Option<PathBuf> {
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")]
mod subscription;
#[cfg(feature = "subscription")]
@ -266,6 +279,24 @@ 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)
#[inline]
pub fn transaction(&self) -> ConfigTransaction<'_> {

View file

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

View file

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

View file

@ -29,3 +29,51 @@ 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

@ -1,69 +0,0 @@
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,6 +1,5 @@
pub use corner::*;
pub use cosmic_palette::*;
pub use density::*;
pub use derivation::*;
pub use mode::*;
pub use spacing::*;
@ -8,7 +7,6 @@ pub use theme::*;
mod corner;
mod cosmic_palette;
mod density;
mod derivation;
mod mode;
mod spacing;

View file

@ -41,3 +41,59 @@ 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::{
Component, Container, CornerRadii, CosmicPalette, CosmicPaletteInner, DARK_PALETTE,
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 palette::{
IntoColor, Oklcha, Srgb, Srgba, WithAlpha, color_difference::Wcag21RelativeContrast, rgb::Rgb,
};
use palette::color_difference::Wcag21RelativeContrast;
use palette::rgb::Rgb;
use palette::{IntoColor, Oklcha, Srgb, Srgba, WithAlpha};
use serde::{Deserialize, Serialize};
use std::num::NonZeroUsize;
@ -75,6 +75,8 @@ pub struct Theme {
pub icon_button: Component,
/// link button element colors
pub link_button: Component,
/// list button element colors
pub list_button: Component,
/// text button element colors
pub text_button: Component,
/// button component styling
@ -953,6 +955,12 @@ impl ThemeBuilder {
}
#[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
pub fn build(self) -> Theme {
let Self {
@ -1285,6 +1293,15 @@ impl ThemeBuilder {
component.on_disabled = over(component.on.with_alpha(0.5), component.base);
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,
control_steps_array[0],

View file

@ -1,10 +1,12 @@
use crate::{Component, Theme, composite::over, steps::steps};
use configparser::ini::Ini;
use palette::{Darken, IntoColor, Lighten, Srgba, WithAlpha, rgb::Rgba};
use std::{
fs::{self, File},
io::{self, Write},
num::NonZeroUsize,
path::Path,
process::Command,
};
use super::{OutputError, to_rgba};
@ -217,6 +219,50 @@ impl Theme {
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
///
/// # Errors
@ -256,6 +302,20 @@ impl Theme {
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>> {
if !path.exists() {
return Ok(None);

View file

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

View file

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

View file

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

View file

@ -266,6 +266,14 @@ impl From<Theme> for VsTheme {
}
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]
pub fn apply_vs_code(self) -> Result<(), OutputError> {
let vs_theme = VsTheme::from(self);
@ -291,6 +299,13 @@ impl Theme {
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]
pub fn reset_vs_code() -> Result<(), OutputError> {
let mut config_dir = dirs::config_dir().ok_or(OutputError::MissingConfigDir)?;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -88,4 +88,7 @@ pub fn main() {
println!("Testing state");
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-log = "0.2.0"
[dependencies.libcosmic]
[dependencies.libcosmic-yoda]
path = "../../"
features = [
"debug",

View file

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

View file

@ -23,15 +23,11 @@ use cosmic::{
Element,
};
use cosmic_time::{Instant, Timeline};
use std::{
cell::RefCell,
rc::Rc,
sync::{
atomic::{AtomicU32, Ordering},
Arc,
},
vec,
};
use std::cell::RefCell;
use std::rc::Rc;
use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::Arc;
use std::vec;
// 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"));

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -9,11 +9,9 @@ use std::{env, process};
use cosmic::app::{Core, Settings, Task};
use cosmic::iced::alignment::{Horizontal, Vertical};
use cosmic::iced::keyboard::Key;
use cosmic::iced::window;
use cosmic::iced::{Length, Size};
use cosmic::iced::{window, Length, Size};
use cosmic::widget::menu::action::MenuAction;
use cosmic::widget::menu::key_bind::KeyBind;
use cosmic::widget::menu::key_bind::Modifier;
use cosmic::widget::menu::key_bind::{KeyBind, Modifier};
use cosmic::widget::menu::{self, ItemHeight, ItemWidth};
use cosmic::widget::RcElementWrapper;
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
[dependencies]
libcosmic = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }
libcosmic-yoda = { path = "../..", features = ["debug", "winit", "tokio", "single-instance", "wgpu", "wayland"] }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,34 @@
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