OpenHantek / OpenHantek6022

OpenHantek6022 is a DSO software for Hantek USB digital signal oscilloscopes 6022BE / BL. Development OS is Debian Linux, but the program also works on FreeBSD, MacOS, RaspberryPi and Windows. No support for non-Linux related issues unless a volunteer steps in!
GNU General Public License v3.0
867 stars 152 forks source link

High dpi support #78

Closed DavidRisch closed 4 years ago

DavidRisch commented 4 years ago

Currently the needle of the slider used to set the trigger level has a hard coded width of 7px. When using the program on a 4k screen with 200% scaling the vast majority of the programm works/looks as expected. But the needle does not scale at all, it is tiny and difficult to click. The needle width now depends on fontMetrics().height() which scales correctly.

@Ho-Ro: It seems like many of the files in this repo are not formatted according to openhantek/.clang-format. Commit fb7b56e is the result of clang-format -style file -i src/dsowidget.cpp src/widgets/levelslider.cpp src/widgets/levelslider.h on the current master. Maybe you can make one commit which correctly formats all files? That would help in keeping other pull requests small.

Ho-Ro commented 4 years ago

Thx, looks good, implemented with 8a71b07. I've activated automatic clang-format on save in qtcreator to keep the format consistent between edits.

DavidRisch commented 4 years ago

Thanks for maintaining this project!

Is the a reason why you merge in such a non standard way? (by manually copying commits) This leads to some annoying problems:

DavidRisch commented 4 years ago

Thanks!

Ho-Ro commented 4 years ago

Sorry, after successfully testing your PR (with some editing to check how it works) I've just copied over your clean code and pushed it - sometimes it's better not to work in hurry :)