Updated default CSS to include the privacy module

This commit is contained in:
Erik Reider 2023-10-26 23:44:04 +02:00
parent e73ea8d608
commit ace319b515
2 changed files with 28 additions and 3 deletions

View File

@ -278,3 +278,28 @@ label:focus {
#scratchpad.empty { #scratchpad.empty {
background-color: transparent; background-color: transparent;
} }
#privacy {
padding: 0;
}
#privacy > box {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}

View File

@ -34,15 +34,15 @@ PrivacyItem::PrivacyItem(const Json::Value& config_,
icon_() { icon_() {
switch (privacy_type) { switch (privacy_type) {
case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_INPUT: case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_INPUT:
get_style_context()->add_class("audio-in"); box_.get_style_context()->add_class("audio-in");
iconName = "waybar-privacy-audio-input-symbolic"; iconName = "waybar-privacy-audio-input-symbolic";
break; break;
case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_OUTPUT: case util::PipewireBackend::PRIVACY_NODE_TYPE_AUDIO_OUTPUT:
get_style_context()->add_class("audio-out"); box_.get_style_context()->add_class("audio-out");
iconName = "waybar-privacy-audio-output-symbolic"; iconName = "waybar-privacy-audio-output-symbolic";
break; break;
case util::PipewireBackend::PRIVACY_NODE_TYPE_VIDEO_INPUT: case util::PipewireBackend::PRIVACY_NODE_TYPE_VIDEO_INPUT:
get_style_context()->add_class("screenshare"); box_.get_style_context()->add_class("screenshare");
iconName = "waybar-privacy-screen-share-symbolic"; iconName = "waybar-privacy-screen-share-symbolic";
break; break;
default: default: