profile: start with "absolutizing" the profile layout

The chart items were laid out in relative terms with respect
to a fixed scene size (100.0, 100.0). This simply does not
cut it when resizing the chart. Why should the axes always
occupy the same fraction of the chart independent of the size.

Moreover, this led to basically unmaintainable code.

Resize the scene according to the viewport and do
absolute placement of the items. This breaks the layout,
but at least now we have a chance to fix things
somewhat reasonably.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-08-28 23:36:09 +02:00 committed by Dirk Hohndel
parent 99284a88f7
commit d0beae59f9
7 changed files with 174 additions and 272 deletions

View file

@ -39,6 +39,7 @@ public:
ProfileScene(double dpr, bool printMode, bool isGrayscale);
~ProfileScene();
void resize(QSizeF size);
void updateAxes(bool instant); // Update axes according to preferences
void clear();
bool isPointOutOfBoundaries(const QPointF &point) const;