File tree 1 file changed +12
-8
lines changed
src/modules/notificationitem
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -55,20 +55,24 @@ class StatusNotifierItem : public dbus::ObjectVTable<StatusNotifierItem> {
55
55
}
56
56
void activate (int , int ) { parent_->instance ()->toggle (); }
57
57
void secondaryActivate (int , int ) {}
58
- std::string iconName () {
59
- static bool preferSymbolic = !isKDE ();
60
- std::string icon;
61
- if (preferSymbolic) {
62
- icon = " input-keyboard-symbolic" ;
58
+ std::string keyboardIconName () const {
59
+ if (isKDE ()) {
60
+ return " input-keyboard" ;
63
61
} else {
64
- icon = " input-keyboard" ;
62
+ return " input-keyboard-symbolic " ;
65
63
}
64
+ }
65
+ std::string iconName () {
66
+ std::string icon;
67
+
66
68
if (auto *ic = parent_->menu ()->lastRelevantIc ()) {
67
69
icon = parent_->instance ()->inputMethodIcon (ic);
68
70
}
69
- if (icon == " input-keyboard" && preferSymbolic) {
70
- return " input-keyboard-symbolic" ;
71
+
72
+ if (icon.empty () || icon == " input-keyboard" ) {
73
+ icon = keyboardIconName ();
71
74
}
75
+
72
76
return IconTheme::iconName (icon);
73
77
}
74
78
You can’t perform that action at this time.
0 commit comments