Bug 394971

Summary: Axis line width increases unintentionally, when "Edit Multiple" is used with high screen resolution
Product: [Applications] kst Reporter: manumail
Component: plottingAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0.8   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description manumail 2018-06-02 21:23:38 UTC
What I did:
- start kst, maximize the window on a high resolution screen (for example 3200 x 1800)
- create a plot and open the "Edit Plot Item" dialog, click "Edit Multiple"
- select the plot on the right and click "Apply"

What I expected to happen:
- the plot should be redrawn as it was

What happened instead:
- plot gets redrawn with increased axis line width

It took me some hours of debugging to find that line of code, but finally.. the reason for the increase is the line width scaling in method
double Curve::lineDim(const QRectF &R, double linewidth) {
qreal lw = qMax(qreal(1.01), qreal(linewidth) * (R.width()+R.height())*qreal(1.0/2000.0));

The new width is calculated as a product of the old width and a fraction of some rectangle dimensions. If the window size is large enough, the second factor gets large enough to increase the width with every rescaling. I recommend not to use the old width as a factor.
Comment 1 Netterfield 2018-09-21 14:03:15 UTC
Git commit b7475ab191905348d757279bec841b658157a341 by Barth Netterfield.
Committed on 21/09/2018 at 14:01.
Pushed by netterfield into branch 'master'.

Used storedPen not Pen for dialogs.

M  +0    -21   devel-docs/BugsAndFeatures
M  +2    -2    src/libkstapp/viewitemdialog.cpp

https://commits.kde.org/kst-plot/b7475ab191905348d757279bec841b658157a341