mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
rog-aura: add proper labels for keys via &str into
This commit is contained in:
@@ -42,6 +42,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
})?;
|
||||
let mut board_name = String::new();
|
||||
file.read_to_string(&mut board_name)?;
|
||||
board_name = "G533".to_string();
|
||||
|
||||
let mut layout = KeyLayout::ga401_layout(); // default
|
||||
let mut path = PathBuf::from(DATA_DIR);
|
||||
|
||||
@@ -30,13 +30,12 @@ impl<'a> RogApp<'a> {
|
||||
// your boat
|
||||
let shape = KeyShape::from(key);
|
||||
|
||||
let label = <&str>::from(key);
|
||||
if shape.is_blank() || shape.is_spacer() {
|
||||
blank(ui, shape);
|
||||
} else if shape.is_group() {
|
||||
let label = format!("{key:?}");
|
||||
key_group(ui, colour, shape.ux(), shape.uy()).on_hover_text(label);
|
||||
} else {
|
||||
let label = format!("{key:?}");
|
||||
key_shape(ui, colour, shape).on_hover_text(label);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user