andrew-bibb / cmst

QT GUI for Connman
174 stars 37 forks source link

controlBox: Correct dialog size on HiDPI monitors #184

Closed projectgus closed 6 years ago

projectgus commented 6 years ago

Hi,

Thanks for cmst, I've been using it for a while now and it's super useful.

Since getting a HiDPI display I've noticed that although Qt5 correctly scales widgets, layout, etc, the default dialog size stays the same. This requires a manual resize the first time cmst is opened, in order to see all the controls.

It seems sizeHint() correctly accounts for different DPI values so this PR changes the main dialog to always resize to sizeHint() in the constructor. I don't think this will make any difference to the dialog size on standard DPI displays, although I haven't tested on one.

Cheers,

Angus

andrew-bibb commented 6 years ago

Thank you for this. I am actually getting on a plane tonight and will be out of the country until the end of the month. I (hopefully) will be able to review and merge it first weekend in May when I'm back. Just wanted to let you know that when nothing seems to be happening, that is the reason.

A-

projectgus commented 6 years ago

No problems!

andrew-bibb commented 6 years ago

Just checked it and does not seem to break my non-hdmi display so I merged it.

Sorry it took so long and thank you for submitting it.

projectgus commented 6 years ago

No worries, much appreciated. :)