06-24-2018, 04:07 PM
Is there something specific that may cause an image to be displayed at a reduced size?
I have a grouping of several buttons containing images within a panel. Two of the images are 28x25 px and two are 28x20. On a Retina Display Mac, the larger images (2x, 56x50) appear to be reduced to about half the size they should be. The smaller images display correctly. All images display correctly on a high-res Windows display, as well as lower res on both platforms. All buttons are defined like this:
I ran a test to confirm that the Retina Mac was indeed pulling in the 2x image, and it was. Making the button size slightly larger didn't help. All images are 8-bit RGB PNG saved from Photoshop CC.
Any suggestions would be much appreciated. If you feel it may be a bug, I'd be happy to send the images and all relevant code snippets.
I have a grouping of several buttons containing images within a panel. Two of the images are 28x25 px and two are 28x20. On a Retina Display Mac, the larger images (2x, 56x50) appear to be reduced to about half the size they should be. The smaller images display correctly. All images display correctly on a high-res Windows display, as well as lower res on both platforms. All buttons are defined like this:
Code:
this->LeftBtn = hdi::core::Button(hdi::core::Rect(marginWidth, vMarker, 28, 25), hdi::core::ImageWithRolloverIDs(AT_Left_PNGI_RSRC_ID,
AT_Left_3TO2X_PNGI_RSRC_ID,
AT_Left_2X_PNGI_RSRC_ID,
AT_Left_DARK_PNGI_RSRC_ID,
AT_Left_3TO2X_DARK_PNGI_RSRC_ID,
AT_Left_2X_DARK_PNGI_RSRC_ID));
this->LeftBtn.setStyle(hdi::core::Button::NormalStyle);
this->LeftBtn.setEnabled(true);
this->LeftBtn.setBackgroundRollover(true);
this->LeftBtn.setClickCallback(HDI_CORE_CALLBACK(azzo::Plugin, this, __btnLeftCB));
this->LeftBtn.setDoubleClickCallback(HDI_CORE_CALLBACK(azzo::Plugin, this, __btnLeftCB));
this->__docPanel.addWidget(this->LeftBtn);
this->widgGrp.add(LeftBtn);
I ran a test to confirm that the Retina Mac was indeed pulling in the 2x image, and it was. Making the button size slightly larger didn't help. All images are 8-bit RGB PNG saved from Photoshop CC.
Any suggestions would be much appreciated. If you feel it may be a bug, I'd be happy to send the images and all relevant code snippets.