Ticket #984 (closed bug: fixed)

Opened 21 months ago

Last modified 3 weeks ago

Generic application icon in deskbar is old style 8 bit

Reported by: jackburton Owned by: jackburton
Priority: low Milestone: R1
Component: Applications/Deskbar Version: R1 development
Cc: Blocked By:
Platform: All Blocking:

Description

The generic app icon in deskbar is the 8 bit non vector icon. See also bug #890

Change History

follow-up: ↓ 2   Changed 4 months ago by aldeck

Seems fixed here. Not sure it's the same issue but i can only see the old icon in ProcessController's menus, the "/bin/sh --login" item uses the old icon.

in reply to: ↑ 1   Changed 5 weeks ago by jackburton

Replying to aldeck:

Seems fixed here. Not sure it's the same issue but i can only see the old icon in ProcessController's menus, the "/bin/sh --login" item uses the old icon.

Nope, it's still there. Just compare the icon shown in deskbar with the icon shown by tracker for the generic application.

  Changed 3 weeks ago by jackburton

Seems the old style icon is only used when there is no icon for the application. This is caused by the following lines in BarApp.cpp: <pre> if (appMime.GetIcon(barInfo->icon, B_MINI_ICON) != B_OK) {

const BBitmap* generic = AppResSet()->FindBitmap(B_MESSAGE_TYPE, R_GenericAppIcon); if (generic)

barInfo->icon->SetBits(generic->Bits(), barInfo->icon->BitsLength(),

0, generic->ColorSpace());

}

</pre>

Basically if getting the icon for the application fails, it uses an icon stored in its resources.

follow-ups: ↓ 5 ↓ 7   Changed 3 weeks ago by stippi

Ah, cool! Thanks for figuring it out. This could probably be fixed by simply using GetTrackerIcon() and no resources at all. This should then already fall back to the correct generic icon. The problem of the code is of course that if the design got changed, then this code would display the wrong icon regardless.

in reply to: ↑ 4   Changed 3 weeks ago by jackburton

  • owner changed from stippi to jackburton

Replying to stippi:

Ah, cool! Thanks for figuring it out. This could probably be fixed by simply using GetTrackerIcon() and no resources at all. This should then already fall back to the correct generic icon.

Ok, I'll try that. Thanks for the hint!

The problem of the code is of course that if the design got changed, then this code would display the wrong icon regardless.

Yeah, indeed.

  Changed 3 weeks ago by jackburton

  • status changed from new to closed
  • resolution set to fixed

Fixed in r27609

in reply to: ↑ 4   Changed 3 weeks ago by jackburton

Replying to stippi:

Ah, cool! Thanks for figuring it out. This could probably be fixed by simply using GetTrackerIcon() and no resources at all. This should then already fall back to the correct generic icon. The problem of the code is of course that if the design got changed, then this code would display the wrong icon regardless.

BTW I now realized I could use GetTrackerIcon() instead of GetIcon() directly, right ?

  Changed 3 weeks ago by stippi

Yes, I believe so. Not 100% sure at the moment.

Note: See TracTickets for help on using tickets.