andrew-bibb / cmst

QT GUI for Connman
173 stars 37 forks source link

Fix tray icon on HiDPI displays #301

Closed iDarkTemplar closed 9 months ago

iDarkTemplar commented 10 months ago

Qt icons use scaling factor. When new icon is created, default scaling factor 1 is set. If display has scaling factor 2, source image also has scaling factor 2. In that case when source image is rendered on destination image with scaling factor 1, resulting icon only uses 1/2 of width of icon and 1/2 of height of icon. Also copy scaling factor from source image to fix this issue.