diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs
index 4f1118f0c19..b60a62a14e4 100644
--- a/src/DynamoCore/Configuration/PreferenceSettings.cs
+++ b/src/DynamoCore/Configuration/PreferenceSettings.cs
@@ -176,6 +176,11 @@ public bool IsADPAnalyticsReportingApproved
///
public int LibraryZoomScale { get; set; }
+ ///
+ /// Indicates the zoom scale of the Python editor
+ ///
+ public int PythonScriptZoomScale { get; set; }
+
///
/// The types of connector: Bezier or Polyline.
///
@@ -789,6 +794,7 @@ public PreferenceSettings()
BackupFiles = new List();
LibraryZoomScale = 100;
+ PythonScriptZoomScale = 22;
CustomPackageFolders = new List();
@@ -1211,5 +1217,6 @@ public bool IsCreatedFromValidFile
{
get { return isCreatedFromValidFile; }
}
+
}
}
diff --git a/src/DynamoCoreWpf/Properties/AssemblyInfo.cs b/src/DynamoCoreWpf/Properties/AssemblyInfo.cs
index 607a7b026e0..fbaef78eac4 100644
--- a/src/DynamoCoreWpf/Properties/AssemblyInfo.cs
+++ b/src/DynamoCoreWpf/Properties/AssemblyInfo.cs
@@ -47,6 +47,7 @@
[assembly: InternalsVisibleTo("PackageDetailsViewExtension")]
[assembly: InternalsVisibleTo("Notifications")]
[assembly: InternalsVisibleTo("LibraryViewExtensionWebView2")]
+[assembly: InternalsVisibleTo("PythonNodeModelsWpf")]
[assembly: InternalsVisibleTo("IronPythonTests")]
[assembly: InternalsVisibleTo("DynamoPackagesWPF")]
[assembly: InternalsVisibleTo("DynamoPlayerExtension")]
diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
index 85c65169c04..957d2f1cb24 100644
--- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs
+++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
@@ -6791,6 +6791,15 @@ public static string PreferencesViewPython {
}
}
+ ///
+ /// Looks up a localized string similar to Python Editor.
+ ///
+ public static string PreferencesViewPythonEditorLable {
+ get {
+ return ResourceManager.GetString("PreferencesViewPythonEditorLable", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Requires relaunch of Dynamo.
///
@@ -6989,6 +6998,51 @@ public static string PreferencesViewVisualSettingsTab {
}
}
+ ///
+ /// Looks up a localized string similar to 0%.
+ ///
+ public static string PreferencesViewZoomScaling0Percent {
+ get {
+ return ResourceManager.GetString("PreferencesViewZoomScaling0Percent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 100%.
+ ///
+ public static string PreferencesViewZoomScaling100Percent {
+ get {
+ return ResourceManager.GetString("PreferencesViewZoomScaling100Percent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 10%.
+ ///
+ public static string PreferencesViewZoomScaling10Percent {
+ get {
+ return ResourceManager.GetString("PreferencesViewZoomScaling10Percent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 25%.
+ ///
+ public static string PreferencesViewZoomScaling25Percent {
+ get {
+ return ResourceManager.GetString("PreferencesViewZoomScaling25Percent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to 300%.
+ ///
+ public static string PreferencesViewZoomScaling300Percent {
+ get {
+ return ResourceManager.GetString("PreferencesViewZoomScaling300Percent", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Zoom Scaling.
///
@@ -7686,6 +7740,15 @@ public static string PythonTemplateAddPathTooltip {
}
}
+ ///
+ /// Looks up a localized string similar to Drag to adjust Python Editor zoom scale between 10% and 100%. You can also adjust this in Python Editor by pressing Shift and scrolling the mouse wheel..
+ ///
+ public static string PythonZoomScaleTooltipText {
+ get {
+ return ResourceManager.GetString("PythonZoomScaleTooltipText", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Query.
///
diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
index ac8bd2429f9..9e6268c7951 100644
--- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
@@ -3494,6 +3494,9 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
Library
+
+ Drag to adjust Python Editor zoom scale between 10% and 100%. You can also adjust this in Python Editor by pressing Shift and scrolling the mouse wheel.
+
Dynamo must be relaunched to apply the language selection.
@@ -3515,4 +3518,23 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
Color
+
+ 0%
+
+
+ 100%
+
+
+ 10%
+
+
+ 25%
+
+
+ 300%
+
+
+ Python Editor
+ Preferences -> ZoomScalling -> Python Editor
+
\ No newline at end of file
diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx
index e9f26df6d33..78fdffe043e 100644
--- a/src/DynamoCoreWpf/Properties/Resources.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.resx
@@ -3481,6 +3481,9 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
Library
+
+ Drag to adjust Python Editor zoom scale between 10% and 100%. You can also adjust this in Python Editor by pressing Shift and scrolling the mouse wheel.
+
Dynamo must be relaunched to apply the language selection.
@@ -3502,4 +3505,23 @@ In certain complex graphs or host program scenarios, Automatic mode may cause in
Color
+
+ 0%
+
+
+ 100%
+
+
+ 10%
+
+
+ 25%
+
+
+ 300%
+
+
+ Python Editor
+ Preferences -> ZoomScalling -> Python Editor
+
\ No newline at end of file
diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
index 6851a70e37a..0a6cad5a78c 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
@@ -816,6 +816,16 @@ void Watch3DViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
}
}
+
+ internal event EventHandler PreferencesWindowChanged;
+ internal void OnPreferencesWindowChanged(object preferencesView)
+ {
+ if(PreferencesWindowChanged != null)
+ {
+ PreferencesWindowChanged(preferencesView, new EventArgs());
+ }
+ }
+
internal event EventHandler NodeViewReady;
internal void OnNodeViewReady(object nodeView)
{
diff --git a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
index a7a7220f07d..534348341ad 100644
--- a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
@@ -1195,7 +1195,7 @@ public virtual void OnRequestShowFileDialog(object sender, PythonTemplatePathEve
public DelegateCommand AddPythonPathCommand { get; private set; }
public DelegateCommand DeletePythonPathCommand { get; private set; }
- public DelegateCommand UpdatePythonPathCommand { get; private set; }
+ public DelegateCommand UpdatePythonPathCommand { get; private set; }
private void InitializeCommands()
{
diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
index 1af3ae5b45d..95234466e67 100644
--- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
@@ -103,8 +103,6 @@ internal PreferencesView PreferencesWindow {
get { return preferencesWindow; }
}
- internal event Action OnPreferencesWindowChanged;
-
///
/// Constructor
///
@@ -1913,7 +1911,7 @@ private void OnDebugModesClick(object sender, RoutedEventArgs e)
private void OnPreferencesWindowClick(object sender, RoutedEventArgs e)
{
preferencesWindow = new PreferencesView(this);
- OnPreferencesWindowChanged();
+ dynamoViewModel.OnPreferencesWindowChanged(preferencesWindow);
preferencesWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
preferencesWindow.ShowDialog();
}
diff --git a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
index 880e6debe98..490e5b870e7 100644
--- a/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
+++ b/src/DynamoCoreWpf/Views/Menu/PreferencesView.xaml
@@ -836,7 +836,7 @@
-