Fixed table row height not resizing correctly as the font size is

changed
This commit is contained in:
dragonmacher
2026-06-25 18:08:30 -04:00
parent be4393113e
commit b6a1a35f26
14 changed files with 63 additions and 38 deletions

View File

@@ -354,8 +354,8 @@ public class DebuggerConsoleProvider extends ComponentProviderAdapter
}
}
protected static class LogTableModel extends DebouncedRowWrappedEnumeratedColumnTableModel<
LogTableColumns, ActionContext, LogRow<?>, LogRow<?>> {
protected static class LogTableModel extends
DebouncedRowWrappedEnumeratedColumnTableModel<LogTableColumns, ActionContext, LogRow<?>, LogRow<?>> {
public LogTableModel(PluginTool tool) {
super(tool, "Log", LogTableColumns.class, r -> r == null ? null : r.actionContext(),
@@ -431,7 +431,8 @@ public class DebuggerConsoleProvider extends ComponentProviderAdapter
@AutoOptionDefined(
name = DebuggerResources.OPTION_NAME_LOG_BUFFER_LIMIT,
description = "The maximum number of entries in the console log (0 or less for unlimited)",
help = @HelpInfo(anchor = "buffer_limit"))
help = @HelpInfo(anchor = "buffer_limit")
)
private int logBufferLimit = DebuggerResources.DEFAULT_LOG_BUFFER_LIMIT;
@SuppressWarnings("unused")
private final AutoOptions.Wiring autoOptionsWiring;
@@ -511,7 +512,7 @@ public class DebuggerConsoleProvider extends ComponentProviderAdapter
}
});
logTable.setRowHeight(ACTION_BUTTON_SIZE + 2);
logTable.setPreferredRowHeight(ACTION_BUTTON_SIZE + 2);
}
protected boolean activateSelectedRow() {

View File

@@ -176,8 +176,7 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
SECTIONS("Sections", String.class, RangeEntry::getSectionNames),
SRC_MIN("SrcMin", Address.class, RangeEntry::getSrcMinAddress),
SRC_MAX("SrcMax", Address.class, RangeEntry::getSrcMaxAddress),
BLOCK("Block", String.class, RangeEntry::getBlockName, RangeEntry::setBlockName,
RangeEntry::isCreate),
BLOCK("Block", String.class, RangeEntry::getBlockName, RangeEntry::setBlockName, RangeEntry::isCreate),
OVERLAY("Overlay", Boolean.class, RangeEntry::isOverlay),
DST_MIN("DstMin", Address.class, RangeEntry::getDstMinAddress),
DST_MAX("DstMax", Address.class, RangeEntry::getDstMaxAddress);
@@ -470,7 +469,7 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
addCancelButton();
addResetButton();
table.setRowHeight(BUTTON_SIZE);
table.setPreferredRowHeight(BUTTON_SIZE);
}
protected void addResetButton() {

View File

@@ -207,7 +207,7 @@ public class DebuggerRegionMapProposalDialog
protected void populateComponents() {
super.populateComponents();
setPreferredSize(600, 300);
table.setRowHeight(BUTTON_SIZE);
table.setPreferredRowHeight(BUTTON_SIZE);
}
private void chooseAndSetBlock(RegionMapEntry entry) {

View File

@@ -127,8 +127,7 @@ public class DebuggerModuleMapProposalDialog
return CustomToStringCellRenderer.MONO_ULONG_HEX;
}
},
MEMORIZE("Memorize", Boolean.class, ModuleMapEntry::isMemorize,
ModuleMapEntry::setMemorize);
MEMORIZE("Memorize", Boolean.class, ModuleMapEntry::isMemorize, ModuleMapEntry::setMemorize);
private final String header;
private final Class<?> cls;
@@ -208,7 +207,7 @@ public class DebuggerModuleMapProposalDialog
protected void populateComponents() {
super.populateComponents();
setPreferredSize(600, 300);
table.setRowHeight(BUTTON_SIZE);
table.setPreferredRowHeight(BUTTON_SIZE);
}
private void chooseAndSetProgram(ModuleMapEntry entry) {

View File

@@ -20,7 +20,7 @@ import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Function;
import javax.swing.table.*;
import javax.swing.table.TableCellEditor;
import docking.widgets.table.*;
import ghidra.app.plugin.core.debug.gui.AbstractDebuggerMapProposalDialog;
@@ -209,7 +209,7 @@ public class DebuggerSectionMapProposalDialog
protected void populateComponents() {
super.populateComponents();
setPreferredSize(600, 300);
table.setRowHeight(BUTTON_SIZE);
table.setPreferredRowHeight(BUTTON_SIZE);
}
private void chooseAndSetBlock(SectionMapEntry entry) {