Skip to content

Commit 80bcee0

Browse files
committed
New ASN.1 Node dialog respects font size: #67
1 parent d5786a8 commit 80bcee0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Asn1Editor/API/ViewModel/NewAsnNodeEditorVM.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class NewAsnNodeEditorVM : ClosableWindowVM, INewAsnNodeEditorVM {
2222
Asn1Type selectedType;
2323

2424
public NewAsnNodeEditorVM(NodeViewOptions options) {
25+
NodeViewOptions = options;
2526
TagTextBoxWidth = TextUtility.MeasureStringWidth(masterTag, options.FontSize, false);
2627
formTagChecked = true;
2728
OkCommand = new RelayCommand(save, canSave);
@@ -32,6 +33,8 @@ public NewAsnNodeEditorVM(NodeViewOptions options) {
3233

3334
public ICommand OkCommand { get; }
3435

36+
public NodeViewOptions NodeViewOptions { get; }
37+
3538
public Boolean FormTagChecked {
3639
get => formTagChecked;
3740
set {

Asn1Editor/Views/Windows/NewTreeNodeWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
d:DataContext="{d:DesignInstance vm:NewAsnNodeEditorVM}"
1212
Background="{StaticResource PanelBackgroundBrush}"
1313
Foreground="{StaticResource Panel.FgBrush}"
14+
FontSize="{Binding NodeViewOptions.FontSize, Mode=OneTime}"
1415
Title="New ASN.1 Node"
1516
SizeToContent="Height"
1617
ResizeMode="NoResize"

0 commit comments

Comments
 (0)