Skip to content

TODO replace with new code in PE_IndicatorToolBarSeparator #16

@JulienMaille

Description

@JulienMaille

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions