Properly fix workplane name overlapping workplane border.
A previous attempt to fix this was done in 0128b8679
. However, it was
not rigorous. The added offset was dependent on font size and it
introduced an error into edit control positioning. Further, it is
irrelevant to non-workplanes.
After this commit, the workplane drawing code adds a fixed offset
instead. Also, the "tab" is enlarged to not overlap with #XY etc.
This commit is contained in:
parent
1e2f199633
commit
b2cdbe8c8d
|
@ -661,8 +661,8 @@ void Entity::DrawOrGetDistance(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!h.isFromRequest()) {
|
if(!h.isFromRequest()) {
|
||||||
mm = mm.Plus(v.ScaledBy(60/SS.GW.scale));
|
mm = mm.Plus(v.ScaledBy(70/SS.GW.scale));
|
||||||
mm2 = mm2.Plus(u.ScaledBy(60/SS.GW.scale));
|
mm2 = mm2.Plus(u.ScaledBy(70/SS.GW.scale));
|
||||||
LineDrawOrGetDistance(mm2, mm);
|
LineDrawOrGetDistance(mm2, mm);
|
||||||
}
|
}
|
||||||
LineDrawOrGetDistance(pp, pm);
|
LineDrawOrGetDistance(pp, pm);
|
||||||
|
@ -676,7 +676,9 @@ void Entity::DrawOrGetDistance(void) {
|
||||||
std::string str = DescriptionString().substr(5);
|
std::string str = DescriptionString().substr(5);
|
||||||
double th = Style::DefaultTextHeight();
|
double th = Style::DefaultTextHeight();
|
||||||
if(dogd.drawing) {
|
if(dogd.drawing) {
|
||||||
ssglWriteText(str, th, mm2, u, v, NULL, NULL);
|
Vector o = mm2.Plus(u.ScaledBy(3/SS.GW.scale)).Plus(
|
||||||
|
v.ScaledBy(3/SS.GW.scale));
|
||||||
|
ssglWriteText(str, th, o, u, v, NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
Vector pos = mm2.Plus(u.ScaledBy(ssglStrWidth(str, th)/2)).Plus(
|
Vector pos = mm2.Plus(u.ScaledBy(ssglStrWidth(str, th)/2)).Plus(
|
||||||
v.ScaledBy(ssglStrCapHeight(th)/2));
|
v.ScaledBy(ssglStrCapHeight(th)/2));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user