diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp index 8c744f379d..59afee2c26 100644 --- a/src/apps/deskbar/ExpandoMenuBar.cpp +++ b/src/apps/deskbar/ExpandoMenuBar.cpp @@ -839,7 +839,7 @@ float TExpandoMenuBar::MinHorizontalItemWidth() { const int32 iconSize = static_cast(be_app)->IconSize(); - const int32 iconPadding = be_control_look->ComposeSpacing(kIconPadding); + const float iconPadding = be_control_look->ComposeSpacing(kIconPadding); float iconOnlyWidth = iconSize + iconPadding; return static_cast(be_app)->Settings()->hideLabels @@ -852,8 +852,8 @@ TExpandoMenuBar::MinHorizontalItemWidth() float TExpandoMenuBar::MaxHorizontalItemWidth() { - int32 iconSize = static_cast(be_app)->IconSize(); - const int32 iconPadding = be_control_look->ComposeSpacing(kIconPadding); + const int32 iconSize = static_cast(be_app)->IconSize(); + const float iconPadding = be_control_look->ComposeSpacing(kIconPadding); float iconOnlyWidth = iconSize + iconPadding; // hide labels diff --git a/src/apps/deskbar/StatusView.cpp b/src/apps/deskbar/StatusView.cpp index 969fb0eb63..2cc4f510bd 100644 --- a/src/apps/deskbar/StatusView.cpp +++ b/src/apps/deskbar/StatusView.cpp @@ -193,7 +193,7 @@ TReplicantTray::AttachedToWindow() AddChild(fTime); - const int32 trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); + const float trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); fTime->MoveTo(Bounds().right - fTime->Bounds().Width() - trayPadding, 2); // will be moved into place later @@ -232,7 +232,7 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight) { float width = 0; float height = fMinTrayHeight; - const int32 trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); + const float trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); if (fBarView->Vertical()) { width = static_cast(be_app)->Settings()->width @@ -1175,7 +1175,7 @@ TReplicantTray::AcceptAddon(BRect replicantFrame, BMessage* message) BPoint TReplicantTray::LocationForReplicant(int32 index, float replicantWidth) { - const int32 trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); + const float trayPadding = ceilf(be_control_look->ComposeSpacing(kTrayPadding) / 2); BPoint loc(trayPadding, 0); if (fBarView->Vertical() || fBarView->MiniState()) { if (fBarView->Vertical() && !fBarView->Left()) diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp index db5521efa6..6081cffded 100644 --- a/src/kits/interface/ControlLook.cpp +++ b/src/kits/interface/ControlLook.cpp @@ -52,7 +52,7 @@ BControlLook::ComposeIconSize(int32 size) if (scale < 1.0f) scale = 1.0f; - const int32 scaled = size * scale; + const int32 scaled = (int32)(size * scale); return BSize(scaled - 1, scaled - 1); } diff --git a/src/kits/shared/IconButton.cpp b/src/kits/shared/IconButton.cpp index 005953ae05..52ed67f8e5 100644 --- a/src/kits/shared/IconButton.cpp +++ b/src/kits/shared/IconButton.cpp @@ -310,8 +310,8 @@ BIconButton::SetIcon(int32 resourceID) const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, resourceID, &size); if (data != NULL) { - BBitmap bitmap(BRect(BPoint(0, 0), be_control_look->ComposeIconSize(32)), - B_BITMAP_NO_SERVER_LINK, B_RGBA32); + const BRect bitmapRect(BPoint(0, 0), be_control_look->ComposeIconSize(32)); + BBitmap bitmap(bitmapRect, B_BITMAP_NO_SERVER_LINK, B_RGBA32); status = bitmap.InitCheck(); if (status != B_OK) return status; diff --git a/src/kits/tracker/IconMenuItem.cpp b/src/kits/tracker/IconMenuItem.cpp index 93bd98b55c..b56a34b6ec 100644 --- a/src/kits/tracker/IconMenuItem.cpp +++ b/src/kits/tracker/IconMenuItem.cpp @@ -421,7 +421,7 @@ IconMenuItem::GetContentSize(float* width, float* height) int32 iconHeight = fWhich; if (fDeviceIcon != NULL) - iconHeight = fDeviceIcon->Bounds().Height() + 1; + iconHeight = fDeviceIcon->Bounds().IntegerHeight() + 1; fHeightDelta = iconHeight - *height; if (*height < iconHeight)