From 9439677a9c21d7ccb9b07898f988e0090812331a Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sun, 14 Apr 2013 02:01:14 -0400 Subject: [PATCH] Check if icon size is the same, if so, don't resize --- src/apps/deskbar/BarApp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps/deskbar/BarApp.cpp b/src/apps/deskbar/BarApp.cpp index 8ed7cd6d37..599f1f2cbc 100644 --- a/src/apps/deskbar/BarApp.cpp +++ b/src/apps/deskbar/BarApp.cpp @@ -556,20 +556,26 @@ TBarApp::MessageReceived(BMessage* message) case kResizeTeamIcons: { + int32 oldIconSize = fSettings.iconSize; int32 iconSize; - if (message->FindInt32("be:value", &iconSize) != B_OK) break; fSettings.iconSize = iconSize * kIconSizeInterval; + // pin icon size between min and max values if (fSettings.iconSize < kMinimumIconSize) fSettings.iconSize = kMinimumIconSize; else if (fSettings.iconSize > kMaximumIconSize) fSettings.iconSize = kMaximumIconSize; + // don't resize if icon size hasn't changed + if (fSettings.iconSize == oldIconSize) + break; + ResizeTeamIcons(); + // if mini mode we don't need to update the view if (fBarView->MiniState()) break;