mIRC Homepage

dbu vs pixels

Posted By: vinifera

dbu vs pixels - 18/02/15 02:47 AM

back in the day of 1024x768 all my dialogs looked ok with
dbu setting, but now with big dimensions, what is
actually better and preferred ?

dbu or pixels, and which is scalable ?
i see dbu holds fixed dialog size
Posted By: Raccoon

Re: dbu vs pixels - 18/02/15 07:06 AM

Dbu (dialog base units) have one purpose, and that is to scale with system setting font size; Once known as "Large Fonts", now called "Set custom text size (DPI)" (dots per inch) in Vista/7/8. Also known as Ppi for Pixels per inch.

ANYWAY, if you want things to scale well for those weirdos who adjust this setting, go ahead and stick with DBU, and test your creation with various system font magnifications.
Posted By: vinifera

Re: dbu vs pixels - 18/02/15 04:05 PM

so using "pixels" is actually better ? // recommended ?
Posted By: Raccoon

Re: dbu vs pixels - 18/02/15 09:47 PM

Using "pixels" will give you finer control over the absolute dimensions of your dialog, in relationship to graphic elements.

Using "dbu" will help make sure that buttons and lists are scaled proportionally to the user's font size preference -- if they are visually impaired or just prefer larger dialog text. "dbu" will make sure that text doesn't get cut off because the buttons and objects are too small for, or overlap, the text.

You decide if your dialog can scale well to text, or if it's mostly image/graphics based.
Posted By: vinifera

Re: dbu vs pixels - 19/02/15 02:37 PM

so at the very end

dbu is good for users who increase their display DPI settings
and is scalable

while pixels are absolute and static (non scalable) ?
Posted By: Raccoon

Re: dbu vs pixels - 20/02/15 12:22 AM

That's the gist. Or, like I said:

DBU is good for a text based dialog (buttons and labels)

Pixels is good for a graphics based dialog (icon objects)

Some people use Pixels because they use pixel math for resizing and moving, and don't know about $dbuh and $dbuw and the extra effort involved in converting these values.
Posted By: vinifera

Re: dbu vs pixels - 20/02/15 07:29 PM

thanks for all the info
much apreciated
© 2022 mIRC Discussion Forums