mirror of
https://github.com/fadden/6502bench.git
synced 2025-01-16 04:32:34 +00:00
Minor UI tweaks
Typing a long comment in the project symbol editor caused the window to expand, which wasn't intended. Use the mono font in the comment editor. Set the focus to the OK button after creating or editing a project property. Show constant vs. address in the info panel when an EQU directive is selected.
This commit is contained in:
parent
6f61e37a81
commit
6bc491885a
@ -788,21 +788,6 @@ namespace SourceGen {
|
||||
return true;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Removes all header lines from the line list.
|
||||
///// </summary>
|
||||
//private void ClearHeaderLines() {
|
||||
// // Find the first non-header item.
|
||||
// int endIndex = FindLineByOffset(mLineList, 0);
|
||||
// if (endIndex == 0) {
|
||||
// // no header lines present
|
||||
// Debug.WriteLine("No header lines found");
|
||||
// return;
|
||||
// }
|
||||
// Debug.WriteLine("Removing " + endIndex + " header lines");
|
||||
// mLineList.RemoveRange(0, endIndex);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a synthetic offset for the FileOffset field from an index value. The
|
||||
/// index arg is the index of an entry in the DisasmProject.ActiveDefSymbolList.
|
||||
@ -823,6 +808,10 @@ namespace SourceGen {
|
||||
return offset + (1 << 24);
|
||||
}
|
||||
|
||||
// NOTE: the two functions above are tied to the implementation of the function
|
||||
// below: we output the lines in the order in which they appear in ActiveDefSymbolList.
|
||||
// If we want to get fancy and sort them, we'll need to do some additional work.
|
||||
|
||||
/// <summary>
|
||||
/// Generates the header lines (header comment, EQU directives).
|
||||
/// </summary>
|
||||
@ -834,7 +823,6 @@ namespace SourceGen {
|
||||
PseudoOp.PseudoOpNames opNames) {
|
||||
List<Line> tmpLines = new List<Line>();
|
||||
Line line;
|
||||
FormattedParts parts;
|
||||
|
||||
// Check for header comment.
|
||||
if (proj.LongComments.TryGetValue(Line.HEADER_COMMENT_OFFSET,
|
||||
@ -853,7 +841,7 @@ namespace SourceGen {
|
||||
null, defSym.DataDescriptor, defSym.Value, 1,
|
||||
PseudoOp.FormatNumericOpFlags.None);
|
||||
string comment = formatter.FormatEolComment(defSym.Comment);
|
||||
parts = FormattedParts.CreateEquDirective(defSym.Label,
|
||||
FormattedParts parts = FormattedParts.CreateEquDirective(defSym.Label,
|
||||
formatter.FormatPseudoOp(opNames.EquDirective),
|
||||
valueStr, comment);
|
||||
line.Parts = parts;
|
||||
|
@ -3270,6 +3270,11 @@ namespace SourceGen {
|
||||
sourceStr = "???";
|
||||
}
|
||||
extraStr = "Source: " + sourceStr;
|
||||
if (defSym.SymbolType == Symbol.Type.Constant) {
|
||||
extraStr += " (constant)";
|
||||
} else {
|
||||
extraStr += " (address)";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LineListGen.Line.Type.LocalVariableTable:
|
||||
|
@ -30,6 +30,7 @@ limitations under the License.
|
||||
<StackPanel Margin="8">
|
||||
<TextBlock Text="Enter comment:"/>
|
||||
<TextBox Name="commentTextBox" Text="{Binding CommentText}" Width="480" Margin="0,4,0,0"
|
||||
FontFamily="{StaticResource GeneralMonoFont}"
|
||||
TextChanged="CommentTextBox_TextChanged"/>
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Right"
|
||||
|
@ -22,7 +22,7 @@ limitations under the License.
|
||||
xmlns:local="clr-namespace:SourceGen.WpfGui"
|
||||
mc:Ignorable="d"
|
||||
Title="Edit Symbol"
|
||||
SizeToContent="WidthAndHeight" ResizeMode="NoResize"
|
||||
SizeToContent="Height" Width="320" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" WindowStartupLocation="CenterOwner"
|
||||
Loaded="Window_Loaded"
|
||||
ContentRendered="Window_ContentRendered">
|
||||
@ -69,7 +69,7 @@ limitations under the License.
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="Comment:" Margin="0,0,8,0"/>
|
||||
<StackPanel Grid.Column="1" Grid.Row="3">
|
||||
<TextBox Margin="0,1,0,0" Text="{Binding Comment, UpdateSourceTrigger=PropertyChanged}"
|
||||
FontFamily="{StaticResource GeneralMonoFont}"/>
|
||||
FontFamily="{StaticResource GeneralMonoFont}" ScrollViewer.CanContentScroll="True"/>
|
||||
<TextBlock Text="• Optional" Margin="0,4,0,16"/>
|
||||
</StackPanel>
|
||||
|
||||
|
@ -452,6 +452,8 @@ namespace SourceGen.WpfGui {
|
||||
// the symbol at the correct sorted position.
|
||||
LoadProjectSymbols();
|
||||
UpdateControls();
|
||||
|
||||
okButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
@ -485,6 +487,8 @@ namespace SourceGen.WpfGui {
|
||||
IsDirty = true;
|
||||
LoadProjectSymbols();
|
||||
UpdateControls();
|
||||
|
||||
okButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user