summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Iacovitti <aiacovitti@libero.it>2012-05-25 17:48:28 (GMT)
committerAndrea Iacovitti <aiacovitti@libero.it>2012-05-25 17:48:28 (GMT)
commitb83af04037d2288e2242dfae5f4c7f8877de214e (patch)
tree52401345d4bb62a0bd9e265743e4fc39c5a32b8b
parent38ee1c13b5670458a7208be6822ec8fe5d68ed73 (diff)
Styled combobox: push effect on drop-down arrow.
FIXED-IN: 4.8.4
-rw-r--r--khtml/rendering/render_form.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index d49324f..f6a5f55 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -132,6 +132,7 @@ using namespace DOM;
// Need to expand a bit for some styles
comboOpt.rect.adjust(-1, -2, 1, 2);
comboOpt.rect.translate(-1, 0);
+ comboOpt.state &= ~State_On;
}
return style()->drawControl(element, &comboOpt, painter, widget);
}
@@ -154,6 +155,8 @@ using namespace DOM;
// Drop down indicator
painter->setBrush(enabled ? QBrush(color, Qt::SolidPattern) : Qt::NoBrush);
QRect arrowRect = style()->subControlRect(cc, opt, SC_ComboBoxArrow, widget);
+ if (enabled && (cbOpt->state & State_On))
+ arrowRect.translate(1, 1); // push effect
const int arrowDown[] = { 5,-2, 0,3, -5,-2, -4,-3, -3,-3, 0,0, 3,-3, 4,-3 };
QPolygon a(8);
a.setPoints(8, arrowDown);