fix: lint
This commit is contained in:
@ -22,8 +22,7 @@ AIconLabel::AIconLabel(const Json::Value &config, const std::string &name, const
|
|||||||
|
|
||||||
if (config_["rotate"].isUInt()) {
|
if (config_["rotate"].isUInt()) {
|
||||||
rot = config["rotate"].asUInt() % 360;
|
rot = config["rotate"].asUInt() % 360;
|
||||||
if ((rot % 90) != 00)
|
if ((rot % 90) != 00) rot = 0;
|
||||||
rot = 0;
|
|
||||||
rot /= 90;
|
rot /= 90;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ AIconLabel::AIconLabel(const Json::Value &config, const std::string &name, const
|
|||||||
else
|
else
|
||||||
swap_icon_label = config_["swap-icon-label"].asBool();
|
swap_icon_label = config_["swap-icon-label"].asBool();
|
||||||
|
|
||||||
if ( (rot == 0 || rot == 3) ^ swap_icon_label ) {
|
if ((rot == 0 || rot == 3) ^ swap_icon_label) {
|
||||||
box_.add(image_);
|
box_.add(image_);
|
||||||
box_.add(label_);
|
box_.add(label_);
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,7 +68,7 @@ void Submap::onEvent(const std::string& ev) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto submapName = ev.substr(ev.find_first_of('>') + 2 );
|
auto submapName = ev.substr(ev.find_first_of('>') + 2);
|
||||||
|
|
||||||
if (!submap_.empty()) {
|
if (!submap_.empty()) {
|
||||||
label_.get_style_context()->remove_class(submap_);
|
label_.get_style_context()->remove_class(submap_);
|
||||||
|
@ -500,8 +500,10 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
|
|||||||
// > get the list of players [..] in order of activity
|
// > get the list of players [..] in order of activity
|
||||||
// https://github.com/altdesktop/playerctl/blob/b19a71cb9dba635df68d271bd2b3f6a99336a223/playerctl/playerctl-common.c#L248-L249
|
// https://github.com/altdesktop/playerctl/blob/b19a71cb9dba635df68d271bd2b3f6a99336a223/playerctl/playerctl-common.c#L248-L249
|
||||||
players = g_list_first(players);
|
players = g_list_first(players);
|
||||||
if (players) player_name = static_cast<PlayerctlPlayerName*>(players->data)->name;
|
if (players)
|
||||||
else return std::nullopt; // no players found, hide the widget
|
player_name = static_cast<PlayerctlPlayerName*>(players->data)->name;
|
||||||
|
else
|
||||||
|
return std::nullopt; // no players found, hide the widget
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::any_of(ignored_players_.begin(), ignored_players_.end(),
|
if (std::any_of(ignored_players_.begin(), ignored_players_.end(),
|
||||||
|
Reference in New Issue
Block a user