pyqt-colorpicker
pyqt-colorpicker copied to clipboard
No DPI scaling
This is a useful little widget, but it is tiny in high DPI envornments.
It occurs to me that one way to deal with this might be to give an option to turn off the custom styling. This would also have the benefit of allowing users to have a consistent styling with other windows in their program using QStyleSheet.
Thanks
Hey, if you're still interested, I managed to fix it. What I did was basically multiply all the values corresponding to sizes and positions by the DPI factor in the corresponding UI files, for example ui_dark.py.

Same for the vcolorpicker.py file



Now on my 2K screen it looks good. I haven't tested on a 4K screen, but I have manually changed the DPI and it still works.
Really pleased you got it sorted and thanks for doing so. I needed to move to a custom component of my own for different reasons though.
On Wed, 26 Apr 2023, 11:19 am Lluís Vinent, @.***> wrote:
Hey, if you're still interested, I managed to fix it. What I did was basically multiply all the values corresponding to sizes and positions by the DPI factor in the corresponding UI files, for example ui_dark.py.
[image: cab349fdb4719d01b1be8ac37066596e] https://user-images.githubusercontent.com/100292815/234545682-c52d3a2b-6144-4ded-9ad3-45c308ffd8ef.png
Same for the vcolorpicker.py file
[image: b31317cda9631e2147ddbe9ce5d70813] https://user-images.githubusercontent.com/100292815/234546448-d3eb5202-3bbf-48cd-87d8-c05407850a25.png
[image: 56f5eba22d933477e138b99f06932579] https://user-images.githubusercontent.com/100292815/234546464-239b07af-839f-4270-8e69-8d99b23285e6.png
[image: c7536a23fcb30cf8d0d35552124352c1] https://user-images.githubusercontent.com/100292815/234546481-c4e94bf7-7f28-40f8-81c6-2b04781465cf.png
— Reply to this email directly, view it on GitHub https://github.com/nlfmt/pyqt-colorpicker/issues/5#issuecomment-1523174711, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWZME6ZMEA634C7MRPA2LXDDZEXANCNFSM57HBDYZA . You are receiving this because you authored the thread.Message ID: @.***>