projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no real change: just rename "near" into "onNearPart" (MSVC doesn't like 'near' as...
[wxWidgets.git]
/
src
/
propgrid
/
editors.cpp
diff --git
a/src/propgrid/editors.cpp
b/src/propgrid/editors.cpp
index 433a16112d8eb0f79168e65f706d8262cf663224..5867b53e1eee7671d9aaf0c4cef2ba032206c95e 100644
(file)
--- a/
src/propgrid/editors.cpp
+++ b/
src/propgrid/editors.cpp
@@
-848,6
+848,10
@@
void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb,
else
{
renderFlags |= wxPGCellRenderer::ChoicePopup;
else
{
renderFlags |= wxPGCellRenderer::ChoicePopup;
+
+ // For consistency, always use normal font when drawing drop down
+ // items
+ dc.SetFont(GetFont());
}
// If not drawing a selected popup item, then give property's
}
// If not drawing a selected popup item, then give property's
@@
-1727,8
+1731,10
@@
wxWindow* wxPropertyGrid::GetEditorControl() const
void wxPropertyGrid::CorrectEditorWidgetSizeX()
{
int secWid = 0;
void wxPropertyGrid::CorrectEditorWidgetSizeX()
{
int secWid = 0;
- int newSplitterx = m_pState->DoGetSplitterPosition(m_selColumn-1);
- int newWidth = newSplitterx + m_pState->m_colWidths[m_selColumn];
+
+ // Use fixed selColumn 1 for main editor widgets
+ int newSplitterx = m_pState->DoGetSplitterPosition(0);
+ int newWidth = newSplitterx + m_pState->m_colWidths[1];
if ( m_wndEditor2 )
{
if ( m_wndEditor2 )
{
@@
-1768,25
+1774,41
@@
void wxPropertyGrid::CorrectEditorWidgetSizeX()
void wxPropertyGrid::CorrectEditorWidgetPosY()
{
void wxPropertyGrid::CorrectEditorWidgetPosY()
{
- if ( GetSelection() && (m_wndEditor || m_wndEditor2) )
- {
- wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn);
+ wxPGProperty* selected = GetSelection();
- if ( m_wndEditor )
+ if ( selected )
+ {
+ if ( m_labelEditor )
{
{
- wxPoint pos = m_wndEditor->GetPosition();
+ wxRect r = GetEditorWidgetRect(selected, m_selColumn);
+ wxPoint pos = m_labelEditor->GetPosition();
// Calculate y offset
int offset = pos.y % m_lineHeight;
// Calculate y offset
int offset = pos.y % m_lineHeight;
- m_
wnd
Editor->Move(pos.x, r.y + offset);
+ m_
label
Editor->Move(pos.x, r.y + offset);
}
}
- if ( m_wndEditor
2 )
+ if ( m_wndEditor
|| m_wndEditor2 )
{
{
- wxPoint pos = m_wndEditor2->GetPosition();
+ wxRect r = GetEditorWidgetRect(selected, 1);
+
+ if ( m_wndEditor )
+ {
+ wxPoint pos = m_wndEditor->GetPosition();
+
+ // Calculate y offset
+ int offset = pos.y % m_lineHeight;
+
+ m_wndEditor->Move(pos.x, r.y + offset);
+ }
- m_wndEditor2->Move(pos.x, r.y);
+ if ( m_wndEditor2 )
+ {
+ wxPoint pos = m_wndEditor2->GetPosition();
+
+ m_wndEditor2->Move(pos.x, r.y);
+ }
}
}
}
}
}
}