Switched custom GCode boxes to monospace font
This commit is contained in:
parent
10b1835775
commit
0b4bc4cbbc
3 changed files with 15 additions and 7 deletions
|
|
@ -26,7 +26,9 @@ The views and conclusions contained in the software and documentation are those
|
|||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.PlatformAbstract;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
|
@ -37,6 +39,7 @@ using MatterHackers.SerialPortCommunication.FrostedSerial;
|
|||
using MatterHackers.VectorMath;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||
|
|
@ -1210,11 +1213,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
case SliceSettingData.DataEditTypes.MULTI_LINE_TEXT:
|
||||
{
|
||||
string convertedNewLines = sliceSettingValue.Replace("\\n", "\n");
|
||||
var stringEdit = new MHTextEditWidget(convertedNewLines, pixelWidth: 320, pixelHeight: multiLineEditHeight, multiLine: true, tabIndex: tabIndexForItem++)
|
||||
string pathToFont = StaticData.Instance.ReadAllText(Path.Combine("Fonts", "LiberationMono.svg"));
|
||||
var stringEdit = new MHTextEditWidget(convertedNewLines, pixelWidth: 320, pixelHeight: multiLineEditHeight, multiLine: true, tabIndex: tabIndexForItem++, typeFace: TypeFace.LoadFrom(pathToFont))
|
||||
{
|
||||
HAnchor = HAnchor.ParentLeftRight,
|
||||
};
|
||||
|
||||
|
||||
stringEdit.ActualTextEditWidget.EditComplete += (sender, e) =>
|
||||
{
|
||||
SaveSetting(settingData.SlicerConfigName, ((TextEditWidget)sender).Text.Replace("\n", "\\n"), persistenceLayer);
|
||||
|
|
@ -1780,4 +1784,4 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
topToBottomItemList.AddChild(itemHolder, indexInChildrenList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue