From ebee6cfe5dfcb2db8fdaec0bd7f3dd68b9ba6302 Mon Sep 17 00:00:00 2001 From: Odizinne Date: Tue, 20 Aug 2024 11:59:45 +0200 Subject: [PATCH] Removed odd battery icons for visibility --- src/Resources/icons/battery-010-dark.png | Bin 168 -> 0 bytes src/Resources/icons/battery-010-light.png | Bin 160 -> 0 bytes src/Resources/icons/battery-020-dark.png | Bin 166 -> 165 bytes src/Resources/icons/battery-020-light.png | Bin 159 -> 156 bytes src/Resources/icons/battery-030-dark.png | Bin 161 -> 0 bytes src/Resources/icons/battery-030-light.png | Bin 153 -> 0 bytes src/Resources/icons/battery-040-dark.png | Bin 161 -> 166 bytes src/Resources/icons/battery-040-light.png | Bin 153 -> 159 bytes src/Resources/icons/battery-050-dark.png | Bin 161 -> 0 bytes src/Resources/icons/battery-050-light.png | Bin 153 -> 0 bytes src/Resources/icons/battery-070-dark.png | Bin 161 -> 0 bytes src/Resources/icons/battery-070-light.png | Bin 153 -> 0 bytes src/Resources/icons/battery-090-dark.png | Bin 159 -> 0 bytes src/Resources/icons/battery-090-light.png | Bin 154 -> 0 bytes src/Resources/resources.qrc | 10 ---------- src/Utils/utils.cpp | 15 +++++---------- 16 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 src/Resources/icons/battery-010-dark.png delete mode 100644 src/Resources/icons/battery-010-light.png delete mode 100644 src/Resources/icons/battery-030-dark.png delete mode 100644 src/Resources/icons/battery-030-light.png delete mode 100644 src/Resources/icons/battery-050-dark.png delete mode 100644 src/Resources/icons/battery-050-light.png delete mode 100644 src/Resources/icons/battery-070-dark.png delete mode 100644 src/Resources/icons/battery-070-light.png delete mode 100644 src/Resources/icons/battery-090-dark.png delete mode 100644 src/Resources/icons/battery-090-light.png diff --git a/src/Resources/icons/battery-010-dark.png b/src/Resources/icons/battery-010-dark.png deleted file mode 100644 index caa68ed6c7711040d28e7f7d1f5e8d82b08d08bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6rf;~ zr;B4q#jWI&1}0C>lmB^4SkBM4Pd}o@CoW^aen98g(uOF8>9)=18UG*T;7D^?-R( N!PC{xWt~$(695H;H2nYo diff --git a/src/Resources/icons/battery-010-light.png b/src/Resources/icons/battery-010-light.png deleted file mode 100644 index efadbec3e96c9bbe33d17caa45ac871e325350e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6rf;` zr;B4q#jWI&hNk}x2OOLaaIi!iWxvB{&|RpxKJ6BhW?p#VxmYJH;ajg& z!WG6Hn|`ifcALk{W+T{VmGB|lt)!e`7gJQD<837-hF1FntU+5n+<~Suc)I$ztaD0e F0su!VGqC^w diff --git a/src/Resources/icons/battery-020-dark.png b/src/Resources/icons/battery-020-dark.png index fdfede8b4b49ec4e5eb1be531831192a777b25c7..4f7c9e333132ad1f7b07a9b4c7debaf85a4e1372 100644 GIT binary patch delta 78 zcmZ3+xRh~%C1dzRD@~_^9E?j;R5gnvF5C%Z@3CSy%J?GT3ZwFQM&@}O?y?3yw3T;R iGsH5kJ+L5GkdZ-0;Gpelr=9u?K;Y@>=d#Wzp$P!;Rv8ii delta 79 zcmZ3=xQuavC1b=yD^2HgqXjOlAFR);c?XgODVwrG2_~8m>w)#|; ia`pw<3q&Qh=qfRE6rHtg@swP~00f?{elF{r5}E)kG8$0; diff --git a/src/Resources/icons/battery-020-light.png b/src/Resources/icons/battery-020-light.png index db34dc1a6ceb7ea5fc813a3d1f5750d6873a5102..232afc04a3d4080c50920dbd2846bd94f9030155 100644 GIT binary patch delta 75 zcmbQwIEQh9C8OU&D`oq71E-6g6AveR>$OU_!nkA8&lSvW^O)Ie1pBNKK7_lKlr!vN fifVMct;EFOU4MXemD!i63_#%N>gTe~DWM4fNR=Di delta 78 zcmV-U0I~m^0iOYoIRR0TIwL~=nGC2=k@lY=hr#R{b-<_taAosR2aG%i40s|Ob->`S kjOgwFbOp2mgSJHk0KPxK1lmB^4SkBM4Pd}o@CoW^aen98g(uOF8>9)=187mew>98}Ml`TE6 zf;m8@A@RiuX16)aY&L>@RtX=%-Ac+Cb}>aYI^I@dVp#Wot8IVfVpE{;44$rjF6*2U FngCd=Fth*w diff --git a/src/Resources/icons/battery-030-light.png b/src/Resources/icons/battery-030-light.png deleted file mode 100644 index 1e48a43d97d3aaa2ef5b8480a88779449b696938..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6riBD zr;B4q#jWI&hNk}x2OOLaaIi!iWxvB{&|RpxKUhWJ5bmIDkP+>|z*uzFb}qw{DGWg1>FVdQ&MBb@0G+oC8UooDSTG#k5XjzR!Ol~mBvX3e!TO#T?-)v0 fw=gwtb7f&zH-D?`n&wA`8Gyjk)z4*}Q$iB})U+EV diff --git a/src/Resources/icons/battery-040-light.png b/src/Resources/icons/battery-040-light.png index 235c600927d445475f13418788de795df6a5f3c0..d7aa5f4c226cae003d658a132ac0382b79fec905 100644 GIT binary patch delta 79 zcmV-V0I>g=0iOYoIRR0TIwC{B|CtQ4G lUm4Ne0q6>71qN-42mrCLzy&E;4gCNB002ovPDHLkV1g<0A3y*A delta 73 zcmbQwIFoULC8PI5Db`df-Iyfd=(Mf$Tj0PIbKFa|n0P dHpqx}VL0h`fYn>s<~#!sc)I$ztaD0e0s!(z8m|BV diff --git a/src/Resources/icons/battery-050-dark.png b/src/Resources/icons/battery-050-dark.png deleted file mode 100644 index 3437d5f5d9862bc35e554565d0d5bcee6d19ba6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6rflmB^4SkBM4Pd}o@CoW^aen98g(uOF8>9)=18C6_Z1NqoyS-)xs zWM5#xaCkx>dyfS>Plb|9>4699dtSU_C}G{g)V$4=g<+ljR@;*sr`H0FXYh3Ob6Mw< G&;$T9$1unM diff --git a/src/Resources/icons/battery-050-light.png b/src/Resources/icons/battery-050-light.png deleted file mode 100644 index ac259efc3e4f3dc49acec80db9abaa6648bc7f23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6riBD zr;B4q#jWI&hNk}x2OOLaaIi!iWxvB{&|RpxK y^uUSY0}bkj0@-=~o$7eU=Me6oZIBV|!f@i<0oJ?Al|KWGW$<+Mb6Mw<&;$V3t1|Tf diff --git a/src/Resources/icons/battery-070-dark.png b/src/Resources/icons/battery-070-dark.png deleted file mode 100644 index 23031e416b019879c656c809fe62e55427715bd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6rflmB^4SkBM4Pd}o@CoW^aen98g(uOF8>9)=18AV)J!}uA_%9b8j z!5kpdurTuqqw+aM=6M|MvIal2m3LV)#4@fuupn2EkzsB9R@>zk!PkMtGkCiCxvX y^uUSY0}bkj0@-=~o$7eU=Me6oZIBV|!f-lmB^4SkBM4Pd}o@CoW^aen98g(uOF8>9)=18AE!w+*a&d%qLOG z(8X*Z(rcA)#4_Q4@WU0%Z1t%wAk+ diff --git a/src/Resources/icons/battery-090-light.png b/src/Resources/icons/battery-090-light.png deleted file mode 100644 index 3f5057c87b11ba918cfd7315947d7090cfec42fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ev!3HGXOtkk0Qk(@Ik;M!Qe1}1p@p%4<6riAw zr;B4q#jWI&hNk}x2OOLaaIi!iWxvB{&|RpxKc9U&*#K7aa ym`|dRPvV1%#jA#c@sbzsGQQx-U}ekg=3qFUcYsyWBlSMeTn0~9KbLh*2~7ZbOfNqG diff --git a/src/Resources/resources.qrc b/src/Resources/resources.qrc index 5808dd8..3bfccdf 100644 --- a/src/Resources/resources.qrc +++ b/src/Resources/resources.qrc @@ -1,26 +1,16 @@ - icons/battery-010-dark.png icons/battery-020-dark.png - icons/battery-030-dark.png icons/battery-040-dark.png - icons/battery-050-dark.png icons/battery-060-dark.png - icons/battery-070-dark.png icons/battery-080-dark.png - icons/battery-090-dark.png icons/battery-100-dark.png icons/battery-100-charging-dark.png icons/battery-missing-dark.png - icons/battery-010-light.png icons/battery-020-light.png - icons/battery-030-light.png icons/battery-040-light.png - icons/battery-050-light.png icons/battery-060-light.png - icons/battery-070-light.png icons/battery-080-light.png - icons/battery-090-light.png icons/battery-100-light.png icons/battery-100-charging-light.png icons/battery-missing-light.png diff --git a/src/Utils/utils.cpp b/src/Utils/utils.cpp index d5a7266..2c726a3 100644 --- a/src/Utils/utils.cpp +++ b/src/Utils/utils.cpp @@ -42,16 +42,11 @@ QString getBatteryIcon(int batteryLevel, bool charging, bool missing, int themeI } else if (charging) { iconName = "battery-100-charging-" + theme; } else { - if (batteryLevel >= 90) iconName = "battery-100-" + theme; - else if (batteryLevel >= 80) iconName = "battery-090-" + theme; - else if (batteryLevel >= 70) iconName = "battery-080-" + theme; - else if (batteryLevel >= 60) iconName = "battery-070-" + theme; - else if (batteryLevel >= 50) iconName = "battery-060-" + theme; - else if (batteryLevel >= 40) iconName = "battery-050-" + theme; - else if (batteryLevel >= 30) iconName = "battery-040-" + theme; - else if (batteryLevel >= 20) iconName = "battery-030-" + theme; - else if (batteryLevel >= 10) iconName = "battery-020-" + theme; - else iconName = "battery-010-" + theme; + if (batteryLevel >= 80) iconName = "battery-100-" + theme; + else if (batteryLevel >= 60) iconName = "battery-080-" + theme; + else if (batteryLevel >= 40) iconName = "battery-060-" + theme; + else if (batteryLevel >= 20) iconName = "battery-040-" + theme; + else if (batteryLevel >= 0) iconName = "battery-020-" + theme; } QString iconPath;