Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#984 closed bug (fixed)

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/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

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

Change History (8)

comment:1 by aldeck, 11 years ago

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 comment:2 by jackburton, 11 years ago

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.

comment:3 by jackburton, 11 years ago

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.

comment:4 by stippi, 11 years ago

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 comment:5 by jackburton, 11 years ago

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.

comment:6 by jackburton, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev27609

in reply to:  4 comment:7 by jackburton, 11 years ago

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 ?

comment:8 by stippi, 11 years ago

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

Note: See TracTickets for help on using tickets.