mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #1518 from towoe/bluetooth-format
Add disabled bluetooth style
This commit is contained in:
commit
d87cf8a8f2
@ -94,3 +94,4 @@ Addressed by *bluetooth*
|
|||||||
# STYLE
|
# STYLE
|
||||||
|
|
||||||
- *#bluetooth*
|
- *#bluetooth*
|
||||||
|
- *#bluetooth.disabled*
|
||||||
|
@ -12,6 +12,11 @@ auto waybar::modules::Bluetooth::update() -> void {
|
|||||||
|
|
||||||
label_.set_markup(
|
label_.set_markup(
|
||||||
fmt::format(format_, fmt::arg("status", status), fmt::arg("icon", getIcon(0, status))));
|
fmt::format(format_, fmt::arg("status", status), fmt::arg("icon", getIcon(0, status))));
|
||||||
|
if (status == "disabled") {
|
||||||
|
label_.get_style_context()->add_class("disabled");
|
||||||
|
} else {
|
||||||
|
label_.get_style_context()->remove_class("disabled");
|
||||||
|
}
|
||||||
|
|
||||||
if (tooltipEnabled()) {
|
if (tooltipEnabled()) {
|
||||||
if (config_["tooltip-format"].isString()) {
|
if (config_["tooltip-format"].isString()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user