PolyMeilex / sctk-adwaita

Adwaita-like SCTK Frame
MIT License
26 stars 19 forks source link

Log names of unknown buttons in layout config #42

Closed proski closed 1 year ago

proski commented 1 year ago

I'm getting that warning from alacritty under certain circumstances: https://github.com/alacritty/alacritty/pull/7079 Showing the button name helps users understand the problem. The button name was appmenu in my case. Maybe it should be implemented?

PolyMeilex commented 1 year ago

Thanks, while at it, could we lower the severity of the log? Feels like warm is too much for something that is kinda expected.

proski commented 1 year ago

I've lowered the level to DEBUG.

proski commented 1 year ago

I have fixed the formatting to make the CI happy.

By the way, I suspect that the CI is using a very old version of rust for the format check, or perhaps it's picking up some non-standard settings.

PolyMeilex commented 1 year ago

By the way, I suspect that the CI is using a very old version of rust for the format check, or perhaps it's picking up some non-standard settings.

Hymm, everything looks good to me when it comes to fmt version, my local 1.71.1 setup outputs same results as github CI:

rustup show
stable-x86_64-unknown-linux-gnu (default)
rustc 1.71.1 (eb26296b5 2023-08-03)
cargo fmt --version
rustfmt 1.5.2-stable (eb26296 2023-08-03)
cargo fmt --check
Diff in /home/poly/dev/sctk-adwaita/src/buttons.rs at line 167:
                 "appmenu" => {
                     debug!("Ignoring \"appmenu\" button");
                     continue;
-                },
+                }
                 _ => {
                     warn!("Ignoring unknown button type: {button}");
                     continue;
Diff in /home/poly/dev/sctk-adwaita/src/buttons.rs at line 174:
-                },
+                }
             };

             buttons.push(Button::new(button_kind));
proski commented 1 year ago

Sorry for the noise about formatting! It turns out I checked out sctk-adwaita inside the alacritty repository that has a custom rustfmt.toml. Somehow that file affected the behavior of cargo fmt.