I solved it by righ-clicking on the codeblocks exe file and marking "override high DPI scaling behavior. Scaling performed by: Application" in the compatibility tab of properties.
I solved it by righ-clicking on the codeblocks exe file and marking "override high DPI scaling behavior. Scaling performed by: Application" in properties.