Recent

Author Topic: Speed button glyphs  (Read 3495 times)

fatmonk

  • Sr. Member
  • ****
  • Posts: 252
Speed button glyphs
« on: February 22, 2018, 06:22:06 pm »
I have a couple of speedbuttons on a form and they each have a PNG glyph.

On two of the SpeedButtons the glyph grey out when the button is disabled, but on the third it remains full colour.

Why is one greying correctly but the other not?

(save.png attached is an example of the glyph icon that is greying properly, qr.png is the on ethat remains full colour)

-FM

balazsszekely

  • Guest
Re: Speed button glyphs
« Reply #1 on: February 22, 2018, 06:44:49 pm »
The png's are grayed out nicely with lazarus trunk. However you can add two images(the original + a grayed one/bw) and increase NumberGlyps to 2 as in the attached project.

fatmonk

  • Sr. Member
  • ****
  • Posts: 252
Re: Speed button glyphs
« Reply #2 on: February 23, 2018, 04:06:26 pm »
OK, I'm an idiot...

I don't want to have to create multiple bitmaps for these buttons so was relying on the built-in greying of the single bitmap.

However, a black and white image turned to greyscale is.... a black and white image!

When I added a little bit of a blue shade (as in the qr.png image in the question) the shade was so subtle as to not be noticeable when greyed.

I've recreated the image with some colour and indeed the greying is working exactly as expected.

-FM

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Speed button glyphs
« Reply #3 on: February 23, 2018, 04:57:00 pm »
How brilliantly deducted a grayed image is not one bit per pixel  :-X.... :P :P :P Whereas a pure black and white usually is...
Specialize a type, not a var.

 

TinyPortal © 2005-2018