The mystery of the misaligned window widgets

This is a bit of a weird topic, but I think it might be interesting to figure out what, exactly, is going on here. Ever since its very first release Chrome has had a very small, barely noticeable visual bug in its user interface: its window widgets (or buttons) are not aligned properly. As you can see in the screenshot below, they are shifted slightly to the right compared to a window without the bug.



Now, this has never been too big of an annoyance to bother the developers with, so I never made a bug report out of it, and I still don’t think it’s important enough. Chrome has a custom titlebar compared to regular Windows windows (because of the tabs-on-top), so I figured that was the cause.

Since yesterday, I’ve been using Firefox 29, and I noticed that it has the exact same bug:



Now my interest is properly piqued. Upon closer inspection, you can see that Chrome and Firefox actually have different offsets. The below image also illustrates that in the normal situation, the right edge of the close widget lines up pixel-perfect with the content area (the red line); this is not the case for Chrome and Firefox, where the close widget and content are misaligned.



These are two different applications with two entirely different codebases, and yet, they have the same visual bug, albeit slightly different in presentation. For some reason, this fascinates me; is it a limitation in how Windows handles custom titlebars? Is it, perhaps, a feature, and is there a deeper reasoning behind it? Is it just sloppiness? Do we have any Windows developers here who could possibly shed a light on this?

Some will call this petty whining, and surely, it is. However, I’m not asking this because I’m bothered by it; I’m asking this because I’m genuinely curious where this bug comes from.

52 Comments

  1. 2014-05-01 11:42 pm
  2. 2014-05-02 12:05 am
    • 2014-05-02 12:16 am
      • 2014-05-02 12:38 am
        • 2014-05-02 1:30 am
          • 2014-05-02 1:36 am
        • 2014-05-02 12:40 pm
          • 2014-05-06 5:11 pm
        • 2014-05-02 5:40 pm
          • 2014-05-02 6:32 pm
          • 2014-05-02 8:35 pm
        • 2014-05-04 12:11 pm
  3. 2014-05-02 12:36 am
    • 2014-05-02 11:01 am
      • 2014-05-02 12:25 pm
      • 2014-05-02 12:47 pm
        • 2014-05-02 4:30 pm
          • 2014-05-02 7:46 pm
      • 2014-05-02 5:49 pm
        • 2014-05-02 7:36 pm
          • 2014-05-03 11:27 pm
          • 2014-05-04 3:15 pm
          • 2014-05-08 7:30 am
  4. 2014-05-02 1:05 am
    • 2014-05-02 11:47 am
    • 2014-05-02 2:37 pm
  5. 2014-05-02 1:56 am
  6. 2014-05-02 1:56 am
    • 2014-05-02 2:09 am
      • 2014-05-02 3:06 am
        • 2014-05-02 3:50 am
        • 2014-05-03 7:41 am
      • 2014-05-02 11:37 am
        • 2014-05-04 4:28 pm
          • 2014-05-04 4:30 pm
    • 2014-05-04 4:17 pm
      • 2014-05-04 4:24 pm
      • 2014-05-04 4:28 pm
  7. 2014-05-02 3:00 am
  8. 2014-05-02 5:37 am
  9. 2014-05-02 11:08 am
    • 2014-05-02 11:23 am
  10. 2014-05-02 11:29 am
    • 2014-05-02 1:25 pm
    • 2014-05-02 3:43 pm
    • 2014-05-02 10:27 pm
  11. 2014-05-02 6:12 pm
  12. 2014-05-02 8:21 pm
  13. 2014-05-04 3:48 pm
  14. 2014-05-04 4:10 pm
  15. 2014-05-04 9:53 pm
    • 2014-05-04 10:28 pm