Author Topic: Label framestyle  (Read 5409 times)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Label framestyle
« on: 2019 November 25 19:29:54 »
Hi Juan,

Some time ago I remember you provided me this stylesheet to create a sunken label.

This works ok, but has one very minor issue on retina Mac. The label appears aligned 1px to high, so the baseline of the text within the Label ending being 1px higher than adjacent plain labeling: text to the left of the Label.

Is there a solution?

Code: [Select]
   this.addValue = function(pane, text, toolTip) {
      var value = new Label(this);
      pane.add(value);

      value.setFixedWidth(this.editWidth);
      value.text = text;
      value.toolTip = toolTip;
      value.styleSheet = this.scaledStyleSheet("QLabel {" +
         "border-top: 1px solid gray;" +
         "border-left: 1px solid gray;" +
         "border-bottom: 1px solid white;" +
         "border-right: 1px solid white;" +
         "}");

      return value;
   };

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Label framestyle
« Reply #1 on: 2019 November 26 10:18:20 »
Hi Mike,

I'm not sure if I can see the problem you are describing on our iMac 5K with macOS 10.15 and on a MacBook Pro with 10.14. Can you post a screenshot?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: Label framestyle
« Reply #2 on: 2019 November 26 10:26:57 »
Thank you. The numbers in the styled labels are shifted up ~1px in this screenshot.