File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
GeonBit.UI/GeonBit.UI/Entities Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,17 @@ override protected void DoOnValueChange()
225
225
base . DoOnValueChange ( ) ;
226
226
}
227
227
228
+ /// <summary>
229
+ /// Return the actual dest rect for auto-anchoring purposes.
230
+ /// This is useful for things like DropDown, that when opened they take a larger part of the screen, but we don't
231
+ /// want it to push down other entities.
232
+ /// </summary>
233
+ override protected Rectangle GetDestRectForAutoAnchors ( )
234
+ {
235
+ _selectedTextPanel . UpdateDestinationRectsIfDirty ( ) ;
236
+ return _selectedTextPanel . GetActualDestRect ( ) ;
237
+ }
238
+
228
239
/// <summary>
229
240
/// Get actual destination rect for positioning, which is the size of the DropDown entity when list is closed.
230
241
/// </summary>
Original file line number Diff line number Diff line change @@ -1330,7 +1330,7 @@ virtual public Rectangle CalcDestRect()
1330
1330
}
1331
1331
1332
1332
// align y
1333
- ret . Y = prevEntity . GetActualDestRect ( ) . Bottom + ( int ) ( offset . Y +
1333
+ ret . Y = prevEntity . GetDestRectForAutoAnchors ( ) . Bottom + ( int ) ( offset . Y +
1334
1334
prevEntity . _scaledSpaceAfter . Y +
1335
1335
_scaledSpaceBefore . Y ) ;
1336
1336
}
@@ -1376,6 +1376,16 @@ virtual public Rectangle GetActualDestRect()
1376
1376
return _destRect ;
1377
1377
}
1378
1378
1379
+ /// <summary>
1380
+ /// Return the actual dest rect for auto-anchoring purposes.
1381
+ /// This is useful for things like DropDown, that when opened they take a larger part of the screen, but we don't
1382
+ /// want it to push down other entities.
1383
+ /// </summary>
1384
+ virtual protected Rectangle GetDestRectForAutoAnchors ( )
1385
+ {
1386
+ return GetActualDestRect ( ) ;
1387
+ }
1388
+
1379
1389
/// <summary>
1380
1390
/// Remove this entity from its parent.
1381
1391
/// </summary>
You can’t perform that action at this time.
0 commit comments