mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-01-09 14:08:03 -05:00
GP-6142 - Hovers - Fixed default tootip padding bug
This commit is contained in:
@@ -139,18 +139,16 @@ public class DataTypeListingHover extends AbstractConfigurableHover implements L
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(HTMLUtilities.HTML);
|
||||
sb.append("<TABLE>");
|
||||
if (parent != null) {
|
||||
DataType parentType = parent.getDataType();
|
||||
sb.append(row("Parent: ", parentType.getDataTypePath()));
|
||||
int offset = (int) data.getAddress().subtract(parent.getAddress());
|
||||
sb.append(row("Offset: ", NumericUtilities.toHexString(offset)));
|
||||
sb.append(row("Field Name: ", nameLoc.getFieldName()));
|
||||
if (parentType instanceof Structure pst) {
|
||||
DataTypeComponent dtc = pst.getComponentAt(offset);
|
||||
String comment = dtc == null ? null : dtc.getComment();
|
||||
if (comment != null) {
|
||||
sb.append(row("Comment: ", comment));
|
||||
}
|
||||
DataType parentType = parent.getDataType();
|
||||
sb.append(row("Parent: ", parentType.getDataTypePath()));
|
||||
int offset = (int) data.getAddress().subtract(parent.getAddress());
|
||||
sb.append(row("Offset: ", NumericUtilities.toHexString(offset)));
|
||||
sb.append(row("Field Name: ", nameLoc.getFieldName()));
|
||||
if (parentType instanceof Structure pst) {
|
||||
DataTypeComponent dtc = pst.getComponentAt(offset);
|
||||
String comment = dtc == null ? null : dtc.getComment();
|
||||
if (comment != null) {
|
||||
sb.append(row("Comment: ", comment));
|
||||
}
|
||||
}
|
||||
sb.append("</TABLE>");
|
||||
|
||||
@@ -38,8 +38,8 @@ import util.CollectionUtils;
|
||||
* the window will be closed.
|
||||
*/
|
||||
public class PopupWindow {
|
||||
private static final int X_PADDING = 25;
|
||||
private static final int Y_PADDING = 25;
|
||||
private static final int X_PADDING = 15;
|
||||
private static final int Y_PADDING = 15;
|
||||
private static final List<WeakReference<PopupWindow>> VISIBLE_POPUPS = new ArrayList<>();
|
||||
|
||||
public static void hideAllWindows() {
|
||||
@@ -370,9 +370,7 @@ public class PopupWindow {
|
||||
if (CollectionUtils.isAllNull(location, keepVisibleArea)) {
|
||||
throw new NullPointerException("Both location and keepVisibleArea cannot be null");
|
||||
}
|
||||
if (keepVisibleArea == null) {
|
||||
keepVisibleArea = new Rectangle(location, new Dimension(0, 0));
|
||||
}
|
||||
|
||||
this.location = location;
|
||||
this.source = source;
|
||||
this.screenKeepVisibleArea = createScreenKeepVisibleArea(location, keepVisibleArea);
|
||||
|
||||
Reference in New Issue
Block a user