draw_control_box instead of draw_control_border

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1563 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-12-07 22:09:09 +00:00
parent e5c0697476
commit 0d519a3c0b
4 changed files with 28 additions and 11 deletions
+2 -6
View File
@@ -36,18 +36,14 @@ void NativeLookEditor::drawViewer(RotatedDC& dc, ValueViewer& v) {
if (!shouldDraw(v)) return;
ValueEditor* e = v.getEditor();
if (!e || e->drawLabel()) {
// draw background
// draw control border and box
Style& s = *v.getStyle();
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
dc.DrawRectangle(s.getInternalRect().grow(1));
draw_control_box(this, dc.getDC(), dc.trRectStraight(s.getInternalRect().grow(1)), current_editor == e, e != nullptr);
// draw label
dc.SetFont(*wxNORMAL_FONT);
// TODO : tr using stylesheet or using game?
dc.DrawText(tr(getStylePackage(), s.fieldP->name, capitalize_sentence),
RealPoint(margin_left - s.left, 1));
// draw 3D border
draw_control_border(this, dc.getDC(), dc.trRectStraight(s.getInternalRect().grow(1)));
}
// draw viewer
v.draw(dc);