mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Change tabs to two spaces.
This commit is contained in:
+16
-16
@@ -15,35 +15,35 @@
|
||||
IMPLEMENT_VALUE_VIEWER(Text);
|
||||
|
||||
bool TextValueViewer::prepare(RotatedDC& dc) {
|
||||
getMask(dc); // ensure alpha/contour mask is loaded
|
||||
return v.prepare(dc, value().value(), style(), viewer.getContext());
|
||||
getMask(dc); // ensure alpha/contour mask is loaded
|
||||
return v.prepare(dc, value().value(), style(), viewer.getContext());
|
||||
}
|
||||
|
||||
void TextValueViewer::draw(RotatedDC& dc) {
|
||||
drawFieldBorder(dc);
|
||||
if (!v.prepared()) {
|
||||
v.prepare(dc, value().value(), style(), viewer.getContext());
|
||||
dc.setStretch(getStretch());
|
||||
}
|
||||
DrawWhat what = viewer.drawWhat(this);
|
||||
v.draw(dc, style(), (DrawWhat)(what & DRAW_ACTIVE));
|
||||
setFieldBorderPen(dc);
|
||||
v.draw(dc, style(), (DrawWhat)(what & ~DRAW_ACTIVE));
|
||||
drawFieldBorder(dc);
|
||||
if (!v.prepared()) {
|
||||
v.prepare(dc, value().value(), style(), viewer.getContext());
|
||||
dc.setStretch(getStretch());
|
||||
}
|
||||
DrawWhat what = viewer.drawWhat(this);
|
||||
v.draw(dc, style(), (DrawWhat)(what & DRAW_ACTIVE));
|
||||
setFieldBorderPen(dc);
|
||||
v.draw(dc, style(), (DrawWhat)(what & ~DRAW_ACTIVE));
|
||||
}
|
||||
|
||||
void TextValueViewer::onValueChange() {
|
||||
v.reset(false);
|
||||
v.reset(false);
|
||||
}
|
||||
|
||||
void TextValueViewer::onStyleChange(int changes) {
|
||||
v.reset(true);
|
||||
ValueViewer::onStyleChange(changes);
|
||||
v.reset(true);
|
||||
ValueViewer::onStyleChange(changes);
|
||||
}
|
||||
|
||||
void TextValueViewer::onAction(const Action&, bool undone) {
|
||||
v.reset(true);
|
||||
v.reset(true);
|
||||
}
|
||||
|
||||
double TextValueViewer::getStretch() const {
|
||||
return v.prepared() ? style().getStretch() : 1.0;
|
||||
return v.prepared() ? style().getStretch() : 1.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user