Add casts to appease GCC2 following recent changes.
This commit is contained in:
parent
4e2c07efa4
commit
1be8560567
@ -839,7 +839,7 @@ float
|
||||
TExpandoMenuBar::MinHorizontalItemWidth()
|
||||
{
|
||||
const int32 iconSize = static_cast<TBarApp*>(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<TBarApp*>(be_app)->Settings()->hideLabels
|
||||
@ -852,8 +852,8 @@ TExpandoMenuBar::MinHorizontalItemWidth()
|
||||
float
|
||||
TExpandoMenuBar::MaxHorizontalItemWidth()
|
||||
{
|
||||
int32 iconSize = static_cast<TBarApp*>(be_app)->IconSize();
|
||||
const int32 iconPadding = be_control_look->ComposeSpacing(kIconPadding);
|
||||
const int32 iconSize = static_cast<TBarApp*>(be_app)->IconSize();
|
||||
const float iconPadding = be_control_look->ComposeSpacing(kIconPadding);
|
||||
float iconOnlyWidth = iconSize + iconPadding;
|
||||
|
||||
// hide labels
|
||||
|
@ -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<TBarApp*>(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())
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user