Author Topic: PJSR ComboBox clipping  (Read 5393 times)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
PJSR ComboBox clipping
« on: 2013 April 03 19:21:42 »
In 1.8RC5, Win 7, I sometimes see small clipping on the left side of ComboBox values. See the attached pic.
Mike

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PJSR ComboBox clipping
« Reply #1 on: 2013 April 17 16:48:20 »
H Juan,
I still see clippng in RC6 Win7. (Note the clipped "8" in the image above.)
Mike

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PJSR ComboBox clipping
« Reply #2 on: 2013 April 17 16:51:01 »
This is weird. I cannot reproduce it on Windows 7 and 8. Have you customized font settings? Can you send me the source code for that dialog, so I can try to reproduce the problem?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PJSR ComboBox clipping
« Reply #4 on: 2013 April 17 17:05:31 »
I don't see anything problematic. As a workaround, you can add white spaces at the beginning and end of each combo box item:

Code: [Select]
   this.backgroundPercentileLabels = new Array(
      " 1st ",
      " 2nd ",
      " 5th ",
      " 10th ",
      " 20th ",
      " 50th ",
      " 100th "
   );
   this.backgroundCycleSpinsLabels = new Array(
      " 1 ",
      " 2 ",
      " 4 ",
      " 8 "
   );

An ugly solution but should work. Tomorrow I'll check this script on our Windows machines to see if I can find the cause of this problem. Sorry for the inconvenience.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: PJSR ComboBox clipping
« Reply #5 on: 2013 April 17 17:07:01 »
OK thank you!

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: PJSR ComboBox clipping
« Reply #6 on: 2013 April 18 02:24:13 »
This happens also with my scripts. I use Win7 x64 with default font sizes (dpi=96).

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PJSR ComboBox clipping
« Reply #7 on: 2013 April 22 11:35:22 »
I have reproduced and investigated this problem on Windows. The problem is the Segoe UI font, which the default PixInsight style sheet uses on all supported versions of Windows. Unfortunately, the numerals in this font are rendered with a strange left displacement, something like a negative kerning, which causes this two-pixel clipping. This might be a Qt font rendering problem. There's no way to fix this with CSS code, since it has nothing to do with margin properties, and the clipping occurs 'behind' the left padding, so changing the padding only moves the text but doesn't fix the clipping.

I am considering using a different font for the Windows versions of PixInsight. A good candidate would be Verdana. Another possibility, probably more robust, would be including a custom font in the PixInsight distribution, just as we have now Deja Vu Sans on all platforms. Unfortunately, Deja Vu has some rendering problems on Windows that make it a poor choice for the whole GUI.

In the meanwhile, I think that adding a space at the beginning of each combo box item is the best solution. Note that this is only necessary if the combo box items start with a decimal digit character.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/