Skip to content

Commit

Permalink
Overview Data Table tweaks
Browse files Browse the repository at this point in the history
.. honour the sort order when refreshing (e.g. select new daterange or
   a new activity).

.. thin line to separate headings from data to make easier to read.
  • Loading branch information
liversedge committed Aug 7, 2021
1 parent abdce42 commit 29a7677
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Charts/OverviewItems.cpp
Expand Up @@ -1011,6 +1011,9 @@ DataOverviewItem::postProcess()
columnWidths << maxwidth;
}
}

// keep the same sorting...
if (lastsort != -1) sort(lastsort, lastorder);
}

void
Expand Down Expand Up @@ -2717,6 +2720,11 @@ DataOverviewItem::itemPaint(QPainter *painter, const QStyleOptionGraphicsItem *,
xoffset += columnWidths[i] + hspace;
}

// separator for heading from data
painter->setPen(QPen(cnormal, 1, Qt::SolidLine, Qt::RoundCap));
painter->drawLine(paintarea.topLeft() + QPointF(0, lineheight * 2.2),
paintarea.topRight() + QPointF(0, lineheight * 2.2));

// data values
xoffset = hmargin;

Expand Down

0 comments on commit 29a7677

Please sign in to comment.