1
0
Fork 0

Update the param slider for upstream vizia changes

This commit is contained in:
Robbert van der Helm 2023-11-14 22:40:39 +01:00
parent 3a0f3140b8
commit 27763d2632
4 changed files with 192 additions and 161 deletions

269
Cargo.lock generated
View file

@ -53,9 +53,9 @@ checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_consumer", "accesskit_consumer",
"async-channel", "async-channel 1.9.0",
"atspi", "atspi",
"futures-lite", "futures-lite 1.13.0",
"serde", "serde",
"zbus", "zbus",
] ]
@ -310,17 +310,30 @@ dependencies = [
"futures-core", "futures-core",
] ]
[[package]]
name = "async-channel"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e"
dependencies = [
"concurrent-queue",
"event-listener 3.1.0",
"event-listener-strategy",
"futures-core",
"pin-project-lite",
]
[[package]] [[package]]
name = "async-executor" name = "async-executor"
version = "1.6.0" version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0"
dependencies = [ dependencies = [
"async-lock", "async-lock 2.8.0",
"async-task", "async-task",
"concurrent-queue", "concurrent-queue",
"fastrand 2.0.1", "fastrand 2.0.1",
"futures-lite", "futures-lite 1.13.0",
"slab", "slab",
] ]
@ -330,10 +343,10 @@ version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06"
dependencies = [ dependencies = [
"async-lock", "async-lock 2.8.0",
"autocfg", "autocfg",
"blocking", "blocking",
"futures-lite", "futures-lite 1.13.0",
] ]
[[package]] [[package]]
@ -342,12 +355,12 @@ 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 = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776"
dependencies = [ dependencies = [
"async-channel", "async-channel 1.9.0",
"async-executor", "async-executor",
"async-io 1.13.0", "async-io 1.13.0",
"async-lock", "async-lock 2.8.0",
"blocking", "blocking",
"futures-lite", "futures-lite 1.13.0",
"once_cell", "once_cell",
] ]
@ -357,11 +370,11 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af"
dependencies = [ dependencies = [
"async-lock", "async-lock 2.8.0",
"autocfg", "autocfg",
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
"futures-lite", "futures-lite 1.13.0",
"log", "log",
"parking", "parking",
"polling 2.8.0", "polling 2.8.0",
@ -373,18 +386,18 @@ dependencies = [
[[package]] [[package]]
name = "async-io" name = "async-io"
version = "2.1.0" version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10da8f3146014722c89e7859e1d7bb97873125d7346d10ca642ffab794355828" checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997"
dependencies = [ dependencies = [
"async-lock", "async-lock 3.1.0",
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
"futures-io", "futures-io",
"futures-lite", "futures-lite 2.0.1",
"parking", "parking",
"polling 3.3.0", "polling 3.3.0",
"rustix 0.38.21", "rustix 0.38.23",
"slab", "slab",
"tracing", "tracing",
"waker-fn", "waker-fn",
@ -400,6 +413,17 @@ dependencies = [
"event-listener 2.5.3", "event-listener 2.5.3",
] ]
[[package]]
name = "async-lock"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7"
dependencies = [
"event-listener 3.1.0",
"event-listener-strategy",
"pin-project-lite",
]
[[package]] [[package]]
name = "async-net" name = "async-net"
version = "1.8.0" version = "1.8.0"
@ -408,7 +432,7 @@ checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f"
dependencies = [ dependencies = [
"async-io 1.13.0", "async-io 1.13.0",
"blocking", "blocking",
"futures-lite", "futures-lite 1.13.0",
] ]
[[package]] [[package]]
@ -418,13 +442,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88"
dependencies = [ dependencies = [
"async-io 1.13.0", "async-io 1.13.0",
"async-lock", "async-lock 2.8.0",
"async-signal", "async-signal",
"blocking", "blocking",
"cfg-if", "cfg-if",
"event-listener 3.0.1", "event-listener 3.1.0",
"futures-lite", "futures-lite 1.13.0",
"rustix 0.38.21", "rustix 0.38.23",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -436,7 +460,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -445,13 +469,13 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
dependencies = [ dependencies = [
"async-io 2.1.0", "async-io 2.2.0",
"async-lock", "async-lock 2.8.0",
"atomic-waker", "atomic-waker",
"cfg-if", "cfg-if",
"futures-core", "futures-core",
"futures-io", "futures-io",
"rustix 0.38.21", "rustix 0.38.23",
"signal-hook-registry", "signal-hook-registry",
"slab", "slab",
"windows-sys 0.48.0", "windows-sys 0.48.0",
@ -463,16 +487,16 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d"
dependencies = [ dependencies = [
"async-channel", "async-channel 1.9.0",
"async-global-executor", "async-global-executor",
"async-io 1.13.0", "async-io 1.13.0",
"async-lock", "async-lock 2.8.0",
"async-process", "async-process",
"crossbeam-utils", "crossbeam-utils",
"futures-channel", "futures-channel",
"futures-core", "futures-core",
"futures-io", "futures-io",
"futures-lite", "futures-lite 1.13.0",
"gloo-timers", "gloo-timers",
"kv-log-macro", "kv-log-macro",
"log", "log",
@ -498,7 +522,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -529,7 +553,7 @@ dependencies = [
"async-trait", "async-trait",
"atspi-macros", "atspi-macros",
"enumflags2", "enumflags2",
"futures-lite", "futures-lite 1.13.0",
"serde", "serde",
"tracing", "tracing",
"zbus", "zbus",
@ -631,7 +655,7 @@ dependencies = [
"regex", "regex",
"rustc-hash", "rustc-hash",
"shlex", "shlex",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -682,16 +706,16 @@ dependencies = [
[[package]] [[package]]
name = "blocking" name = "blocking"
version = "1.4.1" version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
dependencies = [ dependencies = [
"async-channel", "async-channel 2.1.0",
"async-lock", "async-lock 3.1.0",
"async-task", "async-task",
"fastrand 2.0.1", "fastrand 2.0.1",
"futures-io", "futures-io",
"futures-lite", "futures-lite 2.0.1",
"piper", "piper",
"tracing", "tracing",
] ]
@ -726,7 +750,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -833,9 +857,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.4.7" version = "4.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@ -848,9 +872,9 @@ source = "git+https://github.com/robbert-vdh/clap-sys.git?branch=feature/cstr-ma
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.4.7" version = "4.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@ -868,7 +892,7 @@ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -1272,7 +1296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -1378,7 +1402,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -1504,7 +1528,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -1531,9 +1555,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]] [[package]]
name = "errno" name = "errno"
version = "0.3.5" version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.48.0", "windows-sys 0.48.0",
@ -1556,15 +1580,25 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
[[package]] [[package]]
name = "event-listener" name = "event-listener"
version = "3.0.1" version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2"
dependencies = [ dependencies = [
"concurrent-queue", "concurrent-queue",
"parking", "parking",
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "event-listener-strategy"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160"
dependencies = [
"event-listener 3.1.0",
"pin-project-lite",
]
[[package]] [[package]]
name = "expat-sys" name = "expat-sys"
version = "2.1.6" version = "2.1.6"
@ -1656,7 +1690,7 @@ dependencies = [
"intl-memoizer", "intl-memoizer",
"intl_pluralrules", "intl_pluralrules",
"rustc-hash", "rustc-hash",
"self_cell", "self_cell 0.10.3",
"smallvec", "smallvec",
"unic-langid", "unic-langid",
] ]
@ -1823,6 +1857,16 @@ dependencies = [
"waker-fn", "waker-fn",
] ]
[[package]]
name = "futures-lite"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb"
dependencies = [
"futures-core",
"pin-project-lite",
]
[[package]] [[package]]
name = "futures-macro" name = "futures-macro"
version = "0.3.29" version = "0.3.29"
@ -1831,7 +1875,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -1950,9 +1994,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.10" version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
@ -2566,9 +2610,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
[[package]] [[package]]
name = "linux-raw-sys" name = "linux-raw-sys"
version = "0.4.10" version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@ -2786,9 +2830,9 @@ dependencies = [
[[package]] [[package]]
name = "morphorm" name = "morphorm"
version = "0.6.2" version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eabc4b1773f0ed7d75b76051ac5f0f1ced8c4d8c0664c4f682406fd3d0975712" checksum = "618fb979b26c8898ae0ed4677ca01385b0588bd4a27a8b2d3d9795f468e33366"
dependencies = [ dependencies = [
"smallvec", "smallvec",
] ]
@ -3094,7 +3138,7 @@ dependencies = [
"proc-macro-crate", "proc-macro-crate",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -3522,7 +3566,7 @@ dependencies = [
"cfg-if", "cfg-if",
"concurrent-queue", "concurrent-queue",
"pin-project-lite", "pin-project-lite",
"rustix 0.38.21", "rustix 0.38.23",
"tracing", "tracing",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -3683,7 +3727,7 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [ dependencies = [
"getrandom 0.2.10", "getrandom 0.2.11",
] ]
[[package]] [[package]]
@ -3796,7 +3840,7 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4"
dependencies = [ dependencies = [
"getrandom 0.2.10", "getrandom 0.2.11",
"libredox 0.0.1", "libredox 0.0.1",
"thiserror", "thiserror",
] ]
@ -3909,14 +3953,14 @@ dependencies = [
[[package]] [[package]]
name = "rustix" name = "rustix"
version = "0.38.21" version = "0.38.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" checksum = "ffb93593068e9babdad10e4fce47dc9b3ac25315a72a59766ffd9e9a71996a04"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"errno", "errno",
"libc", "libc",
"linux-raw-sys 0.4.10", "linux-raw-sys 0.4.11",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -3988,13 +4032,13 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
name = "selectors" name = "selectors"
version = "0.23.0" version = "0.23.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"cssparser", "cssparser",
@ -4009,9 +4053,18 @@ dependencies = [
[[package]] [[package]]
name = "self_cell" name = "self_cell"
version = "0.10.2" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d"
dependencies = [
"self_cell 1.0.2",
]
[[package]]
name = "self_cell"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e388332cd64eb80cd595a00941baf513caffae8dce9cfd0467fc9c66397dade6"
[[package]] [[package]]
name = "semver" name = "semver"
@ -4021,22 +4074,22 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.190" version = "1.0.192"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.190" version = "1.0.192"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -4058,7 +4111,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -4165,9 +4218,9 @@ dependencies = [
[[package]] [[package]]
name = "smallvec" name = "smallvec"
version = "1.11.1" version = "1.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970"
[[package]] [[package]]
name = "smithay-client-toolkit" name = "smithay-client-toolkit"
@ -4203,15 +4256,15 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1"
dependencies = [ dependencies = [
"async-channel", "async-channel 1.9.0",
"async-executor", "async-executor",
"async-fs", "async-fs",
"async-io 1.13.0", "async-io 1.13.0",
"async-lock", "async-lock 2.8.0",
"async-net", "async-net",
"async-process", "async-process",
"blocking", "blocking",
"futures-lite", "futures-lite 1.13.0",
] ]
[[package]] [[package]]
@ -4295,9 +4348,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.38" version = "2.0.39"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4329,15 +4382,15 @@ dependencies = [
"cfg-if", "cfg-if",
"fastrand 2.0.1", "fastrand 2.0.1",
"redox_syscall 0.4.1", "redox_syscall 0.4.1",
"rustix 0.38.21", "rustix 0.38.23",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
[[package]] [[package]]
name = "termcolor" name = "termcolor"
version = "1.3.0" version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449"
dependencies = [ dependencies = [
"winapi-util", "winapi-util",
] ]
@ -4348,7 +4401,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
dependencies = [ dependencies = [
"rustix 0.38.21", "rustix 0.38.23",
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -4369,7 +4422,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -4429,9 +4482,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]] [[package]]
name = "tokio" name = "tokio"
version = "1.33.0" version = "1.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
dependencies = [ dependencies = [
"backtrace", "backtrace",
"num_cpus", "num_cpus",
@ -4491,7 +4544,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]
@ -4679,7 +4732,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [ dependencies = [
"getrandom 0.2.10", "getrandom 0.2.11",
] ]
[[package]] [[package]]
@ -4697,7 +4750,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]] [[package]]
name = "vizia" name = "vizia"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"vizia_baseview", "vizia_baseview",
"vizia_core", "vizia_core",
@ -4707,7 +4760,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_baseview" name = "vizia_baseview"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"baseview 0.1.0 (git+https://github.com/RustAudio/baseview.git?rev=f0639b787bbda506434d3f6b5c91e94ca59904c6)", "baseview 0.1.0 (git+https://github.com/RustAudio/baseview.git?rev=f0639b787bbda506434d3f6b5c91e94ca59904c6)",
"femtovg", "femtovg",
@ -4721,7 +4774,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_core" name = "vizia_core"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"bitflags 2.4.1", "bitflags 2.4.1",
@ -4752,7 +4805,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_derive" name = "vizia_derive"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -4762,12 +4815,12 @@ dependencies = [
[[package]] [[package]]
name = "vizia_id" name = "vizia_id"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
[[package]] [[package]]
name = "vizia_input" name = "vizia_input"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"bitflags 1.3.2", "bitflags 1.3.2",
"keyboard-types", "keyboard-types",
@ -4777,7 +4830,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_storage" name = "vizia_storage"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"morphorm", "morphorm",
"vizia_id", "vizia_id",
@ -4786,7 +4839,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_style" name = "vizia_style"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"bitflags 2.4.1", "bitflags 2.4.1",
"cssparser", "cssparser",
@ -4799,7 +4852,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_window" name = "vizia_window"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"morphorm", "morphorm",
@ -4810,7 +4863,7 @@ dependencies = [
[[package]] [[package]]
name = "vizia_winit" name = "vizia_winit"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/vizia/vizia.git?rev=eec3b85c24be87eabd95eef00795ab89ff6100fa#eec3b85c24be87eabd95eef00795ab89ff6100fa" source = "git+https://github.com/vizia/vizia.git?rev=f3574758ad80bb70392812b075614cccc7489c7c#f3574758ad80bb70392812b075614cccc7489c7c"
dependencies = [ dependencies = [
"accesskit", "accesskit",
"accesskit_winit", "accesskit_winit",
@ -4916,7 +4969,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4950,7 +5003,7 @@ checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -5522,7 +5575,7 @@ dependencies = [
"async-executor", "async-executor",
"async-fs", "async-fs",
"async-io 1.13.0", "async-io 1.13.0",
"async-lock", "async-lock 2.8.0",
"async-process", "async-process",
"async-recursion", "async-recursion",
"async-task", "async-task",
@ -5586,22 +5639,22 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
[[package]] [[package]]
name = "zerocopy" name = "zerocopy"
version = "0.7.25" version = "0.7.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0"
dependencies = [ dependencies = [
"zerocopy-derive", "zerocopy-derive",
] ]
[[package]] [[package]]
name = "zerocopy-derive" name = "zerocopy-derive"
version = "0.7.25" version = "0.7.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.39",
] ]
[[package]] [[package]]

View file

@ -12,7 +12,7 @@ nih_plug = { path = ".." }
nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" } nih_plug_assets = { git = "https://github.com/robbert-vdh/nih_plug_assets.git" }
baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "f0639b787bbda506434d3f6b5c91e94ca59904c6" } baseview = { git = "https://github.com/RustAudio/baseview.git", rev = "f0639b787bbda506434d3f6b5c91e94ca59904c6" }
vizia = { git = "https://github.com/vizia/vizia.git", rev = "eec3b85c24be87eabd95eef00795ab89ff6100fa", default_features = false, features = ["baseview", "clipboard", "x11"] } vizia = { git = "https://github.com/vizia/vizia.git", rev = "f3574758ad80bb70392812b075614cccc7489c7c", default_features = false, features = ["baseview", "clipboard", "x11"] }
crossbeam = "0.8" crossbeam = "0.8"
# To make the state persistable # To make the state persistable

View file

@ -92,6 +92,7 @@ param-slider .value-entry {
/* Vizia doesn't support the unset value */ /* Vizia doesn't support the unset value */
background-color: transparent; background-color: transparent;
border-width: 0px; border-width: 0px;
child-space: 1s;
} }
param-slider .value-entry .caret { param-slider .value-entry .caret {
background-color: #0a0a0a; background-color: #0a0a0a;

View file

@ -100,7 +100,7 @@ impl ParamSlider {
// default value lies somewhere in the middle and the parameter is continuous. Otherwise // default value lies somewhere in the middle and the parameter is continuous. Otherwise
// this approach looks a bit jarring. // this approach looks a bit jarring.
Self { Self {
param_base: ParamWidgetBase::new(cx, params.clone(), params_to_param), param_base: ParamWidgetBase::new(cx, params, params_to_param),
text_input_active: false, text_input_active: false,
drag_active: false, drag_active: false,
@ -117,9 +117,6 @@ impl ParamSlider {
Binding::new(cx, ParamSlider::style, move |cx, style| { Binding::new(cx, ParamSlider::style, move |cx, style| {
let style = style.get(cx); let style = style.get(cx);
// Needs to be moved into the below closures, and it can't be `Copy`
let param_data = param_data.clone();
// Can't use `.to_string()` here as that would include the modulation. // Can't use `.to_string()` here as that would include the modulation.
let unmodulated_normalized_value_lens = let unmodulated_normalized_value_lens =
param_data.make_lens(|param| param.unmodulated_normalized_value()); param_data.make_lens(|param| param.unmodulated_normalized_value());
@ -130,16 +127,14 @@ impl ParamSlider {
// The resulting tuple `(start_t, delta)` corresponds to the start and the // The resulting tuple `(start_t, delta)` corresponds to the start and the
// signed width of the bar. `start_t` is in `[0, 1]`, and `delta` is in // signed width of the bar. `start_t` is in `[0, 1]`, and `delta` is in
// `[-1, 1]`. // `[-1, 1]`.
let fill_start_delta_lens = { let fill_start_delta_lens =
let param_data = param_data.clone();
unmodulated_normalized_value_lens.map(move |current_value| { unmodulated_normalized_value_lens.map(move |current_value| {
Self::compute_fill_start_delta( Self::compute_fill_start_delta(
style, style,
param_data.param(), param_data.param(),
*current_value, *current_value,
) )
}) });
};
// If the parameter is being modulated by the host (this only works for CLAP // If the parameter is being modulated by the host (this only works for CLAP
// plugins with hosts that support this), then this is the difference // plugins with hosts that support this), then this is the difference
@ -150,13 +145,10 @@ impl ParamSlider {
}); });
// This is used to draw labels for `CurrentStepLabeled` // This is used to draw labels for `CurrentStepLabeled`
let make_preview_value_lens = { let make_preview_value_lens = move |normalized_value| {
let param_data = param_data.clone();
move |normalized_value| {
param_data.make_lens(move |param| { param_data.make_lens(move |param| {
param.normalized_value_to_string(normalized_value, true) param.normalized_value_to_string(normalized_value, true)
}) })
}
}; };
// Only draw the text input widget when it gets focussed. Otherwise, overlay the // Only draw the text input widget when it gets focussed. Otherwise, overlay the
@ -168,18 +160,9 @@ impl ParamSlider {
ParamSlider::text_input_active, ParamSlider::text_input_active,
move |cx, text_input_active| { move |cx, text_input_active| {
if text_input_active.get(cx) { if text_input_active.get(cx) {
Self::text_input_view(cx, display_value_lens.clone()); Self::text_input_view(cx, display_value_lens);
} else { } else {
// All of this data needs to be moved into the `ZStack` closure, and ZStack::new(cx, |cx| {
// the `Map` lens combinator isn't `Copy`
let param_data = param_data.clone();
let fill_start_delta_lens = fill_start_delta_lens.clone();
let modulation_start_delta_lens =
modulation_start_delta_lens.clone();
let display_value_lens = display_value_lens.clone();
let make_preview_value_lens = make_preview_value_lens.clone();
ZStack::new(cx, move |cx| {
Self::slider_fill_view( Self::slider_fill_view(
cx, cx,
fill_start_delta_lens, fill_start_delta_lens,
@ -214,6 +197,9 @@ impl ParamSlider {
cx.emit(ParamSliderEvent::CancelTextInput); cx.emit(ParamSliderEvent::CancelTextInput);
} }
}) })
.on_cancel(|cx| {
cx.emit(ParamSliderEvent::CancelTextInput);
})
.on_build(|cx| { .on_build(|cx| {
cx.emit(TextEvent::StartEdit); cx.emit(TextEvent::StartEdit);
cx.emit(TextEvent::SelectAll); cx.emit(TextEvent::SelectAll);
@ -237,11 +223,7 @@ impl ParamSlider {
Element::new(cx) Element::new(cx)
.class("fill") .class("fill")
.height(Stretch(1.0)) .height(Stretch(1.0))
.left( .left(fill_start_delta_lens.map(|(start_t, _)| Percentage(start_t * 100.0)))
fill_start_delta_lens
.clone()
.map(|(start_t, _)| Percentage(start_t * 100.0)),
)
.width(fill_start_delta_lens.map(|(_, delta)| Percentage(delta * 100.0))) .width(fill_start_delta_lens.map(|(_, delta)| Percentage(delta * 100.0)))
// Hovering is handled on the param slider as a whole, this // Hovering is handled on the param slider as a whole, this
// should not affect that // should not affect that
@ -254,18 +236,10 @@ impl ParamSlider {
.class("fill") .class("fill")
.class("fill--modulation") .class("fill--modulation")
.height(Stretch(1.0)) .height(Stretch(1.0))
.visibility( .visibility(modulation_start_delta_lens.map(|(_, delta)| *delta != 0.0))
modulation_start_delta_lens
.clone()
.map(|(_, delta)| *delta != 0.0),
)
// Widths cannot be negative, so we need to compensate the start // Widths cannot be negative, so we need to compensate the start
// position if the width does happen to be negative // position if the width does happen to be negative
.width( .width(modulation_start_delta_lens.map(|(_, delta)| Percentage(delta.abs() * 100.0)))
modulation_start_delta_lens
.clone()
.map(|(_, delta)| Percentage(delta.abs() * 100.0)),
)
.left(modulation_start_delta_lens.map(|(start_t, delta)| { .left(modulation_start_delta_lens.map(|(start_t, delta)| {
if *delta < 0.0 { if *delta < 0.0 {
Percentage((start_t + delta) * 100.0) Percentage((start_t + delta) * 100.0)
@ -320,7 +294,7 @@ impl ParamSlider {
// current display value (before modulation) is used. // current display value (before modulation) is used.
match label_override_lens.get(cx) { match label_override_lens.get(cx) {
Some(label_override) => Label::new(cx, &label_override), Some(label_override) => Label::new(cx, &label_override),
None => Label::new(cx, display_value_lens.clone()), None => Label::new(cx, display_value_lens),
} }
.class("value") .class("value")
.class("value--single") .class("value--single")
@ -464,18 +438,21 @@ impl View for ParamSlider {
// still won't work. // still won't work.
WindowEvent::MouseDown(MouseButton::Left) WindowEvent::MouseDown(MouseButton::Left)
| WindowEvent::MouseTripleClick(MouseButton::Left) => { | WindowEvent::MouseTripleClick(MouseButton::Left) => {
if cx.modifiers.alt() { if cx.modifiers().alt() {
// ALt+Click brings up a text entry dialog // ALt+Click brings up a text entry dialog
self.text_input_active = true; self.text_input_active = true;
cx.set_active(true); cx.set_active(true);
} else if cx.modifiers.command() { } else if cx.modifiers().command() {
// Ctrl+Click, double click, and right clicks should reset the parameter instead // Ctrl+Click, double click, and right clicks should reset the parameter instead
// of initiating a drag operation // of initiating a drag operation
self.param_base.begin_set_parameter(cx); self.param_base.begin_set_parameter(cx);
self.param_base self.param_base
.set_normalized_value(cx, self.param_base.default_normalized_value()); .set_normalized_value(cx, self.param_base.default_normalized_value());
self.param_base.end_set_parameter(cx); self.param_base.end_set_parameter(cx);
} else { } else if !self.text_input_active {
// The `!self.text_input_active` check shouldn't be needed, but the textbox does
// not consume the mouse down event. So clicking on the textbox to move the
// cursor would also change the slider.
self.drag_active = true; self.drag_active = true;
cx.capture(); cx.capture();
// NOTE: Otherwise we don't get key up events // NOTE: Otherwise we don't get key up events
@ -485,16 +462,16 @@ impl View for ParamSlider {
// When holding down shift while clicking on a parameter we want to granuarly // When holding down shift while clicking on a parameter we want to granuarly
// edit the parameter without jumping to a new value // edit the parameter without jumping to a new value
self.param_base.begin_set_parameter(cx); self.param_base.begin_set_parameter(cx);
if cx.modifiers.shift() { if cx.modifiers().shift() {
self.granular_drag_status = Some(GranularDragStatus { self.granular_drag_status = Some(GranularDragStatus {
starting_x_coordinate: cx.mouse.cursorx, starting_x_coordinate: cx.mouse().cursorx,
starting_value: self.param_base.unmodulated_normalized_value(), starting_value: self.param_base.unmodulated_normalized_value(),
}); });
} else { } else {
self.granular_drag_status = None; self.granular_drag_status = None;
self.set_normalized_value_drag( self.set_normalized_value_drag(
cx, cx,
util::remap_current_entity_x_coordinate(cx, cx.mouse.cursorx), util::remap_current_entity_x_coordinate(cx, cx.mouse().cursorx),
); );
} }
} }
@ -529,7 +506,7 @@ impl View for ParamSlider {
if self.drag_active { if self.drag_active {
// If shift is being held then the drag should be more granular instead of // If shift is being held then the drag should be more granular instead of
// absolute // absolute
if cx.modifiers.shift() { if cx.modifiers().shift() {
let granular_drag_status = let granular_drag_status =
*self *self
.granular_drag_status .granular_drag_status
@ -544,7 +521,7 @@ impl View for ParamSlider {
util::remap_current_entity_x_t(cx, granular_drag_status.starting_value); util::remap_current_entity_x_t(cx, granular_drag_status.starting_value);
let delta_x = ((*x - granular_drag_status.starting_x_coordinate) let delta_x = ((*x - granular_drag_status.starting_x_coordinate)
* GRANULAR_DRAG_MULTIPLIER) * GRANULAR_DRAG_MULTIPLIER)
* cx.style.dpi_factor as f32; * cx.scale_factor();
self.set_normalized_value_drag( self.set_normalized_value_drag(
cx, cx,
@ -567,7 +544,7 @@ impl View for ParamSlider {
self.granular_drag_status = None; self.granular_drag_status = None;
self.param_base.set_normalized_value( self.param_base.set_normalized_value(
cx, cx,
util::remap_current_entity_x_coordinate(cx, cx.mouse.cursorx), util::remap_current_entity_x_coordinate(cx, cx.mouse().cursorx),
); );
} }
} }
@ -577,7 +554,7 @@ impl View for ParamSlider {
self.scrolled_lines += scroll_y; self.scrolled_lines += scroll_y;
if self.scrolled_lines.abs() >= 1.0 { if self.scrolled_lines.abs() >= 1.0 {
let use_finer_steps = cx.modifiers.shift(); let use_finer_steps = cx.modifiers().shift();
// Scrolling while dragging needs to be taken into account here // Scrolling while dragging needs to be taken into account here
if !self.drag_active { if !self.drag_active {