c0d3r
Members-
Content Count
129 -
Joined
-
Last visited
-
Days Won
1
Everything posted by c0d3r
-
Customizing source editor
c0d3r replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I liked mine a lot with Ubuntu mono font: -
Oh, Sorry, I didn't know that. Thats great!
- 22 replies
-
- graphics32
- vcl
-
(and 1 more)
Tagged with:
-
Do any of you plan to have your components to support 64-bit in near future?
- 22 replies
-
- graphics32
- vcl
-
(and 1 more)
Tagged with:
-
Hi, All I need some help to figure out how to make images (PNGs and BMPs, we don't use ICONs) work properly under different High DPI screen. All our VCLs used were scaled properly EXCEPT Toolbars and images. I knew toolbars have to be scaled properly based on images, so the question turns to how to get images scaled properly? Most of our images were 16x16 PNGs, few were 24x24. and few BMPs. We were using 3rd party TPngImageList to store all PNGs. Do we have to prepare different set of Images in order to make images working under different High DPI? like a set of 20x20, a set of 24x24, 28x28 32x32... Thats a LOT and would be PITA if we have to do. Any good solutions? BTW, Could be possible to have TPngImageList to be able to save selected PNG image to a file? the reason why I'm asking is because we lost some of original PNGs during migration from Delphi 2007 to Delphi 10.4
-
Found the solution and done. The result is perfect! See:
-
@Anders Melander Thanks so much for the help. Now not only all the images in the application wre scaling smoothly, but also all the Toolbar2000s were all scaled perfectly under different High DPIs (100%, 125%, 150%, 200%, ...). Yes, TOOLBARS are working without adding different set of images!!!
-
Sorry. My mistake. Its working now, have to use LoadBitmap32FromPNG(Source, 'normal_left.png'), along with ABitmap.AlphaFormat := afDefined; The reason why I'm using TImage was just for testing to see how the images scaling looks like, so I could use it for scaling my own page control tab bars:
-
As far as I know, once the source loads file/stream from a PNG file/stream, the transparent got lost, Here are the codes: Source.LoadFromFile('normal_left.png'); <-- Transparent got lost, transparent turned to White Target.SetSize(Round(Source.Width * 2), Round(Source.Height * 2)); Resampler := TKernelResampler.Create(Source); // Resampler is now owned by TBitmap32 Resampler.Kernel := TMitchellKernel.Create; // Kernel is now owned by resampler // Stretch using kernel resampler Target.Draw(Target.BoundsRect, Source.BoundsRect, Source); ABitmap := TBitmap.Create; try ABitmap.Assign(Target); ABitmap.AlphaFormat := afDefined; Image1{TImage}.Picture.Bitmap.Assign(ABitmap); finally ABitmap.Free; end; if you replace the first line with the following, the transparent turned to Black: LoadBitmap32FromPNG(Source, 'normal_left.png');
-
The PNG file is working fine using TPngImage. I did a very simple test with Graphics32: 1: Source.LoadFromFile('XXX.PNG'); Source.DrawTo(Image1{TImage}.Canvas.Handle, 0, 0); 2: using GR32PNG: LoadBitmap32FromPNG(Source, 'xxx.png'); Source.DrawTo(Image1{TImage}.Canvas.Handle, 0, 0); Both transparent channels were got lost with different DrawMode (dmTransparent, dmBlend, ...), all in Black, not yet do the resample things.
-
Try the above codes but with PNG files, seems the transparent colors got lost always, all in black, even though I try to use like this: LoadBitmap32FromPNG(Source, 'normal_left.png'); other than this problem everything else is working, What am I missing?
-
It crashes all the time if VMWare (16.1) has the 'Accelerate 3D Graphics' turned on.
-
Thanks for the tips. I will certainly try them out.
-
We are using Per Monitor v2 in the latest release, and Yes, for now we have to set this 'Override high DPI scaling...' to System. BUT it leads to blur screens which we got other complaints (LOTS LOTS of picky people out there, but we have to make them all happy) because of that.
-
Because clients complaint that the icons won't get scaled properly, and they also don't want you change the icons when we discuss the issues with them.
-
A new version IS a change. 🙂 There are lots of people out there in NA don't like icons being changed even though they are out of date, particularly those ones in Heathcare sectors. Dumb people all over the places, we did got calls that ask for where the any key is because the guys couldn't find the any key on the keyboard when they saw "Press any key to continue...'
-
Thanks for the link, I will try it out.
-
Thanks for the link. Unfortunately due to training issues, we can't change any icons because our clients were all get used to them, thats one of the issues we were facing, otherwise we could get better modern icons to replace aged ones. Clients are just ordinary people, some of them aren't smart enough.
-
I'm leaning toward using SVG, but how to convert current PNGs to SVGs is a challenging.
-
No. We don't use any 'style' or 'skin'. We don't like styles and skins, and totally against using them. Our clients don't care about how fancy the software looks like, but they DO like a stable, reliable, easy to use and bug free system.
-
Just tried 'Style', and pick Windows 10 as example, and NO its not the right way to have app DPI awared. The screen looks horribly blur, using sort of bitmap stretching way, looked exactly the same as you set 'Unaware' to the DPI awareness option.
-
Thanks. but what exactly does this 'Style' do with my TPngImageLists that used by toolbars, which aren't scaled to the proper High DPI? I'm totally confused.
-
We are not using any "Style", there was no "Style" during Delphi 2007 era. We just recently moved to Delphi 10.4, and making our production to be DPI aware.
-
I knew SVG, its great. But we were using PNGs all over the places in our major production, and no way you could find all these images in SVG.
-
Sometimes when I ctrl+enter on some units in uses clause, I was keeping get: [MSBuild Warning] There is a circular reference involving the import of file "c:\program files (x86)\embarcadero\studio\21.0\Bin\CodeGear.Delphi.Targets". This file may have been imported more than once, or you may have attempted to import the main project file. All except the first instance of this file will be ignored. What is it about, any idea how to get rid of it? some of these unit are used by the project only.