|
case PE_IndicatorToolBarSeparator: { |
|
QRect r = option->rect; |
|
if (option->state & State_Horizontal) { |
|
if (r.height() >= 10) |
|
r.adjust(0, 3, 0, -3); |
|
r.setWidth(r.width() / 2 + 1); |
|
Ph::fillRectEdges(painter, r, Qt::RightEdge, 1, |
|
swatch.color(S_window_divider)); |
|
} else { |
|
// TODO replace with new code |
Regarding the TODO, do you mean you would like the else to be coded like the first branch of the if, like this?
case PE_IndicatorToolBarSeparator: {
QRect r = option->rect;
if (option->state & State_Horizontal) {
if (r.height() >= 10)
r.adjust(0, 3, 0, -3);
r.setWidth(r.width() / 2 + 1);
Ph::fillRectEdges(painter, r, Qt::RightEdge, 1,
swatch.color(S_window_divider));
} else {
if (r.width() >= 10)
r.adjust(3, 0, -3, 0);
r.setHeight(r.height() / 2 + 1);
Ph::fillRectEdges(painter, r, Qt::BottomEdge, 1,
swatch.color(S_window_divider));
}
break;
phantomstyle/src/phantom/phantomstyle.cpp
Lines 1646 to 1655 in 6e9580b
Regarding the TODO, do you mean you would like the
elseto be coded like the first branch of theif, like this?