Preview scales to show whole image.

This commit is contained in:
hooper114 2009-04-28 07:22:46 +00:00
parent 8a5b33a9cb
commit d3171b2c31
2 changed files with 11 additions and 6 deletions

View File

@ -228,7 +228,7 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
qreal gheight=m_zintSymbol->height;
if (m_zintSymbol->symbology == BARCODE_MAXICODE)
{
gheight*=(maxi_width+1);
gheight*=(maxi_width);
gwidth*=(maxi_width+1);
}
@ -246,7 +246,7 @@ void QZint::render(QPainter & painter, const QRectF & paintRect, AspectRatioMode
break;
case KeepAspectRatio:
if (paintRect.width()-gwidth<paintRect.height()-gheight)
if (paintRect.width()/gwidth<paintRect.height()/gheight)
{
ysf=xsf=(qreal)paintRect.width()/gwidth;
ytr+=(qreal)(paintRect.height()-gheight*ysf)/2;

View File

@ -223,10 +223,6 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<zorder>txtComposite</zorder>
<zorder>lblComposite</zorder>
<zorder>layoutWidget</zorder>
<zorder>grpMaxiCode</zorder>
</widget>
<widget class="QGroupBox" name="grpMaxiCode" >
<property name="geometry" >
@ -287,6 +283,9 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
<widget class="QLabel" name="lblMaxiPrimary" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="geometry" >
<rect>
<x>9</x>
@ -300,6 +299,9 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
<widget class="QLineEdit" name="txtMaxiPrimary" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="geometry" >
<rect>
<x>107</x>
@ -308,6 +310,9 @@ p, li { white-space: pre-wrap; }
<height>22</height>
</rect>
</property>
<property name="text" >
<string>Primary Data Here!</string>
</property>
</widget>
</widget>
</widget>