X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11ebea162a1d99032aa98ac649d61aaf08e428e8..b2cef83022bfc666057b17f992a4f34618ea5a62:/src/msw/listctrl.cpp?ds=sidebyside diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 020353af2a..351c3a512f 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -318,7 +318,7 @@ bool wxListCtrl::Create(wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator, + const wxValidator& wxVALIDATOR_PARAM(validator), const wxString& name) { #if wxUSE_VALIDATORS @@ -1044,13 +1044,6 @@ wxRect wxListCtrl::GetViewRect() const wxZeroMemory(rc); } - else - { - // VZ: I have no idea why is this needed but without it the listbook - // control shows a tiny vertical scrollbar, make sure that it works - // correctly if you decide to change this - rc.bottom += 5; - } wxRect rect; wxCopyRECTToRect(rc, rect); @@ -1110,9 +1103,13 @@ int wxListCtrl::GetItemCount() const return m_count; } -// Retrieves the spacing between icons in pixels. -// If small is TRUE, gets the spacing for the small icon -// view, otherwise the large icon view. +wxSize wxListCtrl::GetItemSpacing() const +{ + const int spacing = ListView_GetItemSpacing(GetHwnd(), (BOOL)HasFlag(wxLC_SMALL_ICON)); + + return wxSize(LOWORD(spacing), HIWORD(spacing)); +} + int wxListCtrl::GetItemSpacing(bool isSmall) const { return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);