mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
99284a88f7
commit
d0beae59f9
7 changed files with 174 additions and 272 deletions
|
|
@ -46,10 +46,9 @@ public:
|
|||
qreal posAtValue(qreal value) const;
|
||||
void setColor(const QColor &color);
|
||||
void setTextColor(const QColor &color);
|
||||
void animateChangeLine(const QLineF &newLine, int animSpeed);
|
||||
void animateChangeLine(const QRectF &rect, int animSpeed);
|
||||
void setTextVisible(bool arg1);
|
||||
void setLinesVisible(bool arg1);
|
||||
void setLineSize(qreal lineSize);
|
||||
void setLine(const QLineF& line);
|
||||
virtual void updateTicks(int animSpeed);
|
||||
double width() const; // only for vertical axes
|
||||
|
|
@ -60,6 +59,7 @@ signals:
|
|||
|
||||
protected:
|
||||
Position position;
|
||||
QRectF rect; // Rectangle to fill with grid lines
|
||||
color_index_t gridColor;
|
||||
ProfileScene &scene;
|
||||
virtual QString textForValue(double value) const;
|
||||
|
|
@ -76,7 +76,6 @@ protected:
|
|||
bool textVisibility;
|
||||
bool lineVisibility;
|
||||
double labelScale;
|
||||
qreal line_size;
|
||||
bool changed;
|
||||
double dpr;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue