Search result pane: Make the history combo box more present

By adding a title, and a left border.

Change-Id: Id8a577c9011c7a7282f5b540e94e8f809481b6fa
Task-number: QTCREATORBUG-9104
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
Eike Ziller
2014-07-14 16:19:40 +02:00
parent c3d10509b9
commit 24be584077
2 changed files with 25 additions and 8 deletions

View File

@@ -923,17 +923,25 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
bool isEmpty = cb->currentText.isEmpty() && cb->currentIcon.isNull();
bool reverse = option->direction == Qt::RightToLeft;
bool drawborder = !(widget && widget->property("hideborder").toBool());
bool drawleftborder = (widget && widget->property("drawleftborder").toBool());
bool alignarrow = !(widget && widget->property("alignarrow").toBool());
if (drawborder)
if (drawborder) {
drawButtonSeparator(painter, rect, reverse);
if (drawleftborder)
drawButtonSeparator(painter, rect.adjusted(0, 0, -rect.width() + 2, 0), reverse);
}
QStyleOption toolbutton = *option;
if (isEmpty)
toolbutton.state &= ~(State_Enabled | State_Sunken);
painter->save();
if (drawborder)
painter->setClipRect(toolbutton.rect.adjusted(0, 0, -2, 0));
if (drawborder) {
int leftClipAdjust = 0;
if (drawleftborder)
leftClipAdjust = 2;
painter->setClipRect(toolbutton.rect.adjusted(leftClipAdjust, 0, -2, 0));
}
drawPrimitive(PE_PanelButtonTool, &toolbutton, painter, widget);
painter->restore();
// Draw arrow