Page MenuHome

Fix T96157: Frame Node Labelsize changing depending on line-width setting
ClosedPublic

Authored by Dominik Fill (dominikfill) on Mar 14 2022, 5:58 PM.

Details

Summary

Fix similar to the fix in https://developer.blender.org/D14322

Corrects the calculation of the Frame Node label size, making it independent of the line-width user setting.

U.dpi is actually DPI divided by U.pixelsize, and U.pixelsize is calculated from line-width. Multiplying by U.pixelsize breaks the connection between line-width and labelsize, labelsize stays the same now, regardless of the line-width setting.

Diff Detail

Repository
rB Blender

Event Timeline

Dominik Fill (dominikfill) requested review of this revision.Mar 14 2022, 5:58 PM
Dominik Fill (dominikfill) created this revision.
Dominik Fill (dominikfill) changed the visibility from "Public (No Login Required)" to "No One".Mar 14 2022, 5:59 PM
Dominik Fill (dominikfill) retitled this revision from Multiply BLF_size size parameter by U.pixelsize to Fix T96157: Frame Node Labelsize changing depending on line-width setting.Mar 14 2022, 6:06 PM
Dominik Fill (dominikfill) edited the summary of this revision. (Show Details)
Dominik Fill (dominikfill) changed the visibility from "No One" to "Public (No Login Required)".

Thanks for the patch! I thoroughly tested it and for such a small change it's a pretty big improvement overall.
Not only is the label size now consistent regardless of the line width, it's also more consistent across different dpi displays or UI scales.

@Harley Acheson (harley) Not sure if it's up to me to accept this, but if this patch has your blessing, I could take care of committing it.


Test matrix Line Width and dpi
Notice how in master the label size varies both with different line width values and between the 1080p and higher dpi display.
Both is fixed with this patch.

master, 1080pmaster, retinapatch, 1080ppatch, retina
thin
default
thick

Test matrix UI Scale
In master the label size stays fixed in screen space, but with the patch it properly scales together with the rest of the UI which is more expected, I think.

UI Scalemasterpatch
0.5
1.0
2.0

This looks correct. @Leon Schittek (lone_noel) if you want to commit this, please go ahead, thanks!

This revision is now accepted and ready to land.May 30 2022, 11:19 AM