Changeset View
Changeset View
Standalone View
Standalone View
kcms/kfontinst/viewpart/FontPreview.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 121 | { | |||
---|---|---|---|---|---|
123 | 123 | | |||
124 | paint.fillRect(rect(), palette().base()); | 124 | paint.fillRect(rect(), palette().base()); | ||
125 | if(!itsImage.isNull()) | 125 | if(!itsImage.isNull()) | ||
126 | { | 126 | { | ||
127 | 127 | | |||
128 | if(abs(width()-itsLastWidth)>constStepSize || abs(height()-itsLastHeight)>constStepSize) | 128 | if(abs(width()-itsLastWidth)>constStepSize || abs(height()-itsLastHeight)>constStepSize) | ||
129 | showFont(); | 129 | showFont(); | ||
130 | else | 130 | else | ||
131 | paint.drawImage(QPoint(constBorder, constBorder), itsImage, | 131 | paint.drawImage(QPointF(constBorder, constBorder), itsImage, | ||
132 | QRect(0, 0, width()-(constBorder*2) * itsImage.devicePixelRatioF(), | 132 | QRectF(0, 0, (width()-(constBorder*2)) * itsImage.devicePixelRatioF(), | ||
133 | height()-(constBorder*2) * itsImage.devicePixelRatioF())); | 133 | (height()-(constBorder*2)) * itsImage.devicePixelRatioF())); | ||
134 | } | 134 | } | ||
135 | } | 135 | } | ||
136 | 136 | | |||
137 | void CFontPreview::mouseMoveEvent(QMouseEvent *event) | 137 | void CFontPreview::mouseMoveEvent(QMouseEvent *event) | ||
138 | { | 138 | { | ||
139 | if(!itsChars.isEmpty()) | 139 | if(!itsChars.isEmpty()) | ||
140 | { | 140 | { | ||
141 | QList<CFcEngine::TChar>::ConstIterator end(itsChars.end()); | 141 | QList<CFcEngine::TChar>::ConstIterator end(itsChars.end()); | ||
Show All 37 Lines |