Opened 12 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 Changed 11 years 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.

comment:2 in reply to:  1 Changed 11 years 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.

comment:3 Changed 11 years 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.

comment:4 Changed 11 years 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.

comment:5 in reply to:  4 Changed 11 years 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.

comment:6 Changed 11 years ago by jackburton

Resolution: fixed
Status: newclosed

Fixed in hrev27609

comment:7 in reply to:  4 Changed 11 years 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 ?

comment:8 Changed 11 years ago by stippi

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

Note: See TracTickets for help on using tickets.