some float -> int conversion warnings suppressed (but I wonder if this is really the right thing to do?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,9 +88,9 @@ void wxDC::DoGetTextExtent(const wxString& text, wxCoord *x, wxCoord *y, wxCoord
|
|||||||
NSRange glyphRange = [sm_cocoaNSLayoutManager glyphRangeForTextContainer:sm_cocoaNSTextContainer];
|
NSRange glyphRange = [sm_cocoaNSLayoutManager glyphRangeForTextContainer:sm_cocoaNSTextContainer];
|
||||||
NSRect usedRect = [sm_cocoaNSLayoutManager usedRectForTextContainer:sm_cocoaNSTextContainer];
|
NSRect usedRect = [sm_cocoaNSLayoutManager usedRectForTextContainer:sm_cocoaNSTextContainer];
|
||||||
if(x)
|
if(x)
|
||||||
*x=usedRect.size.width;
|
*x=(int)usedRect.size.width;
|
||||||
if(y)
|
if(y)
|
||||||
*y=usedRect.size.height;
|
*y=(int)usedRect.size.height;
|
||||||
if(descent)
|
if(descent)
|
||||||
*descent=0;
|
*descent=0;
|
||||||
if(externalLeading)
|
if(externalLeading)
|
||||||
|
@@ -47,12 +47,12 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
|||||||
{
|
{
|
||||||
NSRect contentRect = [[GetNSBox() contentView] frame];
|
NSRect contentRect = [[GetNSBox() contentView] frame];
|
||||||
NSRect thisRect = [m_cocoaNSView frame];
|
NSRect thisRect = [m_cocoaNSView frame];
|
||||||
*borderTop = thisRect.size.height - (contentRect.origin.y+contentRect.size.height);
|
*borderTop = (int)(thisRect.size.height - (contentRect.origin.y+contentRect.size.height));
|
||||||
*borderOther = thisRect.size.width - (contentRect.origin.x+contentRect.size.width);
|
*borderOther = (int)(thisRect.size.width - (contentRect.origin.x+contentRect.size.width));
|
||||||
int nextBorder = contentRect.origin.y;
|
int nextBorder = (int)contentRect.origin.y;
|
||||||
if(nextBorder > *borderOther)
|
if(nextBorder > *borderOther)
|
||||||
*borderOther = nextBorder;
|
*borderOther = nextBorder;
|
||||||
nextBorder = contentRect.origin.x;
|
nextBorder = (int)contentRect.origin.x;
|
||||||
if(nextBorder > *borderOther)
|
if(nextBorder > *borderOther)
|
||||||
*borderOther = nextBorder;
|
*borderOther = nextBorder;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user