My latest patch for KDE was purely cosmetic, but it was to a key component: the system file manager, known as Dolphin.
A user reported that, when increasing the system font size, the icons would lose their horizontal centering. It’s not a huge deal, but KDE takes a lot of pride in producing a professional product. In fact, my mentor is a user interface/user experience guy, so these kinds of things get his attention.
It was a small task, but Dolphin is a large project. The whole package is spread over 426 files and an estimated 36,992 lines of source code*
Before patching, the icons got stuck to the top boundary of their rows:
This was only evident when the font size rendered larger than the icon size. It went unnoticed for ages, until an astute user reported the issue.
I reworked the Y position for the icons, basing it off the centerline of the text. Previously, the Y calculation was a wonky combination of the icon height and the padding around rows. It didn’t work properly, at least not under all conditions.
With my change, everything stays centered:
Special thanks to the original author – or maybe a subsequent maintainer – for writing in the debugging code that draws those frames around the items.
Naturally, that’s not the normal view:
It came in very handy for checking the alignment.
My patch is still in for review. It’s very minor (what KDE calls a “junior job”), but it’s how new contributors get exposed to the products and how they’re created and maintained. Reported bugs or feature requests that are limited in scope or scale get flagged as junior jobs, ideal for newcomers to practice on. I’ve done a handful of them now. But it’s only recently that I’ve gained the confidence to attempt surgery on major components of the system, as opposed to an isolated application. Even if my fix is approved, it won’t see the light of day for several months. KDE also follows a strict release schedule. Hell, this wide-ranging global free software project is better organized than some multinational corporations I’ve worked for. And they’re sufficiently confident in their review processes that they let “just anyone” take a crack at fixing problems.
I’ve still got ground to cover before they’ll grant me a developer account, which would allow me to publish changes myself. But the more small things I fix, the more experience I’ll gain. I think this was straightforward in the end; the hardest part was finding the two lines of code that needed adjusting.
And I think I accomplished it without causing any damage to a key system component.
*calculated with David A. Wheeler’s “SLOCCount” tool