Twitter github

Pushing Pixels

Can you see what’s wrong with this picture? Most people can’t. Only a few people like Kevin McGuire who like to nitpick and subscribe to the religion of color can spot the problem quickly. I call these people pixel pushers. In my opinion, these are the people that make Eclipse look good due to their attention to detail.

Now getting back to what’s wrong, here’s a hint:

Oh my eyes! When I saw this it hit me like a ton of bricks and I had to fix it immediately.

Why does this happen? Well, there’s the unfortunate situation when Eclipse Forms sections are given text clients with things like toolbar managers to add cool icons. This results in text clients taller than their title text so things grow accordingly causing adjacent sections to possibly not align. If you would like to learn more about this problem, check out this unpublished article on some new things in Eclipse Forms 3.3 by one of my favorite people in Toronto, Adam Archer.

Here’s how it should look like:

Ah, much better!

What’s the fix? Align adjacent sections using the text client height difference:

section2.descriptionVerticalSpacing = section1.getTextClientHeightDifference();

Does this make me a pixel pusher too?

  • Ed Merks

    Chris, you definitely suffer from a debilitating mental illness that is likely to get worse over time. Of course the first step is admitting you have a problem, but I’m afraid you still see it as a virtue. There in lies the danger of this illness.

    It brings back frighten times when I learned how to owner draw everything with C++ and was unnaturally obsessed with the nuance of every pixel. I’m still recovering from those days. I’ve been told that you can never really be cured.

  • Ed Merks

    Chris, you definitely suffer from a debilitating mental illness that is likely to get worse over time. Of course the first step is admitting you have a problem, but I’m afraid you still see it as a virtue. There in lies the danger of this illness. It brings back frighten times when I learned how to owner draw everything with C++ and was unnaturally obsessed with the nuance of every pixel. I’m still recovering from those days. I’ve been told that you can never really be cured.

  • dserodio

    I wish we had “pixel pushers” making Eclipse look as good on Linux as it does on Windows.

  • dserodio

    I wish we had “pixel pushers” making Eclipse look as good on Linux as it does on Windows.

  • Chris Aniszczyk (zx)

    Well that’s not fair dserodio. I think Eclipse looks pretty good on Linux. If Linux distros didn’t insist on shipping such horrible fonts and display settings by default, Eclipse would look better. Here’s an example of a user making it look better on Linux by changing some settings.

    If there are any problems with SWT, you should file a bug report against SWT so they can address it. That’s the beauty of open-source.

  • Chris Aniszczyk (zx)

    Well that’s not fair dserodio. I think Eclipse looks pretty good on Linux. If Linux distros didn’t insist on shipping such horrible fonts and display settings by default, Eclipse would look better. Here’s an example of a user making it look better on Linux by changing some settings.If there are any problems with SWT, you should file a bug report against SWT so they can address it. That’s the beauty of open-source.

  • Scott Rosenbaum

    One of the lessons I learned developing reports a long time ago is that pushing pixels is important. It is hard to ignore your inner geek who screams out, close enough a couple of pixels here or there don’t matter.

    Your inner geek is right, it doesn’t matter at a completely rational level. Unfortunately, missing a couple of pixels here or there send a very powerful sub conscious message.
    “un-professional”
    “not finished”
    “needs more work”
    “don’t trust”

    Unfortunately, it seems like those people at the top of the org chart are much more tuned into these signals then the people doing or testing the work.

    Makes me want to start spouting all sorts of cliches about details, but I won’t.

  • Scott Rosenbaum

    One of the lessons I learned developing reports a long time ago is that pushing pixels is important. It is hard to ignore your inner geek who screams out, close enough a couple of pixels here or there don’t matter.Your inner geek is right, it doesn’t matter at a completely rational level. Unfortunately, missing a couple of pixels here or there send a very powerful sub conscious message. “un-professional” “not finished” “needs more work” “don’t trust”Unfortunately, it seems like those people at the top of the org chart are much more tuned into these signals then the people doing or testing the work. Makes me want to start spouting all sorts of cliches about details, but I won’t.

  • Simon Archer

    Here’s a lesson I learned about pushing pixels… when using SWT’s GridLayout class you’ll lose 5 pixels of width on both sides unless you explicitly set marginWidth to zero. Sometimes you need to set marginHeight to zero too. As a general rule, Eclipse UI elements should not waste margin in this way, but you see it quite a bit in third party plug-ins, especially on preference pages and dialogs.

  • Simon Archer

    Here’s a lesson I learned about pushing pixels… when using SWT’s GridLayout class you’ll lose 5 pixels of width on both sides unless you explicitly set marginWidth to zero. Sometimes you need to set marginHeight to zero too. As a general rule, Eclipse UI elements should not waste margin in this way, but you see it quite a bit in third party plug-ins, especially on preference pages and dialogs.

  • Shouldn’t this be:

    section2.descriptionVerticalSpacing += section1.getTextClientHeightDifference();

    ?

  • Shouldn’t this be:

    section2.descriptionVerticalSpacing += section1.getTextClientHeightDifference();

    ?