Allow ValueViewers to have a bounding box different from the Style's. This closes #64.

This commit is contained in:
Twan van Laarhoven
2020-06-01 01:18:13 +02:00
parent e9305c7554
commit 4ff603d413
24 changed files with 79 additions and 87 deletions
+2 -2
View File
@@ -275,11 +275,11 @@ void ChoiceValueEditor::onLoseFocus() {
void ChoiceValueEditor::draw(RotatedDC& dc) {
ChoiceValueViewer::draw(dc);
if (nativeLook()) {
draw_drop_down_arrow(&editor(), dc.getDC(), dc.trRectToBB(style().getInternalRect().grow(1)), drop_down->IsShown());
draw_drop_down_arrow(&editor(), dc.getDC(), dc.getExternalRect().grow(1), drop_down->IsShown());
}
}
void ChoiceValueEditor::determineSize(bool) {
style().height = max(style().height(), 16.);
bounding_box.height = max(bounding_box.height, 16.);
}
void ChoiceValueEditor::change(const Defaultable<String>& c) {