Battery Applet – The Sequel

There have been quite some comments to my previous blog, among them some good points how to further improve the clarity of the battery applet’s info and control panel. I thought the best way to address this is with a patch, and a bit of explanation of those changes. So here’s the dialogue after a bit of further hacking on it:

New version on the left, old version on the rightLet’s look at the latest changes:

  • Bigger informational text, bold labels — Checking the charging state is the primary usecase of the panel, adding a bit of visual weight to the top section makes it easier to spot the information
  • Separator between info section and controls removed — As some people pointed out, the separator between the info and the control section resembles the brightness slider a bit too closely, and distracts visually
  • Configure button moved in line with the profile combobox — This is actually a very good point. It makes sense to put the configure button next to the profile combobox. The button actually leads to the profile configuration settings. It also makes it possible to …
  • Move Sleep and Hibernate buttons in line — Now we have two instead of three buttons in the lower section of the controls, we can actually put them in line and get rid of the large hole in the lower part of the dialog.
  • Aligned labels and controls horizontally — This last one is a label alignment bug in my code notmart quickly fixed after seeing the screenshot. Thanks dude! :)

I think that it works indeed better visually with those changes. The separation between info section and controls are better, the alignment of the widget overall is clearer, and as you can see, we’ve also saved quite some horizontal space. While it’s certainly not perfect yet, I think it’s a really nice improvement. Thanks to those who came up with the suggestions. I’ve just committed the patches to trunk, so they’ll be in KDE SC 4.4 beta next week.

On a sidenote, I had to order a new battery today for my beloved Thinkpad T60. The battery I’m using is, as you can see totally worn out. If you, dear lazyweb have suggestions how I can revive my (by now three) worn out accus, I’d be most grateful. I guess the constant plugging and unplugging of the accu and power cable isn’t the healthiest diet for this kind of hardware. Ow sacrifices … ;-)

Update: I’ve removed the percentage from the battery picture in the dialog, since it’s redundant (already displayed next to the “Battery:” label). Also, the dialog now reacts to font size changes on the fly.

