SilverpointDev / sptbxlib

SpTBXLib is an expansion package for TB2K Delphi components that adds multiple features including support for styles and custom skins.
https://www.silverpointdevelopment.com
Other
73 stars 33 forks source link

Incorrect width sizing of TSpTBXDockablePanel when high DPI and restoring position at app startup? #60

Closed AlbertWiersch closed 3 years ago

AlbertWiersch commented 3 years ago

I've spent a few hours trying to figure out why the width of one of my TSpTBXDockablePanels (which is docked) doesn't restore properly when starting my app when the main form opens on a high DPI monitor. When it opens on a standard DPI monitor, the width is correctly restored time after time... but when my app opens on a high DPI monitor, the width is significantly reduced and the width because too narrow compared to when it was saved at the last shutdown (with SpTBRegSavePositions()).

I've watched the "ClientWidth" registry entry where the width is saved and the values seem to adjust properly based on DPI, but ClientWidth does not seemed to be honored when the app opens on a high DPI monitor.

I could not find any issue in my own code that might be causing this. Could this be an sptbxlib issue with high DPI?

SilverpointDev commented 3 years ago

Fixed in latest. Make sure you repatch TB2K, I've made some changes to TB2K sources