wip: overflow

This commit is contained in:
Ashley Wulber 2024-04-30 17:47:15 -04:00 committed by Ashley Wulber
parent 62eeb5a704
commit 0571c97b86
6 changed files with 184 additions and 99 deletions

210
Cargo.lock generated
View file

@ -22,14 +22,12 @@ source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_consumer", "accesskit_consumer",
"async-channel",
"async-executor",
"async-task",
"atspi", "atspi",
"futures-lite 1.13.0", "futures-lite 1.13.0",
"futures-util",
"once_cell", "once_cell",
"serde", "serde",
"tokio",
"tokio-stream",
"zbus 3.15.2", "zbus 3.15.2",
] ]
@ -162,7 +160,7 @@ 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 = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093"
dependencies = [ dependencies = [
"async-fs 2.1.2", "async-fs",
"async-net", "async-net",
"enumflags2", "enumflags2",
"futures-channel", "futures-channel",
@ -225,18 +223,6 @@ dependencies = [
"slab", "slab",
] ]
[[package]]
name = "async-fs"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06"
dependencies = [
"async-lock 2.8.0",
"autocfg",
"blocking",
"futures-lite 1.13.0",
]
[[package]] [[package]]
name = "async-fs" name = "async-fs"
version = "2.1.2" version = "2.1.2"
@ -722,13 +708,33 @@ dependencies = [
"objc_id", "objc_id",
] ]
[[package]]
name = "clipboard_macos"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"objc",
"objc-foundation",
"objc_id",
]
[[package]] [[package]]
name = "clipboard_wayland" name = "clipboard_wayland"
version = "0.2.2" version = "0.2.2"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf" source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [ dependencies = [
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"mime 0.1.0", "mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"smithay-clipboard",
]
[[package]]
name = "clipboard_wayland"
version = "0.2.2"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"smithay-clipboard", "smithay-clipboard",
] ]
@ -741,6 +747,15 @@ dependencies = [
"x11rb", "x11rb",
] ]
[[package]]
name = "clipboard_x11"
version = "0.4.2"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"thiserror",
"x11rb",
]
[[package]] [[package]]
name = "cocoa" name = "cocoa"
version = "0.25.0" version = "0.25.0"
@ -1083,6 +1098,7 @@ dependencies = [
"once_cell", "once_cell",
"rust-embed 8.4.0", "rust-embed 8.4.0",
"rustix 0.38.34", "rustix 0.38.34",
"tokio",
"tracing", "tracing",
"tracing-log", "tracing-log",
"tracing-subscriber", "tracing-subscriber",
@ -1207,14 +1223,13 @@ 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#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"atomicwrites", "atomicwrites",
"cosmic-config-derive", "cosmic-config-derive",
"cosmic-settings-daemon", "cosmic-settings-daemon",
"dirs 5.0.1", "dirs 5.0.1",
"futures-util", "futures-util",
"iced_futures", "iced_futures 0.12.0",
"known-folders", "known-folders",
"notify", "notify",
"once_cell", "once_cell",
@ -1229,7 +1244,6 @@ 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#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"quote", "quote",
"syn 1.0.109", "syn 1.0.109",
@ -1327,7 +1341,7 @@ version = "0.1.0"
source = "git+https://github.com/pop-os/cosmic-settings-subscriptions#c19240ad2c9f11ef5cec8ed8c70255c3dc9ae8d4" source = "git+https://github.com/pop-os/cosmic-settings-subscriptions#c19240ad2c9f11ef5cec8ed8c70255c3dc9ae8d4"
dependencies = [ dependencies = [
"futures", "futures",
"iced_futures", "iced_futures 0.12.0 (git+https://github.com/pop-os/libcosmic)",
"libpulse-binding", "libpulse-binding",
"log", "log",
"rustix 0.38.34", "rustix 0.38.34",
@ -1362,7 +1376,6 @@ 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#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"almost", "almost",
"cosmic-config", "cosmic-config",
@ -1511,7 +1524,7 @@ version = "0.19.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"libloading 0.7.4", "libloading 0.8.3",
"winapi", "winapi",
] ]
@ -1792,7 +1805,19 @@ version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf" source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"mime 0.1.0", "mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"raw-window-handle",
"smithay-client-toolkit 0.19.1",
"smithay-clipboard",
]
[[package]]
name = "dnd"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"bitflags 2.5.0",
"mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"raw-window-handle", "raw-window-handle",
"smithay-client-toolkit 0.19.1", "smithay-client-toolkit 0.19.1",
"smithay-clipboard", "smithay-clipboard",
@ -2783,25 +2808,23 @@ dependencies = [
[[package]] [[package]]
name = "iced" name = "iced"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"iced_accessibility", "iced_accessibility",
"iced_core", "iced_core 0.12.0",
"iced_futures", "iced_futures 0.12.0",
"iced_renderer", "iced_renderer",
"iced_sctk", "iced_sctk",
"iced_widget", "iced_widget",
"image 0.24.9", "image 0.24.9",
"mime 0.1.0", "mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"thiserror", "thiserror",
"window_clipboard", "window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
] ]
[[package]] [[package]]
name = "iced_accessibility" name = "iced_accessibility"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_unix", "accesskit_unix",
@ -2810,13 +2833,12 @@ dependencies = [
[[package]] [[package]]
name = "iced_core" name = "iced_core"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"iced_accessibility", "iced_accessibility",
"log", "log",
"mime 0.1.0", "mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"num-traits", "num-traits",
"palette", "palette",
"raw-window-handle", "raw-window-handle",
@ -2825,19 +2847,48 @@ dependencies = [
"smol_str", "smol_str",
"thiserror", "thiserror",
"web-time", "web-time",
"window_clipboard", "window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"xxhash-rust", "xxhash-rust",
] ]
[[package]]
name = "iced_core"
version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [
"bitflags 2.5.0",
"dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"log",
"mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"num-traits",
"raw-window-handle",
"smol_str",
"thiserror",
"web-time",
"window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"xxhash-rust",
]
[[package]]
name = "iced_futures"
version = "0.12.0"
dependencies = [
"futures",
"iced_core 0.12.0",
"log",
"tokio",
"wasm-bindgen-futures",
"wasm-timer",
]
[[package]] [[package]]
name = "iced_futures" name = "iced_futures"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50" source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"futures", "futures",
"iced_core", "iced_core 0.12.0 (git+https://github.com/pop-os/libcosmic)",
"log", "log",
"tokio",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wasm-timer", "wasm-timer",
] ]
@ -2845,15 +2896,14 @@ dependencies = [
[[package]] [[package]]
name = "iced_graphics" name = "iced_graphics"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"bytemuck", "bytemuck",
"cosmic-text", "cosmic-text",
"glam", "glam",
"half", "half",
"iced_core", "iced_core 0.12.0",
"iced_futures", "iced_futures 0.12.0",
"image 0.24.9", "image 0.24.9",
"kamadak-exif", "kamadak-exif",
"log", "log",
@ -2869,7 +2919,6 @@ dependencies = [
[[package]] [[package]]
name = "iced_renderer" name = "iced_renderer"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"iced_graphics", "iced_graphics",
"iced_tiny_skia", "iced_tiny_skia",
@ -2881,26 +2930,24 @@ dependencies = [
[[package]] [[package]]
name = "iced_runtime" name = "iced_runtime"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"iced_accessibility", "iced_accessibility",
"iced_core", "iced_core 0.12.0",
"iced_futures", "iced_futures 0.12.0",
"smithay-client-toolkit 0.19.1", "smithay-client-toolkit 0.19.1",
"thiserror", "thiserror",
"window_clipboard", "window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
] ]
[[package]] [[package]]
name = "iced_sctk" name = "iced_sctk"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"enum-repr", "enum-repr",
"float-cmp", "float-cmp",
"futures", "futures",
"iced_futures", "iced_futures 0.12.0",
"iced_graphics", "iced_graphics",
"iced_runtime", "iced_runtime",
"iced_style", "iced_style",
@ -2912,7 +2959,7 @@ dependencies = [
"tracing", "tracing",
"wayland-backend", "wayland-backend",
"wayland-protocols 0.32.1", "wayland-protocols 0.32.1",
"window_clipboard", "window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"xkbcommon", "xkbcommon",
"xkbcommon-dl", "xkbcommon-dl",
"xkeysym", "xkeysym",
@ -2921,9 +2968,8 @@ dependencies = [
[[package]] [[package]]
name = "iced_style" name = "iced_style"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"iced_core", "iced_core 0.12.0",
"once_cell", "once_cell",
"palette", "palette",
] ]
@ -2931,7 +2977,6 @@ dependencies = [
[[package]] [[package]]
name = "iced_tiny_skia" name = "iced_tiny_skia"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cosmic-text", "cosmic-text",
@ -2948,7 +2993,6 @@ dependencies = [
[[package]] [[package]]
name = "iced_wgpu" name = "iced_wgpu"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"bytemuck", "bytemuck",
@ -2974,9 +3018,8 @@ dependencies = [
[[package]] [[package]]
name = "iced_widget" name = "iced_widget"
version = "0.12.0" version = "0.12.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"iced_renderer", "iced_renderer",
"iced_runtime", "iced_runtime",
"iced_style", "iced_style",
@ -2985,7 +3028,7 @@ dependencies = [
"smithay-client-toolkit 0.19.1", "smithay-client-toolkit 0.19.1",
"thiserror", "thiserror",
"unicode-segmentation", "unicode-segmentation",
"window_clipboard", "window_clipboard 0.4.1 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
] ]
[[package]] [[package]]
@ -3655,7 +3698,6 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]] [[package]]
name = "libcosmic" name = "libcosmic"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pop-os/libcosmic#f820eb7ffe8ad6e5931f481469eeb79d1a68ab50"
dependencies = [ dependencies = [
"apply", "apply",
"ashpd", "ashpd",
@ -3671,8 +3713,8 @@ dependencies = [
"freedesktop-desktop-entry 0.5.2", "freedesktop-desktop-entry 0.5.2",
"freedesktop-icons", "freedesktop-icons",
"iced", "iced",
"iced_core", "iced_core 0.12.0",
"iced_futures", "iced_futures 0.12.0",
"iced_renderer", "iced_renderer",
"iced_runtime", "iced_runtime",
"iced_sctk", "iced_sctk",
@ -3993,6 +4035,14 @@ dependencies = [
"smithay-clipboard", "smithay-clipboard",
] ]
[[package]]
name = "mime"
version = "0.1.0"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"smithay-clipboard",
]
[[package]] [[package]]
name = "mime" name = "mime"
version = "0.3.17" version = "0.3.17"
@ -5309,7 +5359,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
[[package]] [[package]]
name = "smithay-client-toolkit" name = "smithay-client-toolkit"
version = "0.18.0" version = "0.18.0"
source = "git+https://github.com/smithay/client-toolkit?rev=3bed072#3bed072b966022f5f929d12f3aff089b1ace980b" source = "git+https://github.com/smithay/client-toolkit//?rev=3bed072#3bed072b966022f5f929d12f3aff089b1ace980b"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"bytemuck", "bytemuck",
@ -6537,7 +6587,7 @@ dependencies = [
"js-sys", "js-sys",
"khronos-egl", "khronos-egl",
"libc", "libc",
"libloading 0.7.4", "libloading 0.8.3",
"log", "log",
"metal", "metal",
"naga", "naga",
@ -6610,11 +6660,26 @@ version = "0.4.1"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf" source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7#a5be70405574e98c292537fd3b01a1352550b9bf"
dependencies = [ dependencies = [
"clipboard-win", "clipboard-win",
"clipboard_macos", "clipboard_macos 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"clipboard_wayland", "clipboard_wayland 0.2.2 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"clipboard_x11", "clipboard_x11 0.4.2 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"dnd", "dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"mime 0.1.0", "mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-7)",
"raw-window-handle",
"thiserror",
]
[[package]]
name = "window_clipboard"
version = "0.4.1"
source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9"
dependencies = [
"clipboard-win",
"clipboard_macos 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"clipboard_wayland 0.2.2 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"clipboard_x11 0.4.2 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"dnd 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"mime 0.1.0 (git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8)",
"raw-window-handle", "raw-window-handle",
"thiserror", "thiserror",
] ]
@ -6960,15 +7025,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6"
dependencies = [ dependencies = [
"async-broadcast 0.5.1", "async-broadcast 0.5.1",
"async-executor",
"async-fs 1.6.0",
"async-io 1.13.0",
"async-lock 2.8.0",
"async-process 1.8.1", "async-process 1.8.1",
"async-recursion", "async-recursion",
"async-task",
"async-trait", "async-trait",
"blocking",
"byteorder", "byteorder",
"derivative", "derivative",
"enumflags2", "enumflags2",
@ -6985,6 +7044,7 @@ dependencies = [
"serde_repr", "serde_repr",
"sha1", "sha1",
"static_assertions", "static_assertions",
"tokio",
"tracing", "tracing",
"uds_windows", "uds_windows",
"winapi", "winapi",
@ -7002,7 +7062,7 @@ checksum = "989c3977a7aafa97b12b9a35d21cdcff9b0d2289762b14683f45d66b1ba6c48f"
dependencies = [ dependencies = [
"async-broadcast 0.7.1", "async-broadcast 0.7.1",
"async-executor", "async-executor",
"async-fs 2.1.2", "async-fs",
"async-io 2.3.3", "async-io 2.3.3",
"async-lock 3.4.0", "async-lock 3.4.0",
"async-process 2.2.3", "async-process 2.2.3",

View file

@ -58,14 +58,21 @@ serde = { version = "1.0.152", features = ["derive"] }
freedesktop-desktop-entry = "0.6.1" freedesktop-desktop-entry = "0.6.1"
[profile.release] [profile.release]
<<<<<<< Updated upstream # lto = "fat"
lto = "fat"
=======
opt-level = 1 opt-level = 1
>>>>>>> Stashed changes
[workspace.metadata.cargo-machete] [workspace.metadata.cargo-machete]
ignored = ["libcosmic"] ignored = ["libcosmic"]
# [patch."https://github.com/pop-os/libcosmic"] # [patch."https://github.com/pop-os/libcosmic"]
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" } # cosmic-config = { git = "https://github.com/pop-os/libcosmic//" }
# libcosmic = { git = "https://github.com/pop-os/libcosmic//" } # libcosmic = { git = "https://github.com/pop-os/libcosmic//" }
[patch."https://github.com/Smithay/client-toolkit"]
sctk = { git = "https://github.com/smithay/client-toolkit//", package = "smithay-client-toolkit", rev = "3bed072" }
[patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-export-gtk" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-export-gtk" }
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-export-gtk" }
libcosmic = { path = "../libcosmic" }
cosmic-config = { path = "../libcosmic/cosmic-config" }
cosmic-theme = { path = "../libcosmic/cosmic-theme" }

View file

@ -12,5 +12,6 @@ NoDisplay=true
X-CosmicApplet=true X-CosmicApplet=true
X-MinimizeApplet=5 X-MinimizeApplet=5
# Indicate that the applet should be shrunk if the panel is too small to fit it # Indicate that the applet should be shrunk if the panel is too small to fit it
X-ShrinkApplet=100 X-OverflowPriority=100
X-OverflowMinSize=4
X-HostWaylandDisplay=true X-HostWaylandDisplay=true

View file

@ -1274,7 +1274,7 @@ impl cosmic::Application for CosmicAppList {
); );
} }
let active: Vec<_> = self let mut active: Vec<_> = self
.active_list .active_list
.iter() .iter()
.map(|dock_item| { .map(|dock_item| {
@ -1292,7 +1292,28 @@ impl cosmic::Application for CosmicAppList {
) )
}) })
.collect(); .collect();
let window_size = self.core.applet.configure.as_ref();
let max_num = if self.core.applet.is_horizontal() {
let suggested_width = self.core.applet.suggested_size(false).0
+ self.core.applet.suggested_padding(false) * 2;
window_size
.and_then(|w| w.new_size.0)
.map(|b| b.get() / suggested_width as u32)
.unwrap_or(u32::MAX) as usize
} else {
let suggested_height = self.core.applet.suggested_size(false).1
+ self.core.applet.suggested_padding(false) * 2;
window_size
.and_then(|w| w.new_size.1)
.map(|b| b.get() / suggested_height as u32)
.unwrap_or(u32::MAX) as usize
}
.max(4);
if max_num < favorites.len() + active.len() {
let active_leftover = max_num.saturating_sub(favorites.len());
favorites.truncate(max_num - active_leftover);
active.truncate(active_leftover);
}
let (w, h, favorites, active, divider) = if is_horizontal { let (w, h, favorites, active, divider) = if is_horizontal {
( (
Length::Shrink, Length::Shrink,

View file

@ -115,7 +115,6 @@ impl cosmic::Application for Power {
} }
fn init(core: cosmic::app::Core, _flags: ()) -> (Self, Command<Message>) { fn init(core: cosmic::app::Core, _flags: ()) -> (Self, Command<Message>) {
panic!("init");
( (
Self { Self {
core, core,

View file

@ -143,26 +143,23 @@ impl cosmic::Application for IcedWorkspacesApplet {
self.core.applet.anchor, self.core.applet.anchor,
PanelAnchor::Top | PanelAnchor::Bottom PanelAnchor::Top | PanelAnchor::Bottom
); );
let suggested_total =
self.core.applet.suggested_size(true).0 + self.core.applet.suggested_padding(true) * 2;
let suggested_window_size = self.core.applet.suggested_window_size();
let buttons = self.workspaces.iter().filter_map(|w| { let buttons = self.workspaces.iter().filter_map(|w| {
let content = self.core.applet.text(w.0.clone()).font(FONT_BOLD); let content = self.core.applet.text(w.0.clone()).font(FONT_BOLD);
let content = row!( let (width, height) = if self.core.applet.is_horizontal() {
content, (suggested_total as f32, suggested_window_size.1.get() as f32)
vertical_space(Length::Fixed( } else {
(self.core.applet.suggested_size(true).1 (suggested_window_size.0.get() as f32, suggested_total as f32)
+ 2 * self.core.applet.suggested_padding(true)) as f32 };
))
)
.align_items(cosmic::iced::Alignment::Center);
let content = column!( let content = row!(content, vertical_space(Length::Fixed(height)))
content, .align_items(cosmic::iced::Alignment::Center);
horizontal_space(Length::Fixed(
(self.core.applet.suggested_size(true).0 let content = column!(content, horizontal_space(Length::Fixed(width)))
+ 2 * self.core.applet.suggested_padding(true)) as f32 .align_items(cosmic::iced::Alignment::Center);
))
)
.align_items(cosmic::iced::Alignment::Center);
let btn = button( let btn = button(
container(content) container(content)