45 Responses to “Battery Applet – The Sequel”

  1. Tom says:

    Great work. Crowdsourcing design seems to work! Yay!

    I wish I could draw a better battery .. maybe KDE should pool all the things that need new graphics and make a contest for designer. Actually I really don’t get why young designers don’t for FOSS. What better way to promote your work?? (Maybe it is because they live in a Adobe world and don’t use FOSS .. who knows)

  2. Gareth Francis says:

    Wow, its so much better now.. well done

  3. samat.org/ says:

    My ThinkPad X61t battery just died recently. The capacity went, overnight, from 2/3s original capacity down to zero. Lenovo has a recall on the battery, but would not replace mine as it was long out of it’s warranty (apparently the problem is also not a safety issue).

    Looking for alternatives, I found that Boston Power finally is finally shipping their Sonata cells, a next-gen Lithium ion technology. These cells are rated for 1000 cycles, do not degrade significantly in capacity for those 1000 cycles, and charge quickly (80% charge within 30 min). There’s a company that makes them for ThinkPads, DrBattery. Unfortunately, they don’t have batteries for the X series (what I have), but they do for the T60. With a 3 yr warranty, you may want to check them out instead rather than forking cash to Lenovo, especially when Lenovo does not want to stand by defective products. There’s a thread at the thinkpads.com forums that I started to track people’s experiences with them.

    Unfortunately, I don’t think they’re available in Europe, though. But if you decide to go for a new battery you look at alternatives rather than settling for a Lenovo-branded one.

  4. Gareth Francis says:

    Oh on the battery front, its bad news im afraid, as far as i’m aware a nackered battery is.. well.. a nackered battery.

    The only real advise i have is too look after the new one as best you can, by doing the following:

    I’f you know your going to be working off the mains for the foreseeable future and your battery is already fully charged, remove the battery from the laptop.

    When you do switch to battery power, let the battery run down to less than 15% if possible before plugging it back in, but don’t let it go completely flat.

    Make sure you go through a discharge/re-charge cycle of the battery at least once or twice a month.

    I try to follow those rules as best i can whilst still being lazy and my laptop batteries tend to last a good 2+ years under daily use.

    • sebas says:

      This Thinkpad actually has the feature to not immediately start to recharge the battery once it drops below 100%, that saves quite a few cycles. The battery applet actually reflects this distinction (in the screenshot with a really flat battery).

      It’s quite apparent that the current battery technology can’t really keep up, batteries are often the first thing that deteriorate in a laptop, they only provide limited mobility, are relatively heavy and take quite some time to charge.

  5. Samat Jain says:

    Er, I guess I should actually make an on-topic comment…

    Are the Suspend and Hibernate buttons always both displayed, or is whether they are shown dependent on what HAL reports?

    I don’t use Hibernate on my laptop (I don’t have a swap partition to hibernate to). With my laptop’s 4 GiB of RAM, it takes longer to hibernate/resume than it does to boot (this is only going to become more common as SSDs become more prevalent). I do, however, use Suspend all the time–so I end up with two buttons, one of which (Hibernate) does absolutely nothing.

    Last I looked into this, both buttons were hard-coded into the UI. I didn’t look into it further because I couldn’t figure out how to make HAL report that a machine supported Suspend, but not Hibernate. Since you’re working on the UI now this might be a nice feature to add?

    • sebas says:

      The buttons are only shown when HAL reports the capabilty. This has actually always been conditional, maybe your HAL reports bogus information then? You can check what solid reads from HAL with solid-powermanagement query suspend, mine shows to_disk and to_ram as available methods.

  6. Justin kirby says:

    I’ve actually heard that putting your battery in a sock and then banging it against a floor or something helps with older generation batteries. I guess over time the battery crystalizes on the inside and if you knock it around it loosens those up which helps battery power retention. The sock is to provide some cushion so you don’t crack the battery casing open. I’ve never actually tied it but it’s worth a shot if your battery doesn’t charge anymore.

  7. It’s way better than the previous version, but may I question some design decisions?

    - The text “Battery” and “AC Adapter” are not what really is important, it’s the following content, so I wonder how “useful” the bold text is in this case. I mean, the first thing that draws my attention is the bold label, not what I really want to see: the battery state. - If it’s not removable, I don’t think it’s necessary to have the battery charge percentage displayed twice. Since we’re on a GUI and also shifting towards a “widescreen” view, I’d suggest something along the lines of leaving the meter and the “changing” state information to the icons, and placing it aligned horizontally with the rest. This will probably give it more of a “tooltip” feel, instead of a dialog.

    • sebas says:

      I’ve actually removed the charge percentage from the battery in the popup in a subsequent commit. I agree that it’s redundant information, as you, and some others have pointed out.

  8. JR says:

    Looks very nice. Are the edge distances hardcoded or path of your theme? Just don’t forget about us with netbooks and the limited screen budget we suffer from. :3

    1024×600 can get a bit… cramped.

    • sebas says:

      The dialog goes away as soon as you focus another dialog, so that shouldn’t be a problem. It also easily fits on smaller screens. In its current size, it’s about 240 pixels high, depending on the font size. The distances aren’t hardcoded, but dependent on the font used (it’s the General one from the fonts configuration in system settings). The dialog now also reacts to font size changes on the fly, which is a nice bonus.

  9. Tony says:

    What about time remaining in the battery? That should be in that dialog too.

  10. kmare says:

    Great work! It was much needed. What I would like to know if it’s possible to also display the current watt power being used by the laptop. It’s something I really miss. Btw, is there a command i can use on the terminal to monitor the watts being used?

    Thanx in advance.

    • sebas says:

      I’d like to add this kind of detailed information as well. As we’re now feature-frozen, it makes more sense to work out bugs so that we can deliver a solid (ha!) experience in KDE SC 4.4. An information panel with more details might be 4.5 material, but no promises yet. :)

    • Jos says:

      +1 on the showing of current power consumption. This would really help in prolonging your experience.

    • SeaJey says:

      Intel’s powertop can help.

  11. Carlos says:

    Great work! It’s way lot better now!

  12. Christian says:

    Wow, *huge* improvement over previous version. Thank you for listen (or read :-) users opinions.

    Just one suggestion: perhaps “Sleep” and “Hibernate” buttons could be centered…

    • setecastronomy says:

      Alternatively, one could add a label like “Actions:” or “Computer should”, align it to the right like the labels above and align the buttons as a group to the left, like the items above them. I don’t know how this would work out, or if it violates the HIG etc. but maybe it’s worth a shot.

  13. P says:

    Ensure that it’s hard to accidentally suspend or hibernate. This has happened to be a few times and it’s very annoying. On my laptop a hibernate+resume takes several minutes (much, much longer than rebooting). Also suspend and hibernate often don’t work perfectly, and things can get screwed up after resuming.

  14. Matt Smith says:

    Looks much better, thanks for all the work!

    I still think the buttons at the bottom look a little off, maybe you could try aligning them with the drop down list above? Everything vertically aligned above that sleep button is a label rather than info or something that can be interacted with. Centering or right-aligning them might also work.

  15. saem says:

    It’s WAAAAY better! Nicely done.

    One last thing, I think it’d be worth while to stick to the same terminology as the rest of Plasma, with ‘Suspend to RAM’, and ‘Suspend to Disk’, a) it’s consistent, and b) it reduces the burden on translation. I’m sure there are other good reasons, but those two seem like the big ones.

    In any case, good work, and thanks!

  16. Javi says:

    Great improvement :D

  17. dodo says:

    Greatt. BTW, am I the only one who dislike the slider style in plasma widgets? I can’t even figure out clearly where the bar starts and ends. :-(

  18. Martin says:

    Hi. Great Work! Thank You. But I have two little question: 1) What about using IconWidget? Battery icon should works like other (mouse down animation, hover, …). 2) What about put battey charge time (hour, minutes, seconds) to tooltip in thaths icon?

  19. eliasp says:

    As saem already says – re-use the wording of other plasma components because of less strings which needs translation. Using the same wording reduces also the chance, that there will be inconsistencies in any of the translations.

    Another thing which might cause trouble regarding translations, is having the buttons horizontally aligned – as some languages might have a really long button text here, this could cause a strange layout.

    Maybe you could grep the po file for the longest translation and check the layout using these strings.

    Regards, Elias P.

  20. Peter says:

    It looks really much better now. But there is still room for visual improvement:

    Please try to make the vertical distances equal: same distance like the distance between “screen brightness” and “power profile” for ALL items (battery ::: ac-adaptor ::: screenbrightness ::: power profile).

    I share the same opionen as other about the button on bottom. They are horizontally bad aligned. Perhaps try to put also a label in front of them, and put them both on the right-side of the form layout.

    Still I don’t share you opinion about hide the estimated(!) time displaying option.

  21. Anonymous says:

    Way better now :)

    Is there any reason though for making the standby/hibernate buttons that tiny? In my opinion, the bigger ones were looking better and were also more consistent with the ones in kickoff (unless these are this small now, too).

  22. Looks nicer, but I am not sure the info and control widgets should be separated. Why not use the same presentation for all of them? (I mean using or not using bold, and adding a ‘:’ at the end). I also believe “Sleep” and “Hibernate” should be in the second column.

  23. illissius says:

    Great work. Like a couple of other commenters mentioned, it still looks odd to me that the Sleep/Hibernate buttons are aligned to the left. I guess that being buttons at the bottom of a dialog, I subconsciously expect them to be aligned to the right like buttons in a dialog usually are.

  24. Thomas says:

    It seems that the text can use cleanup: 0% (charged) should be 0% charged without the parentheses, or maybe even 0% charged (empty).

    As for the redundant percentage: it might be worthwhile to show a gauge in the battery to display charge status.

    • sebas says:

      The text indicates the charging state and is unrelated to the percentage. 0% (charged) means that the battery won’t go higher than 0%, 98% (charging) means that the battery is still being charged.

  25. Bananeweizen says:

    I may be wrong with this, since I’m not a KDE user, but I believe that the KDE dialogs use left alignment for labels. So your center aligned labels do not stay in line with other dialogs. Center alignment is mainly found on the Mac.

    Please have a look at the Human Interface Guidelines for KDE to judge things like that instead of letting your blog readers vote about every aspect of the dialog.

  26. Janez says:

    Very nice work on dialog but the remaining polish missing is the battery icon. I think that the yellow flash next to battery needs to go away. The icon with only battery is understandable enough and yellow flash only uses too much horizontal space and adds nothing of substance. Visual artists please reconsider the icon.

    • sebas says:

      The yellow flash indicates that the power adaptor is plugged in.

      • Fri13 says:

        Yes and it is a good indicatior. But it’s position is not good. The battery size always stays same. So when you add the widget to the panel, it has lots of empty space on left side. Only because you need the flash when you have the AC connected.

        What I would suggest more for the Oxygen/Air styles, is that the battery icon bars get changed by color. Like green when running in battery and yellow when recharing.

        Of course I could make similar widget myself and just use it (and share it trough kde-looks) but this just would be better for the default KDE plasma desktop installation

  27. dcrabs says:

    Well, for me it looks a bit worse than the first design even though it follows some FormLayout. The old one looked more even. It appeals kind of restless for my eyes. Not that I don’t appreciate the work! But I like the latest version better than the one before. Isn’t it possible to add icons instead of text for “Screen Brightness” and “Power Profile”? That would make it more consistent with the buttons/icons for “Sleep” and “Hibernate” and at the same time narrower.

  28. Fri13 says:

    Now it looks much better than the current one. I would polish the sleep/hibernation buttons position or size. I would make the to use whole width so they are separated from middle. And I would think the “Hibernate to RAM/DISK” thing twice. I like more about the “sleep” and “hibernate” but it would mean we need to change that on the KickOff to correct one. Even they are more informative, but normal user does not know what is “RAM” and what is “DISK”. On Unix-likes OS’s like LInux, we do not have actually way to show drives like NT. But we only show as such the removable medias.

    So what if KickOff would get “fixed”?

  29. seele says:

    Nice improvements, but three comments/questions:

    * Regarding the AC adapter status, you might want to consider bolding the data rather than the label. There has been some research to show that bolding self explanatory data (”Plugged In” is pretty self explanatory) increases comprehension over bolding the data label.

    * The screen brightness widget does not have redundancy (i.e. it doesnt have a text label stating what percent the bar is at). Are there any accessibility issues with this?

    * Does the configure button still lead to opening the PM UI, or does it specifically open to the PM profiles page? By changing the location, you imply a relationship with the power profile data where before it was independent and implied a general link to the PM UI

  30. cosmocat says:

    Good work but I use this post to ask something…

    Is it possible to add the functionality to modify the screen brightness just by scrolling the mouse button while the mouse pointer is just over the battery applet (like it’s done with the kmix panel icon)?

    It would be great (especially because my brightness fn-keys didn’t work)!!

  31. Kap4Lin says:

    Do, change the icon on a desktop (non-battery) setup. I do understand that this is a “battery” applet, but I find the “Power profile” very useful in on a desktop as well, where there are no batteries. So, change the icon to, say, a power cord, when in a desktop environment.