Change button to label

This commit is contained in:
Adrian Woźniak 2022-08-25 15:12:11 +02:00
parent a795200245
commit 9242681bb2
No known key found for this signature in database
GPG Key ID: 0012845A89C7352B

View File

@ -59,24 +59,19 @@ impl OutputsSettings {
.monospace(),
));
ui.label("Display Power Management");
if ui
.button(WidgetText::RichText(
RichText::new(match output.display_power_managment {
true => "On",
false => "Off",
})
.color(match output.display_power_managment {
true => Color32::GREEN,
false => Color32::GRAY,
})
.monospace()
.code()
.strong(),
))
.clicked()
{
//
}
ui.label(WidgetText::RichText(
RichText::new(match output.display_power_managment {
true => "On",
false => "Off",
})
.color(match output.display_power_managment {
true => Color32::GREEN,
false => Color32::GRAY,
})
.monospace()
.code()
.strong(),
));
});
}
}