Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #31  
Old 12-06-2015, 01:26 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Quote:
It makes no difference for me if they are bmp, ico, png or anything else.
Like I said, I chose ico because it was the ONLY WAY to load them without losing something from image. In the Delphi 7 version I had bmp because, same, was the ONLY WAY to load them and show them correctly.
In my other apps I used pngs stored in resources and loading them using those components.
I agree, if it looks good the format doesn't matter.

Quote:
Have you looked where I said "25 compilation errors"?
Yes I have, but like I said I don't have Delphi Seattle so I can do nothing about it.

Quote:
Btw, the latest versions of Delphi can load pngs. I tried load png into a TPNGImage then into a TBitmap and then in TImageList. But the images were shown grayed.
I know it can, but there are some issues with transparency.

Ok, tomorrow I will search for some quality 16x16 images. At least for "Not found", "Options" and "Exit". I will test it myself on that small VST project.
Reply With Quote
  #32  
Old 12-07-2015, 08:37 AM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Ok, I did it for the buttons. In my opinion it looks much better now:



Same is possible for the VST. If you have difficulties finding the images, please let me know. I will try to search myself.
Attached Files
File Type: zip Images.zip (14.8 KB, 2 views)

Last edited by kolbasz; 12-07-2015 at 08:39 AM.
Reply With Quote
  #33  
Old 12-07-2015, 09:21 AM
DavidB3 DavidB3 is offline
Senior Member
 
Join Date: Jul 2013
Posts: 119
Default

Yes, looks better, thank you



Compiled exe file:

https://drive.google.com/file/d/0ByK...ew?usp=sharing

It's still not finished (have to do Move Up/Down, Sort, Drag&Drop).
Reply With Quote
  #34  
Old 12-07-2015, 09:45 AM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Yes, looks good. One more: Move Up, Move Down, Refresh images(see attachment). Make a screenshot...let's see how it looks
Attached Files
File Type: zip Images.zip (7.4 KB, 1 views)
Reply With Quote
  #35  
Old 12-07-2015, 10:35 AM
DavidB3 DavidB3 is offline
Senior Member
 
Join Date: Jul 2013
Posts: 119
Default

Looks good too:



But I just found a bug in the ownerdraw header paint code: when I scroll horizontally I get an access violation somewhere in VirtualTrees.Utils.
In the app exe I last posted it just stops scrolling (errmsg dealt internally); I was able to reproduce the error in the test app.
Just resize the columns so the horizontal scrollbar appears and try to scroll.



LE: the error is in "ColorBlend(PaintInfo.TargetCanvas, R, Color, Alpha);". Probably doesn't know to ignore hidden areas...


LLE: Solved the problem. I changed "R := PaintInfo.PaintRectangle" with "IntersectRect(R, PaintInfo.PaintRectangle, VST.HeaderRect);". This way it will paint only the visible part.
Attached Files
File Type: zip TestVST.zip (61.0 KB, 1 views)

Last edited by DavidB3; 12-07-2015 at 11:30 AM.
Reply With Quote
  #36  
Old 12-07-2015, 12:22 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Quote:
But I just found a bug in the ownerdraw header paint code: when I scroll horizontally I get an access violation somewhere in VirtualTrees.Utils.
In the app exe I last posted it just stops scrolling (errmsg dealt internally); I was able to reproduce the error in the test app.
Just resize the columns so the horizontal scrollbar appears and try to scroll.

LE: the error is in "ColorBlend(PaintInfo.TargetCanvas, R, Color, Alpha);". Probably doesn't know to ignore hidden areas...
LLE: Solved the problem. I changed "R := PaintInfo.PaintRectangle" with "IntersectRect(R, PaintInfo.PaintRectangle, VST.HeaderRect);". This way it will paint only the visible part.
Ok. I was busy making some png's. Unfortunately what I told you yesterday it's true. Although you can add png's to TImageList the transparency it's pretty crappy. So I switched to TPngImageList(I know it's not working on Delphi Seattle), but I had to try(see screenshot + attachment). What do you think about the look?



PS. Please make sure you download TPNGImage from here: http://blog.kassebaum.eu/ because it's the official Delphi support for this components. If that TPngImage is not working, then I'm afraid there's nothing I can do(maybe you should stay with icons then)
Attached Files
File Type: zip Pngs.zip (10.5 KB, 1 views)
Reply With Quote
  #37  
Old 12-07-2015, 01:31 PM
DavidB3 DavidB3 is offline
Senior Member
 
Join Date: Jul 2013
Posts: 119
Default

I don't know if it's ok to change the QEMU icon. It was taken from here http://qemu.weilnetz.de/icon/other/
And the VirtualBox icon was extracted from the main VirtualBox exe file.

In the previous version there was only a green + a red (very sketchy) icon for storage devices. Its main function was to show if they were available or not.
I guess it's ok with detailed multicolored images too, although the eyes , after a while, won't notice much of the details/colors (but it would of noticed green/red switch more easily)...

Unfortunately TPNGImage still can't be compiled:



For log see attachment.

And here is the explanation why:

https://groups.google.com/forum/embe...hi/CcsIiMaQUPE
http://docs.embarcadero.com/products...nable_xml.html
Attached Files
File Type: zip errors.zip (1.6 KB, 2 views)

Last edited by DavidB3; 12-07-2015 at 01:37 PM.
Reply With Quote
  #38  
Old 12-07-2015, 01:51 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Quote:
I don't know if it's ok to change the QEMU icon. It was taken from here http://qemu.weilnetz.de/icon/other/
And the VirtualBox icon was extracted from the main VirtualBox exe file.

In the previous version there was only a green + a red (very sketchy) icon for storage devices. Its main function was to show if they were available or not.
I guess it's ok with detailed multicolored images too, although the eyes , after a while, won't notice much of the details/colors (but it would of noticed green/red switch more easily)...
It's up to you, but having more possibility it's better I guess.

Quote:
Unfortunately TPNGImage still can't be compiled:
Try now(attachment). Remove the old one completely.
Attached Files
File Type: zip PNGComponents.ZIP (52.3 KB, 3 views)

Last edited by kolbasz; 12-07-2015 at 01:58 PM.
Reply With Quote
  #39  
Old 12-07-2015, 03:18 PM
DavidB3 DavidB3 is offline
Senior Member
 
Join Date: Jul 2013
Posts: 119
Default

The code is compiling ok now, thanks.

I combined all the images into one 160x16 res and add it into resources.
Just to save time, what method have you used to load the pngs into the imagelist?


LE: I used the design editor and it loads the pngs ok

Last edited by DavidB3; 12-07-2015 at 03:55 PM.
Reply With Quote
  #40  
Old 12-07-2015, 03:51 PM
kolbasz kolbasz is offline
Senior Member
 
Join Date: Nov 2013
Posts: 841
Default

Quote:
The code is compiling ok now, thanks.
You're welcome! I'm glad it's working.

Quote:
combined all the images into one 160x16 res and add it into resources.
Just to save time, what method have you used to load the pngs into the imagelist?
I added manually at design time. For a few images I usually don't use resources.
Reply With Quote
Reply

Tags
64 bit, delphi 10, delphi 7, listview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 09:08 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.