* Invalidate layout only when necessary.
* Icon view needs to update completely on resize. -> Fixes graphics glitch when switching between icon and no icon. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@467 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
committed by
Alexandre Deckner
parent
a4c1f6783d
commit
5913d4a98b
@@ -529,7 +529,7 @@ class URLInputGroup::PageIconView : public BView {
|
|||||||
public:
|
public:
|
||||||
PageIconView()
|
PageIconView()
|
||||||
:
|
:
|
||||||
BView("page icon view", B_WILL_DRAW),
|
BView("page icon view", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE),
|
||||||
fIcon(NULL)
|
fIcon(NULL)
|
||||||
{
|
{
|
||||||
SetDrawingMode(B_OP_OVER);
|
SetDrawingMode(B_OP_OVER);
|
||||||
@@ -578,13 +578,14 @@ public:
|
|||||||
{
|
{
|
||||||
if (icon == NULL && fIcon == NULL)
|
if (icon == NULL && fIcon == NULL)
|
||||||
return;
|
return;
|
||||||
|
if (!(fIcon != NULL && icon != NULL))
|
||||||
|
InvalidateLayout();
|
||||||
delete fIcon;
|
delete fIcon;
|
||||||
if (icon)
|
if (icon)
|
||||||
fIcon = new BBitmap(icon);
|
fIcon = new BBitmap(icon);
|
||||||
else
|
else
|
||||||
fIcon = NULL;
|
fIcon = NULL;
|
||||||
Invalidate();
|
Invalidate();
|
||||||
InvalidateLayout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user