Make more touch screen settings be about touch not android.

This commit is contained in:
Lars Brubaker 2017-01-23 14:58:29 -08:00
parent 6e00ff2d64
commit 0ffb3a5b41
9 changed files with 55 additions and 39 deletions

View file

@ -125,9 +125,10 @@ namespace MatterHackers.MatterControl
if (this.UpdateRequired && !haveShowUpdateRequired)
{
haveShowUpdateRequired = true;
#if !__ANDROID__
UiThread.RunOnIdle(CheckForUpdateWindow.Show);
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
UiThread.RunOnIdle(CheckForUpdateWindow.Show);
}
}
}
}

View file

@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl
TextImageButtonFactory advancedControlsButtonFactory = new TextImageButtonFactory();
advancedControlsButtonFactory.fontSize = 14;
advancedControlsButtonFactory.invertImageLocation = false;
backButton = advancedControlsButtonFactory.Generate("Back".Localize(), StaticData.Instance.LoadIcon("icon_arrow_left_32x32.png", 32,32));
backButton = advancedControlsButtonFactory.Generate("Back".Localize(), StaticData.Instance.LoadIcon("icon_arrow_left_32x32.png", 32, 32));
backButton.ToolTipText = "Switch to Queue, Library and History".Localize();
backButton.Margin = new BorderDouble(right: 3);
backButton.VAnchor = VAnchor.ParentBottom;
@ -137,15 +137,16 @@ namespace MatterHackers.MatterControl
var sliceSettingsTabPage = new TabPage(sliceSettingsWidget, "Settings".Localize().ToUpper());
var sliceSettingPopOut = new PopOutTextTabWidget(sliceSettingsTabPage, SliceSettingsTabName, new Vector2(590, 400), textSize);
advancedControls.AddTab(sliceSettingPopOut);
var controlsTabPage = new TabPage(manualPrinterControlsScrollArea, "Controls".Localize().ToUpper());
var controlsPopOut = new PopOutTextTabWidget(controlsTabPage, ControlsTabName, new Vector2(400, 300), textSize);
advancedControls.AddTab(controlsPopOut);
#if !__ANDROID__
MenuOptionSettings.sliceSettingsPopOut = sliceSettingPopOut;
MenuOptionSettings.controlsPopOut = controlsPopOut;
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
MenuOptionSettings.sliceSettingsPopOut = sliceSettingPopOut;
MenuOptionSettings.controlsPopOut = controlsPopOut;
}
var optionsControls = new PrinterConfigurationScrollWidget();
advancedControls.AddTab(new SimpleTextTabWidget(new TabPage(optionsControls, "Options".Localize().ToUpper()), "Options Tab", textSize,

View file

@ -109,11 +109,12 @@ namespace MatterHackers.MatterControl
TopContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
TopContainer.HAnchor = HAnchor.ParentLeftRight;
#if !__ANDROID__
// The application menu bar, which is suppressed on Android
ApplicationMenuRow menuRow = new ApplicationMenuRow();
TopContainer.AddChild(menuRow);
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
// The application menu bar, which is suppressed on Android
ApplicationMenuRow menuRow = new ApplicationMenuRow();
TopContainer.AddChild(menuRow);
}
menuSeparator = new GuiWidget();
menuSeparator.Height = 12;
@ -154,11 +155,12 @@ namespace MatterHackers.MatterControl
var container = new FlowLayoutWidget(FlowDirection.TopToBottom);
container.AnchorAll();
#if !__ANDROID__
// The application menu bar, which is suppressed on Android
var menuRow = new ApplicationMenuRow();
container.AddChild(menuRow);
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
// The application menu bar, which is suppressed on Android
var menuRow = new ApplicationMenuRow();
container.AddChild(menuRow);
}
var menuSeparator = new GuiWidget()
{

View file

@ -352,9 +352,11 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder
{
if (firstDraw)
{
#if !__ANDROID__
textToAddWidget.Focus();
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
textToAddWidget.Focus();
}
//textToAddWidget.Text = "Test Text";
firstDraw = false;
}

View file

@ -56,10 +56,11 @@ namespace MatterHackers.MatterControl.ConfigurationPage
{
cannotRestartWhilePrintIsActiveMessage = "Oops! You cannot restart while a print is active.".Localize();
cannotRestartWhileActive = "Unable to restart".Localize();
#if __ANDROID__
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
if (UserSettings.Instance.IsTouchScreen)
{
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
}
#endif
if (UserSettings.Instance.IsTouchScreen)
{
mainContainer.AddChild(GetUpdateControl());
@ -77,14 +78,15 @@ namespace MatterHackers.MatterControl.ConfigurationPage
}
#if !__ANDROID__
mainContainer.AddChild(GetThumbnailRenderingControl());
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
if (!UserSettings.Instance.IsTouchScreen)
{
mainContainer.AddChild(GetThumbnailRenderingControl());
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
mainContainer.AddChild(GetDisplayControl());
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
#endif
mainContainer.AddChild(GetDisplayControl());
mainContainer.AddChild(new HorizontalLine(separatorLineColor));
}
if (UserSettings.Instance.IsTouchScreen)
{
mainContainer.AddChild(GetModeControl());
@ -446,11 +448,14 @@ namespace MatterHackers.MatterControl.ConfigurationPage
if (acceptableUpdateFeedTypeValues.IndexOf(currentThumbnailRenderingMode) == -1)
{
#if __ANDROID__
if (!UserSettings.Instance.IsTouchScreen)
{
UserSettings.Instance.set(UserSettingsKey.ThumbnailRenderingMode, "orthographic");
#else
}
else
{
UserSettings.Instance.set(UserSettingsKey.ThumbnailRenderingMode, "raytraced");
#endif
}
}
interfaceOptionsDropList.SelectedValue = UserSettings.Instance.get(UserSettingsKey.ThumbnailRenderingMode);

View file

@ -4,6 +4,7 @@ using System.Collections.Generic;
using System;
using Newtonsoft.Json;
using System.Linq;
using MatterHackers.Agg.UI;
namespace MatterHackers.MatterControl
{

View file

@ -1,6 +1,7 @@
using MatterHackers.MatterControl.DataStorage;
using System.Collections.Generic;
using System.Linq;
using MatterHackers.Agg.UI;
namespace MatterHackers.MatterControl
{
@ -55,6 +56,7 @@ namespace MatterHackers.MatterControl
if (globalInstance == null)
{
globalInstance = new UserSettings();
ToolTipManager.AllowToolTips = !UserSettings.Instance.IsTouchScreen;
}
}
}

@ -1 +1 @@
Subproject commit 7f09ac8cd545abb3e8e75edc0b20acd3b8540e11
Subproject commit f995c5e29ece6e2603117314fc8cc7d88d4cd89a

View file

@ -361,9 +361,11 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator
{
if (firstDraw)
{
#if !__ANDROID__
textToAddWidget.Focus();
#endif
if (!UserSettings.Instance.IsTouchScreen)
{
textToAddWidget.Focus();
}
//textToAddWidget.Text = "Test Text";
firstDraw = false;
}