chore: Update libcosmic
This commit is contained in:
parent
4e12957169
commit
2a0b1cf7e9
10 changed files with 267 additions and 206 deletions
170
Cargo.lock
generated
170
Cargo.lock
generated
|
|
@ -189,9 +189,9 @@ checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atomic_refcell"
|
name = "atomic_refcell"
|
||||||
version = "0.1.11"
|
version = "0.1.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "112ef6b3f6cb3cb6fc5b6b494ef7a848492cff1ab0ef4de10b0f7d572861c905"
|
checksum = "76f2bfe491d41d45507b8431da8274f7feeca64a49e86d980eed2937ec2ff020"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atomicwrites"
|
name = "atomicwrites"
|
||||||
|
|
@ -372,7 +372,7 @@ dependencies = [
|
||||||
"bitflags 2.4.0",
|
"bitflags 2.4.0",
|
||||||
"log",
|
"log",
|
||||||
"polling",
|
"polling",
|
||||||
"rustix 0.38.14",
|
"rustix 0.38.15",
|
||||||
"slab",
|
"slab",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
@ -528,7 +528,7 @@ dependencies = [
|
||||||
"i18n-embed-fl",
|
"i18n-embed-fl",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
"id_tree",
|
"id_tree",
|
||||||
"indexmap 2.0.1",
|
"indexmap 2.0.2",
|
||||||
"keyframe",
|
"keyframe",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libcosmic",
|
"libcosmic",
|
||||||
|
|
@ -571,7 +571,7 @@ 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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomicwrites",
|
"atomicwrites",
|
||||||
"calloop 0.12.2",
|
"calloop 0.12.2",
|
||||||
|
|
@ -586,7 +586,7 @@ 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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn 1.0.109",
|
"syn 1.0.109",
|
||||||
|
|
@ -627,7 +627,7 @@ 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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"almost",
|
"almost",
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
|
|
@ -889,7 +889,7 @@ version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
|
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libloading 0.8.0",
|
"libloading 0.8.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1096,9 +1096,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "errno"
|
name = "errno"
|
||||||
version = "0.3.3"
|
version = "0.3.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd"
|
checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"errno-dragonfly",
|
"errno-dragonfly",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -1136,9 +1136,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "exr"
|
name = "exr"
|
||||||
version = "1.71.0"
|
version = "1.6.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "832a761f35ab3e6664babfbdc6cef35a4860e816ec3916dcfd0882954e98a8a8"
|
checksum = "279d3efcc55e19917fff7ab3ddd6c14afb6a90881a0078465196fe2f99d08c56"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bit_field",
|
"bit_field",
|
||||||
"flume",
|
"flume",
|
||||||
|
|
@ -1281,10 +1281,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flume"
|
name = "flume"
|
||||||
version = "0.11.0"
|
version = "0.10.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
|
checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"futures-sink",
|
||||||
|
"nanorand",
|
||||||
|
"pin-project",
|
||||||
"spin",
|
"spin",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1300,7 +1304,7 @@ version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4"
|
checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"roxmltree 0.18.0",
|
"roxmltree 0.18.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1524,8 +1528,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
"js-sys",
|
||||||
"libc",
|
"libc",
|
||||||
"wasi",
|
"wasi",
|
||||||
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1649,6 +1655,12 @@ dependencies = [
|
||||||
"bitflags 2.4.0",
|
"bitflags 2.4.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grid"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "guillotiere"
|
name = "guillotiere"
|
||||||
version = "0.6.2"
|
version = "0.6.2"
|
||||||
|
|
@ -1661,10 +1673,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "half"
|
name = "half"
|
||||||
version = "2.2.1"
|
version = "2.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0"
|
checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
"crunchy",
|
"crunchy",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1802,7 +1815,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced"
|
name = "iced"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1815,7 +1828,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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"instant",
|
"instant",
|
||||||
|
|
@ -1828,7 +1841,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_futures"
|
name = "iced_futures"
|
||||||
version = "0.7.0"
|
version = "0.7.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"iced_core",
|
"iced_core",
|
||||||
|
|
@ -1840,7 +1853,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iced_graphics"
|
name = "iced_graphics"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -1858,7 +1871,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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_graphics",
|
"iced_graphics",
|
||||||
"iced_tiny_skia",
|
"iced_tiny_skia",
|
||||||
|
|
@ -1871,7 +1884,7 @@ 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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"iced_futures",
|
"iced_futures",
|
||||||
|
|
@ -1881,7 +1894,7 @@ 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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_core",
|
"iced_core",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
|
@ -1891,7 +1904,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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
"cosmic-text",
|
"cosmic-text",
|
||||||
|
|
@ -1909,7 +1922,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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"bytemuck",
|
"bytemuck",
|
||||||
|
|
@ -1931,7 +1944,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/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iced_renderer",
|
"iced_renderer",
|
||||||
"iced_runtime",
|
"iced_runtime",
|
||||||
|
|
@ -2010,9 +2023,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "2.0.1"
|
version = "2.0.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ad227c3af19d4914570ad36d30409928b75967c298feb9ea1969db3a610bb14e"
|
checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"equivalent",
|
"equivalent",
|
||||||
"hashbrown 0.14.1",
|
"hashbrown 0.14.1",
|
||||||
|
|
@ -2243,7 +2256,7 @@ checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libcosmic"
|
name = "libcosmic"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/libcosmic/?rev=188b7c2b#188b7c2bbc35d0e9f1e218f52c1dc9cf89490744"
|
source = "git+https://github.com/pop-os/libcosmic/?rev=f91287d#f91287dec2297df41a339c1106850c4cf179f67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"apply",
|
"apply",
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
|
|
@ -2263,6 +2276,7 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"palette",
|
"palette",
|
||||||
"slotmap",
|
"slotmap",
|
||||||
|
"taffy",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tracing",
|
"tracing",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
|
|
@ -2281,9 +2295,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
version = "0.8.0"
|
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 = "d580318f95776505201b28cf98eb1fa5e4be3b689633ba6a3e6cd880ff22d8cb"
|
checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
|
|
@ -2351,9 +2365,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.4.7"
|
version = "0.4.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"
|
checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "locale_config"
|
name = "locale_config"
|
||||||
|
|
@ -2481,9 +2495,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
version = "2.6.3"
|
version = "2.6.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
|
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memmap2"
|
name = "memmap2"
|
||||||
|
|
@ -2613,6 +2627,15 @@ dependencies = [
|
||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nanorand"
|
||||||
|
version = "0.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "natord"
|
name = "natord"
|
||||||
version = "1.0.9"
|
version = "1.0.9"
|
||||||
|
|
@ -3164,6 +3187,26 @@ version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
|
checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
|
||||||
|
dependencies = [
|
||||||
|
"pin-project-internal",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project-internal"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn 2.0.37",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-lite"
|
name = "pin-project-lite"
|
||||||
version = "0.2.13"
|
version = "0.2.13"
|
||||||
|
|
@ -3197,14 +3240,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "polling"
|
name = "polling"
|
||||||
version = "3.1.0"
|
version = "3.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7571075a670bb8e02350c4d1c27d934aabdce416aa91a95d58dc9e21267dad3c"
|
checksum = "62a79e457c9898100b4298d57d69ec53d06f9a6ed352431ce5f377e082d2e846"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"rustix 0.38.14",
|
"rustix 0.38.15",
|
||||||
"tracing",
|
"tracing",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
@ -3462,13 +3505,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.9.5"
|
version = "1.9.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
|
checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-automata 0.3.8",
|
"regex-automata 0.3.9",
|
||||||
"regex-syntax 0.7.5",
|
"regex-syntax 0.7.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -3483,9 +3526,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-automata"
|
name = "regex-automata"
|
||||||
version = "0.3.8"
|
version = "0.3.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
|
checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
|
@ -3605,9 +3648,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "roxmltree"
|
name = "roxmltree"
|
||||||
version = "0.18.0"
|
version = "0.18.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8"
|
checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"xmlparser",
|
"xmlparser",
|
||||||
]
|
]
|
||||||
|
|
@ -3684,14 +3727,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.14"
|
version = "0.38.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f"
|
checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.0",
|
"bitflags 2.4.0",
|
||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys 0.4.7",
|
"linux-raw-sys 0.4.8",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -3900,11 +3943,11 @@ dependencies = [
|
||||||
"gbm",
|
"gbm",
|
||||||
"gl_generator",
|
"gl_generator",
|
||||||
"glow 0.12.3",
|
"glow 0.12.3",
|
||||||
"indexmap 2.0.1",
|
"indexmap 2.0.2",
|
||||||
"input",
|
"input",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading 0.8.0",
|
"libloading 0.8.1",
|
||||||
"libseat",
|
"libseat",
|
||||||
"nix 0.27.1",
|
"nix 0.27.1",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
|
@ -4110,6 +4153,17 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "taffy"
|
||||||
|
version = "0.3.11"
|
||||||
|
source = "git+https://github.com/DioxusLabs/taffy#65bedf128ec8cef40c1a21b6f141f2c771842cca"
|
||||||
|
dependencies = [
|
||||||
|
"arrayvec",
|
||||||
|
"grid",
|
||||||
|
"num-traits",
|
||||||
|
"slotmap",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.8.0"
|
version = "3.8.0"
|
||||||
|
|
@ -4119,7 +4173,7 @@ dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"fastrand 2.0.1",
|
"fastrand 2.0.1",
|
||||||
"redox_syscall 0.3.5",
|
"redox_syscall 0.3.5",
|
||||||
"rustix 0.38.14",
|
"rustix 0.38.15",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -4312,7 +4366,7 @@ version = "0.19.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.0.1",
|
"indexmap 2.0.2",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
"winnow",
|
"winnow",
|
||||||
]
|
]
|
||||||
|
|
@ -4323,7 +4377,7 @@ version = "0.20.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe"
|
checksum = "ca676d9ba1a322c1b64eb8045a5ec5c0cfb0c9d08e15e9ff622589ad5221c8fe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.0.1",
|
"indexmap 2.0.2",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_spanned",
|
"serde_spanned",
|
||||||
"toml_datetime",
|
"toml_datetime",
|
||||||
|
|
@ -4615,7 +4669,7 @@ dependencies = [
|
||||||
"imagesize 0.12.0",
|
"imagesize 0.12.0",
|
||||||
"kurbo 0.9.5",
|
"kurbo 0.9.5",
|
||||||
"log",
|
"log",
|
||||||
"roxmltree 0.18.0",
|
"roxmltree 0.18.1",
|
||||||
"simplecss",
|
"simplecss",
|
||||||
"siphasher",
|
"siphasher",
|
||||||
"svgtypes 0.11.0",
|
"svgtypes 0.11.0",
|
||||||
|
|
@ -5089,7 +5143,7 @@ dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"khronos-egl",
|
"khronos-egl",
|
||||||
"libc",
|
"libc",
|
||||||
"libloading 0.8.0",
|
"libloading 0.8.1",
|
||||||
"log",
|
"log",
|
||||||
"metal",
|
"metal",
|
||||||
"naga",
|
"naga",
|
||||||
|
|
@ -5471,9 +5525,9 @@ checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xmlparser"
|
name = "xmlparser"
|
||||||
version = "0.13.5"
|
version = "0.13.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd"
|
checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xmlwriter"
|
name = "xmlwriter"
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ libsystemd = { version = "0.5", optional = true }
|
||||||
wayland-backend = "0.3.0"
|
wayland-backend = "0.3.0"
|
||||||
wayland-scanner = "0.31.0"
|
wayland-scanner = "0.31.0"
|
||||||
cosmic-comp-config = { path = "cosmic-comp-config" }
|
cosmic-comp-config = { path = "cosmic-comp-config" }
|
||||||
cosmic-config = { git = "https://github.com/pop-os/libcosmic/", rev = "188b7c2b", features = ["calloop"] }
|
cosmic-config = { git = "https://github.com/pop-os/libcosmic/", rev = "f91287d", features = ["calloop"] }
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", branch = "main", default-features = false, features = ["server"] }
|
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", branch = "main", default-features = false, features = ["server"] }
|
||||||
libcosmic = { git = "https://github.com/pop-os/libcosmic/", rev = "188b7c2b", default-features = false }
|
libcosmic = { git = "https://github.com/pop-os/libcosmic/", rev = "f91287d", default-features = false }
|
||||||
iced_tiny_skia = { git = "https://github.com/pop-os/libcosmic/", rev = "188b7c2b" }
|
iced_tiny_skia = { git = "https://github.com/pop-os/libcosmic/", rev = "f91287d" }
|
||||||
tiny-skia = "0.10"
|
tiny-skia = "0.10"
|
||||||
ordered-float = "3.0"
|
ordered-float = "3.0"
|
||||||
glow = "0.11.2"
|
glow = "0.11.2"
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ use crate::{
|
||||||
utils::iced::{IcedElement, Program},
|
utils::iced::{IcedElement, Program},
|
||||||
};
|
};
|
||||||
|
|
||||||
use apply::Apply;
|
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::widget::{column, container, horizontal_space, row, vertical_space},
|
iced::widget::{column, container, horizontal_space, row, vertical_space},
|
||||||
iced_core::{Background, Color, Length},
|
iced_core::{Background, Color, Length},
|
||||||
theme,
|
theme,
|
||||||
widget::{icon, text},
|
widget::{icon::from_name, text},
|
||||||
|
Apply,
|
||||||
};
|
};
|
||||||
use smithay::utils::Size;
|
use smithay::utils::Size;
|
||||||
|
|
||||||
|
|
@ -64,26 +64,29 @@ impl Program for ResizeIndicatorInternal {
|
||||||
|
|
||||||
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
||||||
let edges = self.edges.lock().unwrap();
|
let edges = self.edges.lock().unwrap();
|
||||||
column(vec![
|
let icon_container_style = || {
|
||||||
if edges.contains(ResizeEdge::TOP) {
|
theme::Container::custom(|theme| container::Appearance {
|
||||||
icon(
|
icon_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
if self.direction == ResizeDirection::Outwards {
|
|
||||||
"go-up-symbolic"
|
|
||||||
} else {
|
|
||||||
"go-down-symbolic"
|
|
||||||
},
|
|
||||||
32,
|
|
||||||
)
|
|
||||||
.force_svg(true)
|
|
||||||
.apply(container)
|
|
||||||
.padding(2)
|
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
||||||
border_radius: 18.0.into(),
|
border_radius: 18.0.into(),
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
}))
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
column(vec![
|
||||||
|
if edges.contains(ResizeEdge::TOP) {
|
||||||
|
from_name(if self.direction == ResizeDirection::Outwards {
|
||||||
|
"go-up-symbolic"
|
||||||
|
} else {
|
||||||
|
"go-down-symbolic"
|
||||||
|
})
|
||||||
|
.size(32)
|
||||||
|
.prefer_svg(true)
|
||||||
|
.apply(container)
|
||||||
|
.padding(2)
|
||||||
|
.style(icon_container_style())
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.center_x()
|
.center_x()
|
||||||
|
|
@ -94,24 +97,16 @@ impl Program for ResizeIndicatorInternal {
|
||||||
},
|
},
|
||||||
row(vec![
|
row(vec![
|
||||||
if edges.contains(ResizeEdge::LEFT) {
|
if edges.contains(ResizeEdge::LEFT) {
|
||||||
icon(
|
from_name(if self.direction == ResizeDirection::Outwards {
|
||||||
if self.direction == ResizeDirection::Outwards {
|
|
||||||
"go-previous-symbolic"
|
"go-previous-symbolic"
|
||||||
} else {
|
} else {
|
||||||
"go-next-symbolic"
|
"go-next-symbolic"
|
||||||
},
|
})
|
||||||
32,
|
.size(32)
|
||||||
)
|
.prefer_svg(true)
|
||||||
.force_svg(true)
|
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding(4)
|
.padding(4)
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(icon_container_style())
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
|
||||||
border_radius: 18.0.into(),
|
|
||||||
border_width: 0.0,
|
|
||||||
border_color: Color::TRANSPARENT,
|
|
||||||
}))
|
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.center_y()
|
.center_y()
|
||||||
|
|
@ -144,13 +139,7 @@ impl Program for ResizeIndicatorInternal {
|
||||||
.center_y()
|
.center_y()
|
||||||
.padding(16)
|
.padding(16)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(icon_container_style())
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
|
||||||
border_radius: 18.0.into(),
|
|
||||||
border_width: 0.0,
|
|
||||||
border_color: Color::TRANSPARENT,
|
|
||||||
}))
|
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.height(Length::Shrink)
|
.height(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
|
|
@ -160,24 +149,16 @@ impl Program for ResizeIndicatorInternal {
|
||||||
.center_y()
|
.center_y()
|
||||||
.into(),
|
.into(),
|
||||||
if edges.contains(ResizeEdge::RIGHT) {
|
if edges.contains(ResizeEdge::RIGHT) {
|
||||||
icon(
|
from_name(if self.direction == ResizeDirection::Outwards {
|
||||||
if self.direction == ResizeDirection::Outwards {
|
|
||||||
"go-next-symbolic"
|
"go-next-symbolic"
|
||||||
} else {
|
} else {
|
||||||
"go-previous-symbolic"
|
"go-previous-symbolic"
|
||||||
},
|
})
|
||||||
32,
|
.size(32)
|
||||||
)
|
.prefer_svg(true)
|
||||||
.force_svg(true)
|
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding(4)
|
.padding(4)
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(icon_container_style())
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
|
||||||
border_radius: 18.0.into(),
|
|
||||||
border_width: 0.0,
|
|
||||||
border_color: Color::TRANSPARENT,
|
|
||||||
}))
|
|
||||||
.height(Length::Shrink)
|
.height(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.center_y()
|
.center_y()
|
||||||
|
|
@ -191,24 +172,16 @@ impl Program for ResizeIndicatorInternal {
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
.into(),
|
.into(),
|
||||||
if edges.contains(ResizeEdge::BOTTOM) {
|
if edges.contains(ResizeEdge::BOTTOM) {
|
||||||
icon(
|
from_name(if self.direction == ResizeDirection::Outwards {
|
||||||
if self.direction == ResizeDirection::Outwards {
|
|
||||||
"go-down-symbolic"
|
"go-down-symbolic"
|
||||||
} else {
|
} else {
|
||||||
"go-up-symbolic"
|
"go-up-symbolic"
|
||||||
},
|
})
|
||||||
32,
|
.size(32)
|
||||||
)
|
.prefer_svg(true)
|
||||||
.force_svg(true)
|
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding(4)
|
.padding(4)
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(icon_container_style())
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
|
||||||
border_radius: 18.0.into(),
|
|
||||||
border_width: 0.0,
|
|
||||||
border_color: Color::TRANSPARENT,
|
|
||||||
}))
|
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.center_x()
|
.center_x()
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,13 @@ use crate::{
|
||||||
utils::prelude::SeatExt,
|
utils::prelude::SeatExt,
|
||||||
wayland::handlers::screencopy::ScreencopySessions,
|
wayland::handlers::screencopy::ScreencopySessions,
|
||||||
};
|
};
|
||||||
use apply::Apply;
|
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::{id::Id, widget as iced_widget},
|
iced::{id::Id, widget as iced_widget},
|
||||||
iced_core::{Background, BorderRadius, Color, Length},
|
iced_core::{Background, BorderRadius, Color, Length},
|
||||||
iced_runtime::Command,
|
iced_runtime::Command,
|
||||||
iced_widget::scrollable::AbsoluteOffset,
|
iced_widget::scrollable::AbsoluteOffset,
|
||||||
theme, widget as cosmic_widget, Element as CosmicElement,
|
theme, widget as cosmic_widget, Apply, Element as CosmicElement,
|
||||||
};
|
};
|
||||||
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::InputType;
|
use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::InputType;
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
@ -652,8 +651,10 @@ impl Program for CosmicStackInternal {
|
||||||
let group_focused = self.group_focused.load(Ordering::SeqCst);
|
let group_focused = self.group_focused.load(Ordering::SeqCst);
|
||||||
|
|
||||||
let elements = vec![
|
let elements = vec![
|
||||||
cosmic_widget::icon("window-stack-symbolic", 16)
|
cosmic_widget::icon::from_name("window-stack-symbolic")
|
||||||
.force_svg(true)
|
.size(16)
|
||||||
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
.style(if group_focused {
|
.style(if group_focused {
|
||||||
theme::Svg::custom(|theme| iced_widget::svg::Appearance {
|
theme::Svg::custom(|theme| iced_widget::svg::Appearance {
|
||||||
color: Some(if theme.cosmic().is_dark {
|
color: Some(if theme.cosmic().is_dark {
|
||||||
|
|
@ -663,7 +664,7 @@ impl Program for CosmicStackInternal {
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
theme::Svg::Symbolic
|
theme::Svg::Default
|
||||||
})
|
})
|
||||||
.apply(iced_widget::container)
|
.apply(iced_widget::container)
|
||||||
.padding([4, 24])
|
.padding([4, 24])
|
||||||
|
|
@ -712,6 +713,7 @@ impl Program for CosmicStackInternal {
|
||||||
.center_y()
|
.center_y()
|
||||||
.style(if self.group_focused.load(Ordering::SeqCst) {
|
.style(if self.group_focused.load(Ordering::SeqCst) {
|
||||||
theme::Container::custom(|theme| iced_widget::container::Appearance {
|
theme::Container::custom(|theme| iced_widget::container::Appearance {
|
||||||
|
icon_color: Some(Color::from(theme.cosmic().background.on)),
|
||||||
text_color: Some(Color::from(theme.cosmic().background.on)),
|
text_color: Some(Color::from(theme.cosmic().background.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
||||||
border_radius: BorderRadius::from([8.0, 8.0, 0.0, 0.0]),
|
border_radius: BorderRadius::from([8.0, 8.0, 0.0, 0.0]),
|
||||||
|
|
@ -720,6 +722,7 @@ impl Program for CosmicStackInternal {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
theme::Container::custom(|theme| iced_widget::container::Appearance {
|
theme::Container::custom(|theme| iced_widget::container::Appearance {
|
||||||
|
icon_color: Some(Color::from(theme.cosmic().background.on)),
|
||||||
text_color: Some(Color::from(theme.cosmic().background.on)),
|
text_color: Some(Color::from(theme.cosmic().background.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().palette.neutral_3.into())),
|
background: Some(Background::Color(theme.cosmic().palette.neutral_3.into())),
|
||||||
border_radius: BorderRadius::from([8.0, 8.0, 0.0, 0.0]),
|
border_radius: BorderRadius::from([8.0, 8.0, 0.0, 0.0]),
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
use apply::Apply;
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
font::Font,
|
font::Font,
|
||||||
iced::{
|
iced::{
|
||||||
widget::{
|
widget::{self, container::draw_background, rule::FillMode},
|
||||||
self, container::draw_background, rule::FillMode, text::StyleSheet as TextStyleSheet,
|
|
||||||
},
|
|
||||||
Element,
|
Element,
|
||||||
},
|
},
|
||||||
iced_core::{
|
iced_core::{
|
||||||
|
|
@ -13,6 +10,7 @@ use cosmic::{
|
||||||
mouse, overlay, renderer,
|
mouse, overlay, renderer,
|
||||||
widget::{
|
widget::{
|
||||||
operation::{Operation, OperationOutputWrapper},
|
operation::{Operation, OperationOutputWrapper},
|
||||||
|
text::StyleSheet as TextStyleSheet,
|
||||||
tree::Tree,
|
tree::Tree,
|
||||||
Id, Widget,
|
Id, Widget,
|
||||||
},
|
},
|
||||||
|
|
@ -22,9 +20,10 @@ use cosmic::{
|
||||||
button::StyleSheet as ButtonStyleSheet, container::StyleSheet as ContainerStyleSheet,
|
button::StyleSheet as ButtonStyleSheet, container::StyleSheet as ContainerStyleSheet,
|
||||||
rule::StyleSheet as RuleStyleSheet,
|
rule::StyleSheet as RuleStyleSheet,
|
||||||
},
|
},
|
||||||
iced_widget::scrollable::AbsoluteOffset,
|
iced_widget::{scrollable::AbsoluteOffset, text},
|
||||||
theme,
|
theme,
|
||||||
widget::{icon, text, Icon},
|
widget::{icon::from_name, Icon},
|
||||||
|
Apply,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::tab_text::tab_text;
|
use super::tab_text::tab_text;
|
||||||
|
|
@ -82,6 +81,7 @@ impl Into<theme::Container> for TabBackgroundTheme {
|
||||||
match self {
|
match self {
|
||||||
Self::ActiveActivated => {
|
Self::ActiveActivated => {
|
||||||
theme::Container::custom(move |theme| widget::container::Appearance {
|
theme::Container::custom(move |theme| widget::container::Appearance {
|
||||||
|
icon_color: Some(Color::from(theme.cosmic().accent_text_color())),
|
||||||
text_color: Some(Color::from(theme.cosmic().accent_text_color())),
|
text_color: Some(Color::from(theme.cosmic().accent_text_color())),
|
||||||
background: Some(background_color),
|
background: Some(background_color),
|
||||||
border_radius: 0.0.into(),
|
border_radius: 0.0.into(),
|
||||||
|
|
@ -91,6 +91,7 @@ impl Into<theme::Container> for TabBackgroundTheme {
|
||||||
}
|
}
|
||||||
Self::ActiveDeactivated => {
|
Self::ActiveDeactivated => {
|
||||||
theme::Container::custom(move |_theme| widget::container::Appearance {
|
theme::Container::custom(move |_theme| widget::container::Appearance {
|
||||||
|
icon_color: None,
|
||||||
text_color: None,
|
text_color: None,
|
||||||
background: Some(background_color),
|
background: Some(background_color),
|
||||||
border_radius: 0.0.into(),
|
border_radius: 0.0.into(),
|
||||||
|
|
@ -113,9 +114,9 @@ pub trait TabMessage: Clone {
|
||||||
fn scrolled() -> Self;
|
fn scrolled() -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Tab<'a, Message: TabMessage> {
|
pub struct Tab<Message: TabMessage> {
|
||||||
id: Id,
|
id: Id,
|
||||||
app_icon: Icon<'a>,
|
app_icon: Icon,
|
||||||
title: String,
|
title: String,
|
||||||
font: Font,
|
font: Font,
|
||||||
close_message: Option<Message>,
|
close_message: Option<Message>,
|
||||||
|
|
@ -125,11 +126,11 @@ pub struct Tab<'a, Message: TabMessage> {
|
||||||
active: bool,
|
active: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Message: TabMessage> Tab<'a, Message> {
|
impl<Message: TabMessage> Tab<Message> {
|
||||||
pub fn new(title: impl Into<String>, app_id: impl Into<String>, id: Id) -> Self {
|
pub fn new(title: impl Into<String>, app_id: impl Into<String>, id: Id) -> Self {
|
||||||
Tab {
|
Tab {
|
||||||
id,
|
id,
|
||||||
app_icon: icon(app_id.into(), 16),
|
app_icon: from_name(app_id.into()).size(16).icon(),
|
||||||
title: title.into(),
|
title: title.into(),
|
||||||
font: cosmic::font::FONT,
|
font: cosmic::font::FONT,
|
||||||
close_message: None,
|
close_message: None,
|
||||||
|
|
@ -175,25 +176,27 @@ impl<'a, Message: TabMessage> Tab<'a, Message> {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn internal<Renderer>(self, idx: usize) -> TabInternal<'a, Message, Renderer>
|
pub(super) fn internal<'a, Renderer>(self, idx: usize) -> TabInternal<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer + 'a,
|
Renderer: cosmic::iced_core::Renderer + 'a,
|
||||||
Renderer: cosmic::iced_core::text::Renderer<Font = Font>,
|
Renderer: cosmic::iced_core::text::Renderer<Font = Font>,
|
||||||
Renderer::Theme: ButtonStyleSheet<Style = theme::Button>,
|
Renderer::Theme: ButtonStyleSheet<Style = theme::iced::Button>,
|
||||||
Renderer::Theme: ContainerStyleSheet,
|
Renderer::Theme: ContainerStyleSheet,
|
||||||
Renderer::Theme: RuleStyleSheet<Style = theme::Rule>,
|
Renderer::Theme: RuleStyleSheet<Style = theme::Rule>,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
Message: 'a,
|
Message: 'a,
|
||||||
widget::Button<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
widget::Button<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
||||||
widget::Container<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
widget::Container<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
||||||
Icon<'a>: Into<Element<'a, Message, Renderer>>,
|
widget::Text<'a, Renderer>: Into<Element<'a, Message, Renderer>>,
|
||||||
|
Icon: Into<Element<'a, Message, Renderer>>,
|
||||||
{
|
{
|
||||||
let mut close_button = icon("window-close-symbolic", 16)
|
let mut close_button = from_name("window-close-symbolic")
|
||||||
.force_svg(true)
|
.size(16)
|
||||||
.style(theme::Svg::Symbolic)
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
.apply(widget::button)
|
.apply(widget::button)
|
||||||
.padding(0)
|
.padding(0)
|
||||||
.style(theme::Button::Text);
|
.style(theme::iced::Button::Text);
|
||||||
if let Some(close_message) = self.close_message {
|
if let Some(close_message) = self.close_message {
|
||||||
close_button = close_button.on_press(close_message);
|
close_button = close_button.on_press(close_message);
|
||||||
}
|
}
|
||||||
|
|
@ -207,6 +210,7 @@ impl<'a, Message: TabMessage> Tab<'a, Message> {
|
||||||
.padding([2, 4])
|
.padding([2, 4])
|
||||||
.center_y()
|
.center_y()
|
||||||
.into(),
|
.into(),
|
||||||
|
Element::<'a, Message, Renderer>::new(
|
||||||
text(self.title)
|
text(self.title)
|
||||||
.size(14)
|
.size(14)
|
||||||
.font(self.font)
|
.font(self.font)
|
||||||
|
|
@ -215,8 +219,8 @@ impl<'a, Message: TabMessage> Tab<'a, Message> {
|
||||||
.apply(tab_text)
|
.apply(tab_text)
|
||||||
.background(self.background_theme.background_color())
|
.background(self.background_theme.background_color())
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill),
|
||||||
.into(),
|
),
|
||||||
close_button
|
close_button
|
||||||
.apply(widget::container)
|
.apply(widget::container)
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
|
|
@ -325,7 +329,7 @@ where
|
||||||
renderer: &Renderer,
|
renderer: &Renderer,
|
||||||
operation: &mut dyn Operation<OperationOutputWrapper<Message>>,
|
operation: &mut dyn Operation<OperationOutputWrapper<Message>>,
|
||||||
) {
|
) {
|
||||||
operation.container(None, &mut |operation| {
|
operation.container(None, layout.bounds(), &mut |operation| {
|
||||||
self.elements
|
self.elements
|
||||||
.iter()
|
.iter()
|
||||||
.zip(&mut tree.children)
|
.zip(&mut tree.children)
|
||||||
|
|
@ -347,6 +351,7 @@ where
|
||||||
renderer: &Renderer,
|
renderer: &Renderer,
|
||||||
clipboard: &mut dyn Clipboard,
|
clipboard: &mut dyn Clipboard,
|
||||||
shell: &mut Shell<'_, Message>,
|
shell: &mut Shell<'_, Message>,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> event::Status {
|
) -> event::Status {
|
||||||
let status = self
|
let status = self
|
||||||
.elements
|
.elements
|
||||||
|
|
@ -362,6 +367,7 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
shell,
|
shell,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.fold(event::Status::Ignored, event::Status::merge);
|
.fold(event::Status::Ignored, event::Status::merge);
|
||||||
|
|
@ -434,7 +440,9 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
theme,
|
theme,
|
||||||
&renderer::Style {
|
&renderer::Style {
|
||||||
|
icon_color: style.text_color.unwrap_or(renderer_style.text_color),
|
||||||
text_color: style.text_color.unwrap_or(renderer_style.text_color),
|
text_color: style.text_color.unwrap_or(renderer_style.text_color),
|
||||||
|
scale_factor: renderer_style.scale_factor,
|
||||||
},
|
},
|
||||||
layout,
|
layout,
|
||||||
cursor,
|
cursor,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use cosmic::{
|
||||||
gradient,
|
gradient,
|
||||||
layout::{Layout, Limits, Node},
|
layout::{Layout, Limits, Node},
|
||||||
mouse::Cursor,
|
mouse::Cursor,
|
||||||
renderer,
|
renderer::{self, Renderer as IcedRenderer},
|
||||||
widget::{Tree, Widget},
|
widget::{Tree, Widget},
|
||||||
Background, Color, Degrees, Gradient, Length, Point, Rectangle, Size,
|
Background, Color, Degrees, Gradient, Length, Point, Rectangle, Size,
|
||||||
},
|
},
|
||||||
|
|
@ -13,7 +13,7 @@ use cosmic::{
|
||||||
|
|
||||||
pub struct TabText<'a, Message, Renderer>
|
pub struct TabText<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer,
|
Renderer: IcedRenderer,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
{
|
{
|
||||||
text: Element<'a, Message, Renderer>,
|
text: Element<'a, Message, Renderer>,
|
||||||
|
|
@ -26,7 +26,7 @@ pub fn tab_text<'a, Message, Renderer>(
|
||||||
text: impl Into<Element<'a, Message, Renderer>>,
|
text: impl Into<Element<'a, Message, Renderer>>,
|
||||||
) -> TabText<'a, Message, Renderer>
|
) -> TabText<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer,
|
Renderer: IcedRenderer,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
{
|
{
|
||||||
TabText::new(text, Color::TRANSPARENT)
|
TabText::new(text, Color::TRANSPARENT)
|
||||||
|
|
@ -34,7 +34,7 @@ where
|
||||||
|
|
||||||
impl<'a, Message, Renderer> TabText<'a, Message, Renderer>
|
impl<'a, Message, Renderer> TabText<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer,
|
Renderer: IcedRenderer,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
{
|
{
|
||||||
pub fn new(text: impl Into<Element<'a, Message, Renderer>>, background: Color) -> Self {
|
pub fn new(text: impl Into<Element<'a, Message, Renderer>>, background: Color) -> Self {
|
||||||
|
|
@ -66,7 +66,7 @@ where
|
||||||
|
|
||||||
impl<'a, Message, Renderer> Widget<Message, Renderer> for TabText<'a, Message, Renderer>
|
impl<'a, Message, Renderer> Widget<Message, Renderer> for TabText<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer,
|
Renderer: IcedRenderer,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
{
|
{
|
||||||
fn width(&self) -> Length {
|
fn width(&self) -> Length {
|
||||||
|
|
@ -148,7 +148,7 @@ where
|
||||||
|
|
||||||
impl<'a, Message, Renderer> Into<Element<'a, Message, Renderer>> for TabText<'a, Message, Renderer>
|
impl<'a, Message, Renderer> Into<Element<'a, Message, Renderer>> for TabText<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer + 'a,
|
Renderer: IcedRenderer + 'a,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
Message: 'a,
|
Message: 'a,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use super::tab::{Tab, TabBackgroundTheme, TabMessage, TabRuleTheme, MIN_ACTIVE_TAB_WIDTH};
|
use super::tab::{Tab, TabBackgroundTheme, TabMessage, TabRuleTheme, MIN_ACTIVE_TAB_WIDTH};
|
||||||
use apply::Apply;
|
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
font::Font,
|
font::Font,
|
||||||
iced::{id::Id, widget, Element},
|
iced::{id::Id, widget, Element},
|
||||||
|
|
@ -24,7 +23,8 @@ use cosmic::{
|
||||||
},
|
},
|
||||||
iced_widget::container::draw_background,
|
iced_widget::container::draw_background,
|
||||||
theme,
|
theme,
|
||||||
widget::{icon, Icon},
|
widget::{icon::from_name, Icon},
|
||||||
|
Apply,
|
||||||
};
|
};
|
||||||
use keyframe::{
|
use keyframe::{
|
||||||
ease,
|
ease,
|
||||||
|
|
@ -122,17 +122,17 @@ impl<'a, Message, Renderer> Tabs<'a, Message, Renderer>
|
||||||
where
|
where
|
||||||
Renderer: cosmic::iced_core::Renderer + 'a,
|
Renderer: cosmic::iced_core::Renderer + 'a,
|
||||||
Renderer: cosmic::iced_core::text::Renderer<Font = Font>,
|
Renderer: cosmic::iced_core::text::Renderer<Font = Font>,
|
||||||
Renderer::Theme: ButtonStyleSheet<Style = theme::Button>,
|
Renderer::Theme: ButtonStyleSheet<Style = theme::iced::Button>,
|
||||||
Renderer::Theme: ContainerStyleSheet<Style = theme::Container>,
|
Renderer::Theme: ContainerStyleSheet<Style = theme::Container>,
|
||||||
Renderer::Theme: RuleStyleSheet<Style = theme::Rule>,
|
Renderer::Theme: RuleStyleSheet<Style = theme::Rule>,
|
||||||
Renderer::Theme: TextStyleSheet,
|
Renderer::Theme: TextStyleSheet,
|
||||||
Message: TabMessage + 'a,
|
Message: TabMessage + 'a,
|
||||||
widget::Button<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
widget::Button<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
||||||
widget::Container<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
widget::Container<'a, Message, Renderer>: Into<Element<'a, Message, Renderer>>,
|
||||||
Icon<'a>: Into<Element<'a, Message, Renderer>>,
|
Icon: Into<Element<'a, Message, Renderer>>,
|
||||||
{
|
{
|
||||||
pub fn new(
|
pub fn new(
|
||||||
tabs: impl IntoIterator<Item = Tab<'a, Message>>,
|
tabs: impl IntoIterator<Item = Tab<Message>>,
|
||||||
active: usize,
|
active: usize,
|
||||||
activated: bool,
|
activated: bool,
|
||||||
group_focused: bool,
|
group_focused: bool,
|
||||||
|
|
@ -189,22 +189,24 @@ where
|
||||||
TabRuleTheme::Default
|
TabRuleTheme::Default
|
||||||
})
|
})
|
||||||
.into(),
|
.into(),
|
||||||
icon("go-previous-symbolic", 16)
|
from_name("go-previous-symbolic")
|
||||||
.force_svg(true)
|
.size(16)
|
||||||
.style(theme::Svg::Symbolic)
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
.apply(widget::button)
|
.apply(widget::button)
|
||||||
.style(theme::Button::Text)
|
.style(theme::iced::Button::Text)
|
||||||
.on_press(Message::scroll_back())
|
.on_press(Message::scroll_back())
|
||||||
.into(),
|
.into(),
|
||||||
]
|
]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.chain(tabs)
|
.chain(tabs)
|
||||||
.chain(vec![
|
.chain(vec![
|
||||||
icon("go-next-symbolic", 16)
|
from_name("go-next-symbolic")
|
||||||
.force_svg(true)
|
.size(16)
|
||||||
.style(theme::Svg::Symbolic)
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
.apply(widget::button)
|
.apply(widget::button)
|
||||||
.style(theme::Button::Text)
|
.style(theme::iced::Button::Text)
|
||||||
.on_press(Message::scroll_further())
|
.on_press(Message::scroll_further())
|
||||||
.into(),
|
.into(),
|
||||||
widget::vertical_rule(4)
|
widget::vertical_rule(4)
|
||||||
|
|
@ -489,6 +491,7 @@ where
|
||||||
let background_style = ContainerStyleSheet::appearance(
|
let background_style = ContainerStyleSheet::appearance(
|
||||||
theme,
|
theme,
|
||||||
&theme::Container::custom(|theme| widget::container::Appearance {
|
&theme::Container::custom(|theme| widget::container::Appearance {
|
||||||
|
icon_color: None,
|
||||||
text_color: None,
|
text_color: None,
|
||||||
background: Some(Background::Color(Color::from(
|
background: Some(Background::Color(Color::from(
|
||||||
theme.cosmic().palette.neutral_3,
|
theme.cosmic().palette.neutral_3,
|
||||||
|
|
@ -659,11 +662,18 @@ where
|
||||||
operation: &mut dyn Operation<OperationOutputWrapper<Message>>,
|
operation: &mut dyn Operation<OperationOutputWrapper<Message>>,
|
||||||
) {
|
) {
|
||||||
let state = tree.state.downcast_mut::<State>();
|
let state = tree.state.downcast_mut::<State>();
|
||||||
|
let bounds = layout.bounds();
|
||||||
|
|
||||||
state.cleanup_old_animations();
|
state.cleanup_old_animations();
|
||||||
|
|
||||||
operation.scrollable(state, self.id.as_ref());
|
operation.scrollable(
|
||||||
|
state,
|
||||||
|
self.id.as_ref(),
|
||||||
|
bounds,
|
||||||
|
Vector { x: 0.0, y: 0.0 }, /* seemingly unused */
|
||||||
|
);
|
||||||
|
|
||||||
operation.container(self.id.as_ref(), &mut |operation| {
|
operation.container(self.id.as_ref(), bounds, &mut |operation| {
|
||||||
self.elements[2..self.elements.len() - 3]
|
self.elements[2..self.elements.len() - 3]
|
||||||
.iter()
|
.iter()
|
||||||
.zip(tree.children.iter_mut().skip(2))
|
.zip(tree.children.iter_mut().skip(2))
|
||||||
|
|
@ -685,6 +695,7 @@ where
|
||||||
renderer: &Renderer,
|
renderer: &Renderer,
|
||||||
clipboard: &mut dyn Clipboard,
|
clipboard: &mut dyn Clipboard,
|
||||||
shell: &mut Shell<'_, Message>,
|
shell: &mut Shell<'_, Message>,
|
||||||
|
viewport: &Rectangle,
|
||||||
) -> event::Status {
|
) -> event::Status {
|
||||||
let state = tree.state.downcast_mut::<State>();
|
let state = tree.state.downcast_mut::<State>();
|
||||||
state.cleanup_old_animations();
|
state.cleanup_old_animations();
|
||||||
|
|
@ -826,6 +837,7 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
&mut internal_shell,
|
&mut internal_shell,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.fold(event::Status::Ignored, event::Status::merge)
|
.fold(event::Status::Ignored, event::Status::merge)
|
||||||
|
|
@ -848,6 +860,7 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
&mut internal_shell,
|
&mut internal_shell,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.fold(event::Status::Ignored, event::Status::merge)
|
.fold(event::Status::Ignored, event::Status::merge)
|
||||||
|
|
@ -870,6 +883,7 @@ where
|
||||||
renderer,
|
renderer,
|
||||||
clipboard,
|
clipboard,
|
||||||
&mut internal_shell,
|
&mut internal_shell,
|
||||||
|
viewport,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.fold(event::Status::Ignored, event::Status::merge)
|
.fold(event::Status::Ignored, event::Status::merge)
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ use crate::{
|
||||||
utils::iced::{IcedElement, Program},
|
utils::iced::{IcedElement, Program},
|
||||||
};
|
};
|
||||||
|
|
||||||
use apply::Apply;
|
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::widget::{container, row},
|
iced::widget::{container, row},
|
||||||
iced_core::{Background, Color, Length},
|
iced_core::{Background, Color, Length},
|
||||||
theme,
|
theme,
|
||||||
widget::{icon, text},
|
widget::{icon::from_name, text},
|
||||||
|
Apply,
|
||||||
};
|
};
|
||||||
use smithay::utils::{Logical, Size};
|
use smithay::utils::{Logical, Size};
|
||||||
|
|
||||||
|
|
@ -29,8 +29,10 @@ impl Program for StackHoverInternal {
|
||||||
|
|
||||||
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
||||||
row(vec![
|
row(vec![
|
||||||
icon("window-stack-symbolic", 24)
|
from_name("window-stack-symbolic")
|
||||||
.force_svg(true)
|
.size(24)
|
||||||
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding([0, 8, 0, 0])
|
.padding([0, 8, 0, 0])
|
||||||
.width(Length::Shrink)
|
.width(Length::Shrink)
|
||||||
|
|
@ -54,6 +56,7 @@ impl Program for StackHoverInternal {
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.padding([8, 16])
|
.padding([8, 16])
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(theme::Container::custom(|theme| container::Appearance {
|
||||||
|
icon_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
||||||
border_radius: 24.0.into(),
|
border_radius: 24.0.into(),
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ use crate::{
|
||||||
utils::iced::{IcedElement, Program},
|
utils::iced::{IcedElement, Program},
|
||||||
};
|
};
|
||||||
|
|
||||||
use apply::Apply;
|
|
||||||
use calloop::LoopHandle;
|
use calloop::LoopHandle;
|
||||||
use cosmic::{
|
use cosmic::{
|
||||||
iced::widget::{container, horizontal_space, row},
|
iced::widget::{container, horizontal_space, row},
|
||||||
iced_core::{Alignment, Background, Color, Length},
|
iced_core::{Alignment, Background, Color, Length},
|
||||||
theme,
|
theme,
|
||||||
widget::{icon, text},
|
widget::{icon::from_name, text},
|
||||||
|
Apply,
|
||||||
};
|
};
|
||||||
use smithay::utils::Size;
|
use smithay::utils::Size;
|
||||||
|
|
||||||
|
|
@ -26,7 +26,11 @@ impl Program for SwapIndicatorInternal {
|
||||||
|
|
||||||
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
fn view(&self) -> crate::utils::iced::Element<'_, Self::Message> {
|
||||||
row(vec![
|
row(vec![
|
||||||
icon("window-swap-symbolic", 32).force_svg(true).into(),
|
from_name("window-swap-symbolic")
|
||||||
|
.size(32)
|
||||||
|
.prefer_svg(true)
|
||||||
|
.icon()
|
||||||
|
.into(),
|
||||||
horizontal_space(16).into(),
|
horizontal_space(16).into(),
|
||||||
text(fl!("swap-windows"))
|
text(fl!("swap-windows"))
|
||||||
.font(cosmic::font::FONT)
|
.font(cosmic::font::FONT)
|
||||||
|
|
@ -40,6 +44,7 @@ impl Program for SwapIndicatorInternal {
|
||||||
.padding(16)
|
.padding(16)
|
||||||
.apply(container)
|
.apply(container)
|
||||||
.style(theme::Container::custom(|theme| container::Appearance {
|
.style(theme::Container::custom(|theme| container::Appearance {
|
||||||
|
icon_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
text_color: Some(Color::from(theme.cosmic().accent.on)),
|
||||||
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
background: Some(Background::Color(theme.cosmic().accent_color().into())),
|
||||||
border_radius: 18.0.into(),
|
border_radius: 18.0.into(),
|
||||||
|
|
|
||||||
|
|
@ -15,19 +15,19 @@ use cosmic::{
|
||||||
Command, Point as IcedPoint, Rectangle as IcedRectangle, Size as IcedSize,
|
Command, Point as IcedPoint, Rectangle as IcedRectangle, Size as IcedSize,
|
||||||
},
|
},
|
||||||
iced_core::{clipboard::Null as NullClipboard, renderer::Style, Color},
|
iced_core::{clipboard::Null as NullClipboard, renderer::Style, Color},
|
||||||
iced_renderer::Backend as BackendWrapper,
|
iced_renderer::{graphics::Renderer as IcedGraphicsRenderer, Renderer as IcedRenderer},
|
||||||
iced_runtime::{
|
iced_runtime::{
|
||||||
command::Action,
|
command::Action,
|
||||||
program::{Program as IcedProgram, State},
|
program::{Program as IcedProgram, State},
|
||||||
Debug,
|
Debug,
|
||||||
},
|
},
|
||||||
Renderer as IcedRenderer, Theme,
|
Theme,
|
||||||
};
|
};
|
||||||
use iced_tiny_skia::{
|
use iced_tiny_skia::{
|
||||||
graphics::{damage, Primitive, Viewport},
|
graphics::{damage, Viewport},
|
||||||
Backend,
|
Backend, Primitive,
|
||||||
};
|
};
|
||||||
pub type Element<'a, Message> = cosmic::iced::Element<'a, Message, IcedRenderer>;
|
pub type Element<'a, Message> = cosmic::iced::Element<'a, Message, IcedRenderer<Theme>>;
|
||||||
|
|
||||||
use ordered_float::OrderedFloat;
|
use ordered_float::OrderedFloat;
|
||||||
use smithay::{
|
use smithay::{
|
||||||
|
|
@ -122,7 +122,7 @@ pub trait Program {
|
||||||
struct ProgramWrapper<P: Program>(P, LoopHandle<'static, crate::state::State>);
|
struct ProgramWrapper<P: Program>(P, LoopHandle<'static, crate::state::State>);
|
||||||
impl<P: Program> IcedProgram for ProgramWrapper<P> {
|
impl<P: Program> IcedProgram for ProgramWrapper<P> {
|
||||||
type Message = <P as Program>::Message;
|
type Message = <P as Program>::Message;
|
||||||
type Renderer = IcedRenderer;
|
type Renderer = IcedRenderer<Theme>;
|
||||||
|
|
||||||
fn update(&mut self, message: Self::Message) -> Command<Self::Message> {
|
fn update(&mut self, message: Self::Message) -> Command<Self::Message> {
|
||||||
self.0.update(message, &self.1)
|
self.0.update(message, &self.1)
|
||||||
|
|
@ -145,7 +145,7 @@ struct IcedElementInternal<P: Program + Send + 'static> {
|
||||||
|
|
||||||
// iced
|
// iced
|
||||||
theme: Theme,
|
theme: Theme,
|
||||||
renderer: IcedRenderer,
|
renderer: IcedRenderer<Theme>,
|
||||||
state: State<ProgramWrapper<P>>,
|
state: State<ProgramWrapper<P>>,
|
||||||
debug: Debug,
|
debug: Debug,
|
||||||
|
|
||||||
|
|
@ -171,7 +171,7 @@ impl<P: Program + Send + Clone + 'static> Clone for IcedElementInternal<P> {
|
||||||
tracing::warn!("Missing force_update call");
|
tracing::warn!("Missing force_update call");
|
||||||
}
|
}
|
||||||
let mut renderer =
|
let mut renderer =
|
||||||
IcedRenderer::new(BackendWrapper::TinySkia(Backend::new(Default::default())));
|
IcedRenderer::TinySkia(IcedGraphicsRenderer::new(Backend::new(Default::default())));
|
||||||
let mut debug = Debug::new();
|
let mut debug = Debug::new();
|
||||||
let state = State::new(
|
let state = State::new(
|
||||||
Id(0),
|
Id(0),
|
||||||
|
|
@ -232,7 +232,7 @@ impl<P: Program + Send + 'static> IcedElement<P> {
|
||||||
) -> IcedElement<P> {
|
) -> IcedElement<P> {
|
||||||
let size = size.into();
|
let size = size.into();
|
||||||
let mut renderer =
|
let mut renderer =
|
||||||
IcedRenderer::new(BackendWrapper::TinySkia(Backend::new(Default::default())));
|
IcedRenderer::TinySkia(IcedGraphicsRenderer::new(Backend::new(Default::default())));
|
||||||
let mut debug = Debug::new();
|
let mut debug = Debug::new();
|
||||||
|
|
||||||
let state = State::new(
|
let state = State::new(
|
||||||
|
|
@ -353,6 +353,8 @@ impl<P: Program + Send + 'static> IcedElementInternal<P> {
|
||||||
&mut self.renderer,
|
&mut self.renderer,
|
||||||
&self.theme,
|
&self.theme,
|
||||||
&Style {
|
&Style {
|
||||||
|
scale_factor: 1.0, //TODO: why is this
|
||||||
|
icon_color: self.theme.cosmic().on_bg_color().into(),
|
||||||
text_color: self.theme.cosmic().on_bg_color().into(),
|
text_color: self.theme.cosmic().on_bg_color().into(),
|
||||||
},
|
},
|
||||||
&mut NullClipboard,
|
&mut NullClipboard,
|
||||||
|
|
@ -738,7 +740,7 @@ where
|
||||||
.to_i32_round();
|
.to_i32_round();
|
||||||
|
|
||||||
if size.w > 0 && size.h > 0 {
|
if size.w > 0 && size.h > 0 {
|
||||||
let renderer = &mut internal_ref.renderer;
|
let IcedRenderer::TinySkia(renderer) = &mut internal_ref.renderer;
|
||||||
let state_ref = &internal_ref.state;
|
let state_ref = &internal_ref.state;
|
||||||
let mut clip_mask = tiny_skia::Mask::new(size.w as u32, size.h as u32).unwrap();
|
let mut clip_mask = tiny_skia::Mask::new(size.w as u32, size.h as u32).unwrap();
|
||||||
let overlay = internal_ref.debug.overlay();
|
let overlay = internal_ref.debug.overlay();
|
||||||
|
|
@ -751,7 +753,6 @@ where
|
||||||
.expect("Failed to create pixel map");
|
.expect("Failed to create pixel map");
|
||||||
|
|
||||||
renderer.with_primitives(|backend, primitives| {
|
renderer.with_primitives(|backend, primitives| {
|
||||||
let BackendWrapper::TinySkia(ref mut backend) = backend;
|
|
||||||
let background_color = state_ref.program().0.background_color();
|
let background_color = state_ref.program().0.background_color();
|
||||||
let bounds = IcedSize::new(size.w as u32, size.h as u32);
|
let bounds = IcedSize::new(size.w as u32, size.h as u32);
|
||||||
let viewport = Viewport::with_physical_size(bounds, scale.x);
|
let viewport = Viewport::with_physical_size(bounds, scale.x);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue