Use themeable branch of libcosmic, adjust date/time spacing

This commit is contained in:
Jeremy Soller 2023-10-12 09:18:04 -06:00
parent 0f933aad9f
commit 1c52e63715
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
3 changed files with 96 additions and 44 deletions

130
Cargo.lock generated
View file

@ -526,9 +526,9 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
[[package]] [[package]]
name = "calloop" name = "calloop"
version = "0.12.2" version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aadd183e815348c0649051b1c43418643208f8ed13c8a84da7215b4e1cf42714" checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf"
dependencies = [ dependencies = [
"bitflags 2.4.0", "bitflags 2.4.0",
"log", "log",
@ -733,10 +733,10 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-bg-config" name = "cosmic-bg-config"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/cosmic-bg?branch=master_jammy#1e0d51cf6c95d913763cefc60714406236a8a0de" source = "git+https://github.com/pop-os/cosmic-bg#6a6fe4e387e46c2e159df56a9768220a6269ccf4"
dependencies = [ dependencies = [
"colorgrad", "colorgrad",
"cosmic-config", "cosmic-config 0.1.0 (git+https://github.com/pop-os/libcosmic)",
"derive_setters", "derive_setters",
"image", "image",
"ron", "ron",
@ -747,13 +747,27 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-config" name = "cosmic-config"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [
"atomicwrites",
"cosmic-config-derive 0.1.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"dirs 5.0.1",
"iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"notify",
"ron",
"serde",
]
[[package]]
name = "cosmic-config"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#ca3870ed135fc8d748e95b924d18f3c9473642be"
dependencies = [ dependencies = [
"atomicwrites", "atomicwrites",
"calloop", "calloop",
"cosmic-config-derive", "cosmic-config-derive 0.1.0 (git+https://github.com/pop-os/libcosmic)",
"dirs 5.0.1", "dirs 5.0.1",
"iced_futures", "iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic)",
"notify", "notify",
"ron", "ron",
"serde", "serde",
@ -762,7 +776,16 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-config-derive" name = "cosmic-config-derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [
"quote",
"syn 1.0.109",
]
[[package]]
name = "cosmic-config-derive"
version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#ca3870ed135fc8d748e95b924d18f3c9473642be"
dependencies = [ dependencies = [
"quote", "quote",
"syn 1.0.109", "syn 1.0.109",
@ -774,6 +797,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"chrono", "chrono",
"cosmic-bg-config", "cosmic-bg-config",
"cosmic-config 0.1.0 (git+https://github.com/pop-os/libcosmic)",
"env_logger 0.10.0", "env_logger 0.10.0",
"freedesktop_entry_parser", "freedesktop_entry_parser",
"greetd_ipc", "greetd_ipc",
@ -809,10 +833,10 @@ dependencies = [
[[package]] [[package]]
name = "cosmic-theme" name = "cosmic-theme"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"almost", "almost",
"cosmic-config", "cosmic-config 0.1.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"csscolorparser", "csscolorparser",
"lazy_static", "lazy_static",
"palette", "palette",
@ -1763,11 +1787,11 @@ dependencies = [
[[package]] [[package]]
name = "iced" name = "iced"
version = "0.10.0" version = "0.10.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"iced_accessibility", "iced_accessibility",
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_futures", "iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_renderer", "iced_renderer",
"iced_sctk", "iced_sctk",
"iced_widget", "iced_widget",
@ -1778,7 +1802,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_accessibility" name = "iced_accessibility"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_unix", "accesskit_unix",
@ -1787,7 +1811,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_core" name = "iced_core"
version = "0.10.0" version = "0.10.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"iced_accessibility", "iced_accessibility",
@ -1799,29 +1823,53 @@ dependencies = [
"twox-hash", "twox-hash",
] ]
[[package]]
name = "iced_core"
version = "0.10.0"
source = "git+https://github.com/pop-os/libcosmic#ca3870ed135fc8d748e95b924d18f3c9473642be"
dependencies = [
"bitflags 1.3.2",
"instant",
"log",
"thiserror",
"twox-hash",
]
[[package]] [[package]]
name = "iced_futures" name = "iced_futures"
version = "0.7.0" version = "0.7.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"futures", "futures",
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"log", "log",
"tokio", "tokio",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-timer", "wasm-timer",
] ]
[[package]]
name = "iced_futures"
version = "0.7.0"
source = "git+https://github.com/pop-os/libcosmic#ca3870ed135fc8d748e95b924d18f3c9473642be"
dependencies = [
"futures",
"iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic)",
"log",
"wasm-bindgen-futures",
"wasm-timer",
]
[[package]] [[package]]
name = "iced_graphics" name = "iced_graphics"
version = "0.9.0" version = "0.9.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"bytemuck", "bytemuck",
"glam", "glam",
"half", "half",
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"image", "image",
"kamadak-exif", "kamadak-exif",
"log", "log",
@ -1833,7 +1881,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_renderer" name = "iced_renderer"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"iced_graphics", "iced_graphics",
"iced_tiny_skia", "iced_tiny_skia",
@ -1846,11 +1894,11 @@ dependencies = [
[[package]] [[package]]
name = "iced_runtime" name = "iced_runtime"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"iced_accessibility", "iced_accessibility",
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_futures", "iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"smithay-client-toolkit 0.17.0", "smithay-client-toolkit 0.17.0",
"thiserror", "thiserror",
] ]
@ -1858,12 +1906,12 @@ dependencies = [
[[package]] [[package]]
name = "iced_sctk" name = "iced_sctk"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"enum-repr", "enum-repr",
"float-cmp", "float-cmp",
"futures", "futures",
"iced_futures", "iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_graphics", "iced_graphics",
"iced_runtime", "iced_runtime",
"iced_style", "iced_style",
@ -1882,9 +1930,9 @@ dependencies = [
[[package]] [[package]]
name = "iced_style" name = "iced_style"
version = "0.9.0" version = "0.9.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"once_cell", "once_cell",
"palette", "palette",
] ]
@ -1892,7 +1940,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_tiny_skia" name = "iced_tiny_skia"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cosmic-text", "cosmic-text",
@ -1910,7 +1958,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_wgpu" name = "iced_wgpu"
version = "0.11.1" version = "0.11.1"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"bytemuck", "bytemuck",
@ -1932,7 +1980,7 @@ dependencies = [
[[package]] [[package]]
name = "iced_widget" name = "iced_widget"
version = "0.1.3" version = "0.1.3"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"iced_renderer", "iced_renderer",
"iced_runtime", "iced_runtime",
@ -2165,19 +2213,19 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
[[package]] [[package]]
name = "libcosmic" name = "libcosmic"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f0005165f3ac9ec6ea63e5422d22d459e5ec240d" source = "git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching#65036b4d3a73d635aa57d5a58b9da7b4a211632a"
dependencies = [ dependencies = [
"apply", "apply",
"ashpd", "ashpd",
"cosmic-config", "cosmic-config 0.1.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"cosmic-theme", "cosmic-theme",
"css-color", "css-color",
"derive_setters", "derive_setters",
"fraction", "fraction",
"freedesktop-icons", "freedesktop-icons",
"iced", "iced",
"iced_core", "iced_core 0.10.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_futures", "iced_futures 0.7.0 (git+https://github.com/pop-os/libcosmic?branch=theme-dark-light-switching)",
"iced_renderer", "iced_renderer",
"iced_runtime", "iced_runtime",
"iced_sctk", "iced_sctk",
@ -3155,9 +3203,9 @@ dependencies = [
[[package]] [[package]]
name = "regex" name = "regex"
version = "1.9.6" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@ -3167,9 +3215,9 @@ dependencies = [
[[package]] [[package]]
name = "regex-automata" name = "regex-automata"
version = "0.3.9" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
@ -3178,9 +3226,9 @@ dependencies = [
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.7.5" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33"
[[package]] [[package]]
name = "renderdoc-sys" name = "renderdoc-sys"
@ -3683,7 +3731,7 @@ dependencies = [
[[package]] [[package]]
name = "taffy" name = "taffy"
version = "0.3.11" version = "0.3.11"
source = "git+https://github.com/DioxusLabs/taffy#48e4800f14c6af5cd26275fb570d11b93e279654" source = "git+https://github.com/DioxusLabs/taffy?rev=65bedf#65bedf128ec8cef40c1a21b6f141f2c771842cca"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"grid", "grid",

View file

@ -15,7 +15,10 @@ wayland-client = "0.31"
[dependencies.cosmic-bg-config] [dependencies.cosmic-bg-config]
git = "https://github.com/pop-os/cosmic-bg" git = "https://github.com/pop-os/cosmic-bg"
branch = "master_jammy"
[dependencies.cosmic-config]
git = "https://github.com/pop-os/libcosmic"
features = ["calloop", "macro"]
[dependencies.greetd_ipc] [dependencies.greetd_ipc]
version = "0.9" version = "0.9"
@ -23,6 +26,7 @@ features = ["sync-codec"]
[dependencies.libcosmic] [dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic" git = "https://github.com/pop-os/libcosmic"
branch = "theme-dark-light-switching"
default-features = false default-features = false
features = ["tokio", "wayland"] features = ["tokio", "wayland"]

View file

@ -3,7 +3,6 @@
use cosmic::app::{message, Command, Core, Settings}; use cosmic::app::{message, Command, Core, Settings};
use cosmic::{ use cosmic::{
cosmic_config::CosmicConfigEntry,
executor, executor,
iced::{ iced::{
self, alignment, self, alignment,
@ -21,6 +20,7 @@ use cosmic::{
iced_runtime::core::window::Id as SurfaceId, iced_runtime::core::window::Id as SurfaceId,
style, widget, Element, style, widget, Element,
}; };
use cosmic_config::CosmicConfigEntry;
use std::{ use std::{
collections::HashMap, collections::HashMap,
ffi::{CStr, CString}, ffi::{CStr, CString},
@ -446,7 +446,7 @@ impl cosmic::Application for App {
fn view_window(&self, surface_id: SurfaceId) -> Element<Self::Message> { fn view_window(&self, surface_id: SurfaceId) -> Element<Self::Message> {
let left_element = { let left_element = {
let date_time_column = { let date_time_column = {
let mut column = widget::column::with_capacity(2).padding(16.0).spacing(12.0); let mut column = widget::column::with_capacity(2).padding(16.0);
let dt = chrono::Local::now(); let dt = chrono::Local::now();