Check if icon size is the same, if so, don't resize
This commit is contained in:
parent
ee78e4de9f
commit
9439677a9c
@ -556,20 +556,26 @@ TBarApp::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kResizeTeamIcons:
|
case kResizeTeamIcons:
|
||||||
{
|
{
|
||||||
|
int32 oldIconSize = fSettings.iconSize;
|
||||||
int32 iconSize;
|
int32 iconSize;
|
||||||
|
|
||||||
if (message->FindInt32("be:value", &iconSize) != B_OK)
|
if (message->FindInt32("be:value", &iconSize) != B_OK)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
fSettings.iconSize = iconSize * kIconSizeInterval;
|
fSettings.iconSize = iconSize * kIconSizeInterval;
|
||||||
|
|
||||||
|
// pin icon size between min and max values
|
||||||
if (fSettings.iconSize < kMinimumIconSize)
|
if (fSettings.iconSize < kMinimumIconSize)
|
||||||
fSettings.iconSize = kMinimumIconSize;
|
fSettings.iconSize = kMinimumIconSize;
|
||||||
else if (fSettings.iconSize > kMaximumIconSize)
|
else if (fSettings.iconSize > kMaximumIconSize)
|
||||||
fSettings.iconSize = kMaximumIconSize;
|
fSettings.iconSize = kMaximumIconSize;
|
||||||
|
|
||||||
|
// don't resize if icon size hasn't changed
|
||||||
|
if (fSettings.iconSize == oldIconSize)
|
||||||
|
break;
|
||||||
|
|
||||||
ResizeTeamIcons();
|
ResizeTeamIcons();
|
||||||
|
|
||||||
|
// if mini mode we don't need to update the view
|
||||||
if (fBarView->MiniState())
|
if (fBarView->MiniState())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user