Bug 407980 - kmplot expression editor with constants does not scale after setting higher value in force font dpi in system settings
Summary: kmplot expression editor with constants does not scale after setting higher v...
Status: RESOLVED FIXED
Alias: None
Product: kmplot
Classification: Applications
Component: general (show other bugs)
Version: 1.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-27 06:29 UTC by Marian Klein
Modified: 2019-05-28 15:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Klein 2019-05-27 06:29:14 UTC
SUMMARY
 
Modern HiDpi laptops/convertables need to set higher value in force fonts DPI setting. I use 288. Kmplot does not display expression editor correctly for hi dpi setting.


STEPS TO REPRODUCE
1. use HiDPI laptop with resolution at least 3200x1800. I use HP spectre x360 convertible with resolution 3840x2160. Set the highest resolution of the laptop.
2. use neon-developer-20190514-0001.iso, update packages (as of 27may 2019)
3. set the highest resolution of the laptop and set true/genuine dpi for that resolution in force font dpi setting.  you calculate true dpi by taking horizontal resolution of the screen and divide horizontal dimension of the screen in inches . In my case 3840 / 29.5cm = 3840/11.6 inch= 330dpi

OBSERVED RESULT
kmplot expression editor , (which you get after click on the button after function line ) is totally unusable, unreadable. Fonts scale, but the widgets and window don't scale correspondingly to accommodate for bigger font and cover font letters.

EXPECTED RESULT
Readable editor.

SOFTWARE/OS VERSIONS
I used neon-developer-20190514-0001.iso
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.0
Kernel Version: 5.0.0-15-lowlatency
OS Type: 64-bit
Processor: 1 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 3.9 GiB of RAM

ADDITIONAL INFORMATION
Used inside virtualbox6 for testing.
Comment 1 Christoph Feck 2019-05-27 11:31:43 UTC
Regression caused by https://commits.kde.org/kmplot/dec0c43306277851853341b676c701bcc83e6c52

KDialog had its own layout, and when porting to QDialog, a layout needs to be added, see e.g. https://commits.kde.org/kolourpaint/57ced24037f14f0968a50d7ac08aa2e63db446f8

From quickly checking, also the constants editor and all dialogs from Tools menu are affected, possibly more.
Comment 2 Yuri Chornoivan 2019-05-28 15:13:54 UTC
Git commit 95f701c92c17b2c7d6da2b176ba7129514b08322 by Yuri Chornoivan.
Committed on 28/05/2019 at 15:13.
Pushed by yurchor into branch 'Applications/19.04'.

Use layouts for QDialogs to make KmPlot adopt the sizes

Summary:
As it was pointed out "KDialog had its own layout, and when porting to QDialog, a layout needs to be added"

Test Plan:
1. Open KmPlot, choose "Catesian Plot".
2. Enter something (e.g. "x^2").
3. Click on the Equation Editor button at the right of the input field.
4. Try to resize the window (all interface items are movable now).
5. Press the Constant Editor button.
6. Try to resize the window (all interface items are movable now).
7. Close the windows.
8. Try to choose any item from the "Tools" menu.
9. Try to resize the window (all interface items should be movable).

Reviewers: #kde_edu, cfeck

Reviewed By: cfeck

Subscribers: kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D21428

M  +2    -3    kmplot/calculator.cpp
M  +3    -1    kmplot/equationeditor.cpp
M  +3    -4    kmplot/functiontools.cpp
M  +3    -1    kmplot/kconstanteditor.cpp
M  +1    -1    kmplot/kgradientdialog.cpp
M  +3    -5    kmplot/ksliderwindow.cpp
M  +4    -1    kmplot/parameteranimator.cpp

https://commits.kde.org/kmplot/95f701c92c17b2c7d6da2b176ba7129514b08322