Loading widget/src/windows/nsButton.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ nsresult nsButton::QueryInterface(const nsIID& aIID, void** aInstancePtr) //------------------------------------------------------------------------- NS_METHOD nsButton::SetLabel(const nsString& aText) { if (NULL == mWnd) { return NS_ERROR_FAILURE; } NS_ALLOC_STR_BUF(label, aText, 256); VERIFY(::SetWindowText(mWnd, label)); NS_FREE_STR_BUF(label); Loading widget/src/windows/nsLabel.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -196,8 +196,12 @@ NS_METHOD nsLabel::GetBounds(nsRect &aRect) //------------------------------------------------------------------------- NS_METHOD nsLabel::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight) { if (nsnull == mContext) { return NS_ERROR_FAILURE; } //nsIFontMetrics * fm = GetFont();; // mDeviceContext->GetMetricsFor(mFont, &fm); nsIFontMetrics* metrics; mContext->GetMetricsFor(*mFont, metrics); Loading widget/src/windows/nsWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,10 @@ nsIFontMetrics* nsWindow::GetFont(void) //------------------------------------------------------------------------- NS_METHOD nsWindow::SetFont(const nsFont &aFont) { if (nsnull == mContext) { return NS_ERROR_FAILURE; } nsIFontMetrics* metrics; mContext->GetMetricsFor(aFont, metrics); nsFontHandle fontHandle; Loading Loading
widget/src/windows/nsButton.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ nsresult nsButton::QueryInterface(const nsIID& aIID, void** aInstancePtr) //------------------------------------------------------------------------- NS_METHOD nsButton::SetLabel(const nsString& aText) { if (NULL == mWnd) { return NS_ERROR_FAILURE; } NS_ALLOC_STR_BUF(label, aText, 256); VERIFY(::SetWindowText(mWnd, label)); NS_FREE_STR_BUF(label); Loading
widget/src/windows/nsLabel.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -196,8 +196,12 @@ NS_METHOD nsLabel::GetBounds(nsRect &aRect) //------------------------------------------------------------------------- NS_METHOD nsLabel::GetPreferredSize(PRInt32& aWidth, PRInt32& aHeight) { if (nsnull == mContext) { return NS_ERROR_FAILURE; } //nsIFontMetrics * fm = GetFont();; // mDeviceContext->GetMetricsFor(mFont, &fm); nsIFontMetrics* metrics; mContext->GetMetricsFor(*mFont, metrics); Loading
widget/src/windows/nsWindow.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,10 @@ nsIFontMetrics* nsWindow::GetFont(void) //------------------------------------------------------------------------- NS_METHOD nsWindow::SetFont(const nsFont &aFont) { if (nsnull == mContext) { return NS_ERROR_FAILURE; } nsIFontMetrics* metrics; mContext->GetMetricsFor(aFont, metrics); nsFontHandle fontHandle; Loading