oclero / qlementine

⚠️🏗️ [WORK IN PROGRESS] 🍊Modern QStyle for desktop Qt6 applications.
https://oclero.github.io/qlementine/
MIT License
73 stars 16 forks source link

Question: FontUtils - DPI and pixel conversion usage? #60

Closed riferg206 closed 1 month ago

riferg206 commented 1 month ago

Ran across this in FontUtils: https://github.com/oclero/qlementine/blob/03573b5a4c8545e3a37ab8331a7d5f5d38ac0639/lib/src/utils/FontUtils.cpp#L7

I'm not sure this is being used, since it looks like the two functions that use STANDARD_DPI aren't referenced anywhere outside of this file.

Elsewhere, it looks like we're just using the system-reported DPI and using that. Does FontUtils get any use outside of the textWidth function? If not, I would hazard that any hardcoded DPI constants should be removed in favor of just using whatever value the OS returns.

oclero commented 1 month ago

The library is absolutely not finished at all and lots of code is still there for historical reasons and might be removed. I haven't cleaned the code yet. Someday the lib will a proper first release if I find the time...

riferg206 commented 1 month ago

Got it. TY for the explanation!