diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-02 16:47:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-05 10:14:45 +0100 |
commit | e586009e2c9356bacc4c9282e044f1c1b63e7601 (patch) | |
tree | 966986d9767426e5bd89e9b53995f3ae21decca6 /vcl | |
parent | 110c8df2d80bd09c2848eba0091d8a1f7b51bcc9 (diff) |
nMax here is a height value
Change-Id: Ia1c12f29840dcb2f3f5a5d654a368ddc11554ab2
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/menu.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 78cc8bae9ce1..028a3efd7499 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2360,13 +2360,13 @@ Size Menu::ImplCalcSize( Window* pWin ) long nMinMenuItemHeight = nFontHeight; long nCheckHeight = 0, nRadioHeight = 0; long nCheckWidth = 0, nMaxCheckWidth = 0; - long nMax = ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth ); - if( nMax > nMinMenuItemHeight ) - nMinMenuItemHeight = nMax; + long nMaxHeight = ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth ); + if( nMaxHeight > nMinMenuItemHeight ) + nMinMenuItemHeight = nMaxHeight; // When no native rendering of the checkbox & no image in the menu, we // have to add some extra space even in the MENU_FLAG_SHOWCHECKIMAGES case - bool bSpaceForCheckbox = ( nMax == 0 ); + bool bSpaceForCheckbox = ( nMaxHeight == 0 ); const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings(); if ( rSettings.GetUseImagesInMenus() ) @@ -2505,8 +2505,8 @@ Size Menu::ImplCalcSize( Window* pWin ) { long nImgOrChkWidth = 0; nImagePos = nCheckPos; - if( nMax > 0 ) // NWF case - nImgOrChkWidth = nMax + nExtra; + if( nMaxHeight > 0 ) // NWF case + nImgOrChkWidth = nMaxHeight + nExtra; else // non NWF case nImgOrChkWidth = nFontHeight/2 + gfxExtra; nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra ); |