summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp14
-rw-r--r--src/gui/styles/qs60style_p.h9
-rw-r--r--src/gui/styles/qs60style_s60.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp3
4 files changed, 13 insertions, 15 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index ecb3242..78279d1 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -985,7 +985,7 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
//Handle graphics
const QRect sliderHandle = subControlRect(control, optionSlider, SC_SliderHandle, widget);
QS60StylePrivate::SkinElements handleElement;
- if (optionSlider->state & QStyle::State_Sunken)
+ if (optionSlider->state & State_Sunken)
handleElement =
horizontal ? QS60StylePrivate::SE_SliderHandleSelectedHorizontal : QS60StylePrivate::SE_SliderHandleSelectedVertical;
else
@@ -2620,29 +2620,31 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
// lets use spinbox frame here as well, as no combobox specific value available.
const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0;
const int buttonWidth = qMax(cmb->rect.height(), buttonIconSize);
- const int xposMod = (cmb->rect.x()) + width - buttonMargin - buttonWidth;
- const int ypos = cmb->rect.y();
QSize buttonSize;
buttonSize.setWidth(buttonWidth + 2 * buttonMargin);
buttonSize.setHeight(qMax(8, (cmb->rect.height() >> 1) - frameThickness)); //buttons should be squares
buttonSize = buttonSize.expandedTo(QApplication::globalStrut());
switch (scontrol) {
- case SC_ComboBoxArrow:
+ case SC_ComboBoxArrow: {
+ const int xposMod = cmb->rect.x() + width - buttonMargin - buttonWidth;
+ const int ypos = cmb->rect.y();
ret.setRect(xposMod, ypos + buttonMargin, buttonWidth, height - 2 * buttonMargin);
+ }
break;
case SC_ComboBoxEditField: {
- const int withFrameX = cmb->rect.x() + cmb->rect.width() - frameThickness - buttonSize.width();
+ const int withFrameX = cmb->rect.x() + width - frameThickness - buttonSize.width();
ret = QRect(
frameThickness,
frameThickness,
withFrameX - frameThickness,
- cmb->rect.height() - 2 * frameThickness);
+ height - 2 * frameThickness);
}
break;
default:
break;
}
+ ret = visualRect(cmb->direction, cmb->rect, ret);
}
break;
case CC_GroupBox:
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 2cd238f..eae2291 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -74,7 +74,6 @@ typedef struct {
unsigned short width;
int major_version;
int minor_version;
- bool mirroring; // TODO: (nice to have) Use Qt::LayoutDirection
const char* layoutName;
} layoutHeader;
@@ -353,12 +352,12 @@ public:
int timerId() const {return m_currentData->m_timerId;}
int currentFrame() const {return m_currentData->m_currentFrame;}
- void setFrameCount(const int &frameCount) {m_currentData->m_frames = frameCount;}
- void setInterval(const int &interval) {m_currentData->m_interval = interval;}
+ void setFrameCount(int frameCount) {m_currentData->m_frames = frameCount;}
+ void setInterval(int interval) {m_currentData->m_interval = interval;}
void setAnimationObject(CAknBitmapAnimation* animation);
void setResourceBased(bool resourceBased) {m_currentData->m_resourceBased = resourceBased;}
- void setTimerId(const int &timerId) {m_currentData->m_timerId = timerId;}
- void setCurrentFrame(const int &currentFrame) {m_currentData->m_currentFrame = currentFrame;}
+ void setTimerId(int timerId) {m_currentData->m_timerId = timerId;}
+ void setCurrentFrame(int currentFrame) {m_currentData->m_currentFrame = currentFrame;}
void resetToDefaults();
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index a3bb169..872bc2b 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -105,7 +105,7 @@ AnimationData::AnimationData(const QS60StyleEnums::SkinParts part, int frames, i
}
AnimationDataV2::AnimationDataV2(const AnimationData &data) : AnimationData(data.m_id, data.m_frames, data.m_interval),
- m_resourceBased(false), m_animation(0), m_timerId(0)
+ m_animation(0), m_currentFrame(0), m_resourceBased(false), m_timerId(0)
{
}
AnimationDataV2::~AnimationDataV2()
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 9343cb7..c000457 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -357,9 +357,6 @@ void QFontEngine::getGlyphPositions(const QGlyphLayout &glyphs, const QTransform
++i;
}
} else {
- positions.resize(glyphs.numGlyphs);
- glyphs_out.resize(glyphs.numGlyphs);
- int i = 0;
while (i < glyphs.numGlyphs) {
if (!glyphs.attributes[i].dontPrint) {
QFixed gpos_x = xpos + glyphs.offsets[i].x;