Author: mlytwyn Date: Mon Jun 22 17:48:36 2015 New Revision: 38669 URL: http://svn.gna.org/viewcvs/gnustep?rev=38669&view=rev Log: Set result var with boolean
Modified: plugins/themes/WinUXTheme/WinNSButton.m Modified: plugins/themes/WinUXTheme/WinNSButton.m URL: http://svn.gna.org/viewcvs/gnustep/plugins/themes/WinUXTheme/WinNSButton.m?rev=38669&r1=38668&r2=38669&view=diff ============================================================================== --- plugins/themes/WinUXTheme/WinNSButton.m (original) +++ plugins/themes/WinUXTheme/WinNSButton.m Mon Jun 22 17:48:36 2015 @@ -88,48 +88,48 @@ if(!IsThemeActive()) { return [super buttonMarginsForCell: cell - style: style - state: state]; + style: style + state: state]; } - + HTHEME hTheme; NSWindow *window = [[cell controlView] window]; HWND hwnd = (HWND)[window windowNumber]; - + hTheme = OpenThemeData(hwnd, L"button"); if (hTheme != NULL) { BOOL result = NO; GSThemeMargins margins = {0, 0, 0, 0}; - + if (IsThemePartDefined(hTheme, BP_PUSHBUTTON, 0)) { int drawState = _ButtonStateForThemeControlState(state); HDC hDC = GetCurrentHDC(); MARGINS win32Margins; - - result = (GetThemeMargins(hTheme, hDC, BP_PUSHBUTTON, drawState, + + result = (GetThemeMargins(hTheme, hDC, BP_PUSHBUTTON, drawState, TMT_CONTENTMARGINS, NULL, &win32Margins) == S_OK); if (result) { margins.left = win32Margins.cxLeftWidth; - margins.right = win32Margins.cxRightWidth; - margins.top = win32Margins.cyTopHeight; - margins.bottom = win32Margins.cyBottomHeight; + margins.right = win32Margins.cxRightWidth; + margins.top = win32Margins.cyTopHeight; + margins.bottom = win32Margins.cyBottomHeight; } ReleaseCurrentHDC(hDC); } - + CloseThemeData(hTheme); if (result) { return margins; } } - + return [super buttonMarginsForCell: cell - style: style - state: state]; + style: style + state: state]; } @end _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs