{ return GetColumn(GetColumnIdxFromHeader(nmHDR)); }
int m_scrollOffsetX;
+ int m_buttonHeight;
private:
DECLARE_DYNAMIC_CLASS(wxDataViewHeaderWindowMSW)
{
m_owner = parent;
- m_scrollOffsetX = 0;;
+ m_scrollOffsetX = 0;
+ m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this );
int x = pos.x == wxDefaultCoord ? 0 : pos.x,
y = pos.y == wxDefaultCoord ? 0 : pos.y,
w = size.x == wxDefaultCoord ? 1 : size.x,
- h = size.y == wxDefaultCoord ? 22 : size.y;
+ h = size.y == wxDefaultCoord ? m_buttonHeight : size.y;
if ( !CreateControl(parent, id, pos, size, 0, wxDefaultValidator, name) )
return false;
wxSize wxDataViewHeaderWindowMSW::DoGetBestSize() const
{
- return wxSize(80, 22);
+ return wxSize(80, m_buttonHeight );
}
#ifndef HDF_SORTUP
int w, int h,
int f)
{
- wxControl::DoSetSize( x+m_scrollOffsetX, y, w-m_scrollOffsetX, h, f );
+ // TODO: why is there a border + 2px around it?
+ wxControl::DoSetSize( x+m_scrollOffsetX-2, y-2, w-m_scrollOffsetX+4, h+4, f );
}
#else // !defined(__WXMSW__)
wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size, const wxString &name ) :
- wxWindow( parent, id, pos, size, wxWANTS_CHARS, name ),
+ wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE, name ),
m_selection( wxDataViewSelectionCmp )
{
long style, const wxValidator& validator )
{
if (!wxControl::Create( parent, id, pos, size,
- style | wxScrolledWindowStyle|wxSUNKEN_BORDER, validator))
+ style | wxScrolledWindowStyle|wxBORDER_SUNKEN, validator))
return false;
SetInitialSize(size);