InfoWindow: Icon wasn't properly refreshing when changing
This commit is contained in:
parent
52b530a507
commit
9766084650
|
@ -1163,12 +1163,13 @@ AttributeView::ModelChanged(Model* model, BMessage* message)
|
||||||
if (message->FindString("attr", &attrName) == B_OK) {
|
if (message->FindString("attr", &attrName) == B_OK) {
|
||||||
if (strcmp(attrName, kAttrLargeIcon) == 0
|
if (strcmp(attrName, kAttrLargeIcon) == 0
|
||||||
|| strcmp(attrName, kAttrIcon) == 0) {
|
|| strcmp(attrName, kAttrIcon) == 0) {
|
||||||
Invalidate(BRect(10, 10, 10 + B_LARGE_ICON, 10
|
|
||||||
+ B_LARGE_ICON));
|
|
||||||
|
|
||||||
|
IconCache::sIconCache->IconChanged(model->ResolveIfLink());
|
||||||
|
Invalidate();
|
||||||
} else if (strcmp(attrName, kAttrMIMEType) == 0) {
|
} else if (strcmp(attrName, kAttrMIMEType) == 0) {
|
||||||
|
|
||||||
if (model->OpenNode() == B_OK) {
|
if (model->OpenNode() == B_OK) {
|
||||||
|
model->AttrChanged(attrName);
|
||||||
InitStrings(model);
|
InitStrings(model);
|
||||||
model->CloseNode();
|
model->CloseNode();
|
||||||
}
|
}
|
||||||
|
@ -1700,7 +1701,7 @@ AttributeView::MessageReceived(BMessage* message)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AttributeView::Draw(BRect)
|
AttributeView::Draw(BRect updateRect)
|
||||||
{
|
{
|
||||||
// Set the low color for anti-aliasing
|
// Set the low color for anti-aliasing
|
||||||
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
SetLowColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||||
|
@ -1719,7 +1720,7 @@ AttributeView::Draw(BRect)
|
||||||
SetDrawingMode(B_OP_OVER);
|
SetDrawingMode(B_OP_OVER);
|
||||||
IconCache::sIconCache->Draw(fIconModel, this, fIconRect.LeftTop(),
|
IconCache::sIconCache->Draw(fIconModel, this, fIconRect.LeftTop(),
|
||||||
kNormalIcon, B_LARGE_ICON, true);
|
kNormalIcon, B_LARGE_ICON, true);
|
||||||
|
SetDrawingMode(B_OP_COPY);
|
||||||
// Font information
|
// Font information
|
||||||
font_height fontMetrics;
|
font_height fontMetrics;
|
||||||
BFont currentFont;
|
BFont currentFont;
|
||||||
|
|
Loading…
Reference in New Issue