Make display scaling apply to InputRoll column header widths.
This commit is contained in:
parent
dd2b3509e5
commit
f7174eb398
|
@ -24,6 +24,15 @@
|
|||
/// <summary>
|
||||
/// If drawn rotated, specifies the desired height, or null to auto-size
|
||||
/// </summary>
|
||||
public int? RotatedHeight { get; set; }
|
||||
public int? RotatedHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the desired width as appropriate for a display with no scaling. If display
|
||||
/// scaling is enabled, the actual column width will be scaled accordingly.
|
||||
/// </summary>
|
||||
public int UnscaledWidth
|
||||
{
|
||||
set => Width = UIHelper.ScaleX(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,19 +66,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
lvCDL.AllColumns.Clear();
|
||||
lvCDL.AllColumns.AddRange(new []
|
||||
{
|
||||
new RollColumn { Name = "CDLFile", Text = "CDL File @", Width = 107, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Domain", Text = "Domain", Width = 126, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Percent", Text = "%", Width = 58, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Mapped", Text = "Mapped", Width = 64, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Size", Text = "Size", Width = 112, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x01", Text = "0x01", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x02", Text = "0x02", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x04", Text = "0x04", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x08", Text = "0x08", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x10", Text = "0x10", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x20", Text = "0x20", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x40", Text = "0x40", Width = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x80", Text = "0x80", Width = 56, Type = ColumnType.Text }
|
||||
new RollColumn { Name = "CDLFile", Text = "CDL File @", UnscaledWidth = 107, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Domain", Text = "Domain", UnscaledWidth = 126, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Percent", Text = "%", UnscaledWidth = 58, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Mapped", Text = "Mapped", UnscaledWidth = 64, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "Size", Text = "Size", UnscaledWidth = 112, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x01", Text = "0x01", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x02", Text = "0x02", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x04", Text = "0x04", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x08", Text = "0x08", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x10", Text = "0x10", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x20", Text = "0x20", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x40", Text = "0x40", UnscaledWidth = 56, Type = ColumnType.Text },
|
||||
new RollColumn { Name = "0x80", Text = "0x80", UnscaledWidth = 56, Type = ColumnType.Text }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -727,15 +727,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new RollColumn { Text = "Names", Name = NameColumn, Visible = true, Width = 128, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Address", Name = AddressColumn, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = ValueColumn, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare", Name = CompareColumn, Visible = true, Width = 63, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare Type", Name = ComparisonTypeColumn, Visible = true, Width = 98, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "On", Name = OnColumn, Visible = false, Width = 28, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Size", Name = SizeColumn, Visible = true, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Endian", Name = EndianColumn, Visible = false, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Display Type", Name = TypeColumn, Visible = false, Width = 88, Type = ColumnType.Text }
|
||||
new RollColumn { Text = "Names", Name = NameColumn, Visible = true, UnscaledWidth = 128, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Address", Name = AddressColumn, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = ValueColumn, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare", Name = CompareColumn, Visible = true, UnscaledWidth = 63, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Compare Type", Name = ComparisonTypeColumn, Visible = true, UnscaledWidth = 98, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "On", Name = OnColumn, Visible = false, UnscaledWidth = 28, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Size", Name = SizeColumn, Visible = true, UnscaledWidth = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Endian", Name = EndianColumn, Visible = false, UnscaledWidth = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Display Type", Name = TypeColumn, Visible = false, UnscaledWidth = 88, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = AddressColumnName,
|
||||
Text = AddressColumnName,
|
||||
Width = 94,
|
||||
UnscaledWidth = 94,
|
||||
Type = ColumnType.Text
|
||||
},
|
||||
new RollColumn
|
||||
{
|
||||
Name = InstructionColumnName,
|
||||
Text = InstructionColumnName,
|
||||
Width = 291,
|
||||
UnscaledWidth = 291,
|
||||
Type = ColumnType.Text
|
||||
}
|
||||
});
|
||||
|
|
|
@ -41,9 +41,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new RollColumn { Name = IconColumnName, Text = " ", Visible = true, Width = 22, Type = ColumnType.Image },
|
||||
new RollColumn { Name = ScriptColumnName, Text = "Script", Visible = true, Width = 92, Type = ColumnType.Text },
|
||||
new RollColumn { Name = PathColumnName, Text = "Path", Visible = true, Width = 300, Type = ColumnType.Text }
|
||||
new RollColumn { Name = IconColumnName, Text = " ", Visible = true, UnscaledWidth = 22, Type = ColumnType.Image },
|
||||
new RollColumn { Name = ScriptColumnName, Text = "Script", Visible = true, UnscaledWidth = 92, Type = ColumnType.Text },
|
||||
new RollColumn { Name = PathColumnName, Text = "Path", Visible = true, UnscaledWidth = 300, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -58,19 +58,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = BranchNumberColumnName,
|
||||
Text = "#",
|
||||
Width = 30
|
||||
UnscaledWidth = 30
|
||||
},
|
||||
new RollColumn
|
||||
{
|
||||
Name = FrameColumnName,
|
||||
Text = "Frame",
|
||||
Width = 64
|
||||
UnscaledWidth = 64
|
||||
},
|
||||
new RollColumn
|
||||
{
|
||||
Name = UserTextColumnName,
|
||||
Text = "UserText",
|
||||
Width = 90
|
||||
UnscaledWidth = 90
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -31,13 +31,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = "FrameColumn",
|
||||
Text = "Frame",
|
||||
Width = 52
|
||||
UnscaledWidth = 52
|
||||
},
|
||||
new RollColumn
|
||||
{
|
||||
Name = "LabelColumn",
|
||||
Text = "",
|
||||
Width = 125
|
||||
UnscaledWidth = 125
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -415,7 +415,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = FrameColumnName,
|
||||
Text = "Frame#",
|
||||
Width = 68,
|
||||
UnscaledWidth = 68,
|
||||
Type = ColumnType.Text,
|
||||
Rotatable = true
|
||||
});
|
||||
|
@ -525,7 +525,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = columnName,
|
||||
Text = columnText,
|
||||
Width = columnWidth,
|
||||
UnscaledWidth = columnWidth,
|
||||
Type = columnType
|
||||
});
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
HistoryView.AllColumns.Clear();
|
||||
HistoryView.AllColumns.AddRange(new[]
|
||||
{
|
||||
new RollColumn { Name = IdColumnName, Text = IdColumnName, Width = 40, Type = ColumnType.Text },
|
||||
new RollColumn { Name = UndoColumnName, Text = UndoColumnName, Width = 280, Type = ColumnType.Text }
|
||||
new RollColumn { Name = IdColumnName, Text = IdColumnName, UnscaledWidth = 40, Type = ColumnType.Text },
|
||||
new RollColumn { Name = UndoColumnName, Text = UndoColumnName, UnscaledWidth = 280, Type = ColumnType.Text }
|
||||
});
|
||||
|
||||
MaxStepsNum.Value = Log.MaxSteps;
|
||||
|
|
|
@ -81,14 +81,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Name = DisasmColumnName,
|
||||
Text = DisasmColumnName,
|
||||
Width = 239,
|
||||
UnscaledWidth = 239,
|
||||
Type = ColumnType.Text
|
||||
});
|
||||
TraceView.AllColumns.Add(new RollColumn
|
||||
{
|
||||
Name = RegistersColumnName,
|
||||
Text = RegistersColumnName,
|
||||
Width = 357,
|
||||
UnscaledWidth = 357,
|
||||
Type = ColumnType.Text
|
||||
});
|
||||
}
|
||||
|
|
|
@ -966,11 +966,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
};
|
||||
|
||||
PreviewMode = true;
|
||||
|
|
|
@ -79,14 +79,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Columns = new List<RollColumn>
|
||||
{
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, Width = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, Width = 128, Type = ColumnType.Text }
|
||||
new RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, UnscaledWidth = 60, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, UnscaledWidth = 59, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, UnscaledWidth = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, UnscaledWidth = 55, Type = ColumnType.Text },
|
||||
new RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, UnscaledWidth = 128, Type = ColumnType.Text }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue