News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Icon scaling

Started by kkurkiewicz, September 14, 2023, 07:19:37 AM

Previous topic - Next topic

jj2007

#45
Quote from: NoCforMe on September 16, 2023, 07:12:11 AMHard to tell at the size you posted, but both lower images look pretty good (and identical) to me.

Indeed, the only difference is transparency.



Attached 40 lines of pure Masm32 code showing which is by far the best API to draw a 128x128 icon :biggrin:

kkurkiewicz

Quote from: kkurkiewicz on September 16, 2023, 07:47:52 AMThe icon is 32px, but, when rendered, the size changes to 28x28.
I mean, the original icon fills the whole grid (there are no margins), so it seems like Windows is down-scaling the image to 28px only to add some kind of a frame there.
Kamil

HSE

Quote from: NoCforMe on September 16, 2023, 05:33:55 AMSo how do you know that? Not disputing you, mind you, just wondering where that knowledge comes from.

Just using Spy (or similar tools) it's posible to see a lot of things at runtime. Anyway, a lot of speculation, not knowledge.

Quote from: NoCforMe on September 16, 2023, 05:33:55 AMAnd I know nothing about Qt.

It's some kind of language-script, that use a library of very big classes (or objects). Then result is an incredible bloated binary. In theory this library make very easy programmation, but I don't know either.

Equations in Assembly: SmplMath

HSE

Quote from: kkurkiewicz on September 16, 2023, 08:01:02 AMI mean, the original icon fills the whole grid (there are no margins), so it seems like Windows is down-scaling the image to 28px only to add some kind of a frame there.

Ok  :thumbsup:

Are you using Win11?
Equations in Assembly: SmplMath

kkurkiewicz

Kamil

HSE

Ok. I's posible some different default scaling. Anyway look like a system feature. Bad luck 28x28 look ugly.

Perhaps only reliable solution is owner drawing title bar, like in ObjAsm's SkinApp or Fearless' ModernUI. Apparently that is what IDA make with Qt classes.
Equations in Assembly: SmplMath

kkurkiewicz

Yeah, I'll try that.

If I ever make it look better, I will let you know. Thank you for all the suggestions.
Kamil