mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-15 13:22:19 +01:00
refactor(bar): GroupingConfig.transparency_alpha has one spelling in render.rs
The two render.rs differed in two places. The Windows bar documented transparency_alpha with '(default: 200)' in its text; the macOS bar documented it without and put the default into the schema (schemars extend default 200), so the macOS nix options file gets default = 200. The macOS spelling is taken for both, because a change to the macOS schema.bar.json would also change the generated nix/komorebi-bar-options.nix, which cannot be regenerated here. Windows: the description loses the '(default: 200)' text and the property gains "default": 200 (reviewed diff of schema.bar.json below, pin updated in tests/schema_oracle.rs); the one comment on RenderConfig that only Windows had ('/// Render configuration') is added to the macOS copy. The two render.rs are then byte-identical.
The schema diff is the two lines of the property: description 'Alpha value for the color transparency [[0-255]] (default: 200)' -> 'Alpha value for the color transparency [[0-255]]', and one added "default": 200. macOS schema.bar.json is untouched (its harness regeneration is byte-identical).
Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core: 3 unit + 2 oracle passed, 0 failed; harness regeneration: macOS byte-identical (3,774 lines), Windows byte-identical to the updated schema.bar.json (9,091 lines, diff exactly the two lines above). Not verified: rendering.
This commit is contained in:
1 parent
70bff5d549
commit
a3afb3a94b
4 files changed
+8
-5
No files matched your search
@@ -21,9 +21,9 @@ struct Pin {
|
||||
const PINS: [Pin; 2] = [
|
||||
Pin {
|
||||
file: "schema.bar.json",
|
||||
lines: 9_090,
|
||||
bytes: 248_529,
|
||||
fnv1a: 0x5573_0134_1968_bff9,
|
||||
lines: 9_091,
|
||||
bytes: 248_540,
|
||||
fnv1a: 0x83d6_6fd4_9ae8_3766,
|
||||
},
|
||||
Pin {
|
||||
file: "komorebi-for-mac/schema.bar.json",
|
||||
|
||||
@@ -367,7 +367,8 @@ impl RenderConfig {
|
||||
pub struct GroupingConfig {
|
||||
/// Styles for the grouping
|
||||
pub style: Option<GroupingStyle>,
|
||||
/// Alpha value for the color transparency [[0-255]] (default: 200)
|
||||
/// Alpha value for the color transparency [[0-255]]
|
||||
#[cfg_attr(feature = "schemars", schemars(extend("default" = 200)))]
|
||||
pub transparency_alpha: Option<u8>,
|
||||
/// Rounding values for the 4 corners. Can be a single or 4 values.
|
||||
pub rounding: Option<RoundingConfig>,
|
||||
|
||||
@@ -44,6 +44,7 @@ pub enum Grouping {
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
/// Render configuration
|
||||
pub struct RenderConfig {
|
||||
/// Komorebi monitor index of the monitor on which to render the bar
|
||||
pub monitor_idx: usize,
|
||||
|
||||
+2
-1
@@ -2807,12 +2807,13 @@
|
||||
]
|
||||
},
|
||||
"transparency_alpha": {
|
||||
"description": "Alpha value for the color transparency [[0-255]] (default: 200)",
|
||||
"description": "Alpha value for the color transparency [[0-255]]",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"format": "uint8",
|
||||
"default": 200,
|
||||
"maximum": 255,
|
||||
"minimum": 0
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user