From 03e1fee9013fb6ce867cb6a060604c71ef40b0cc Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Mon, 12 Dec 2016 13:32:10 -0800 Subject: [PATCH] Moving keyboard offset to common base class --- AboutPage/ContactForm.cs | 4 ---- ActionBar/PrinterSelector.cs | 2 +- BrailleBuilder/BrailleBuilderMainWindow.cs | 4 ---- .../ApplicationSettings/ApplicationSettingsView.cs | 1 - EeProm/EePromMarlinWindow.cs | 4 ---- EeProm/EePromRepetierWindow.cs | 4 ---- PartPreviewWindow/PartPreviewMainWindow.cs | 4 ---- PartPreviewWindow/SaveAsWindow.cs | 4 ---- PrinterControls/TerminalWindow/TerminalWindow.cs | 4 ---- SetupWizard/WizardWindow.cs | 4 ---- Submodules/agg-sharp | 2 +- TextCreator/TextCreatorMainWindow.cs | 4 ---- 12 files changed, 2 insertions(+), 39 deletions(-) diff --git a/AboutPage/ContactForm.cs b/AboutPage/ContactForm.cs index da8a91325..6144dd363 100644 --- a/AboutPage/ContactForm.cs +++ b/AboutPage/ContactForm.cs @@ -326,11 +326,7 @@ namespace MatterHackers.MatterControl.ContactForm contactFormWidget = new ContactFormWidget(subject, bodyText); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(contactFormWidget)); -#else AddChild(contactFormWidget); -#endif AddHandlers(); ShowAsSystemWindow(); diff --git a/ActionBar/PrinterSelector.cs b/ActionBar/PrinterSelector.cs index ca733dc00..242e01477 100644 --- a/ActionBar/PrinterSelector.cs +++ b/ActionBar/PrinterSelector.cs @@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl } var menuItem = this.AddItem(StaticData.Instance.LoadIcon("icon_plus.png", 32, 32), "Add New Printer...", "new"); - menuItem.Selectable = false; + menuItem.CanHeldSelection = false; menuItem.Click += (s, e) => { if (AddPrinter != null) diff --git a/BrailleBuilder/BrailleBuilderMainWindow.cs b/BrailleBuilder/BrailleBuilderMainWindow.cs index 1e530279e..c69fc2960 100644 --- a/BrailleBuilder/BrailleBuilderMainWindow.cs +++ b/BrailleBuilder/BrailleBuilderMainWindow.cs @@ -52,11 +52,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder ActiveSliceSettings.Instance.GetValue(SettingsKey.print_center), ActiveSliceSettings.Instance.GetValue(SettingsKey.bed_shape)); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(part3DView)); -#else this.AddChild(part3DView); -#endif this.AnchorAll(); diff --git a/ConfigurationPage/ApplicationSettings/ApplicationSettingsView.cs b/ConfigurationPage/ApplicationSettings/ApplicationSettingsView.cs index fb8339095..51b20124d 100644 --- a/ConfigurationPage/ApplicationSettings/ApplicationSettingsView.cs +++ b/ConfigurationPage/ApplicationSettings/ApplicationSettingsView.cs @@ -524,7 +524,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage LocalizedString.ResetTranslationMap(); ApplicationController.Instance.MainView = new TouchscreenView(); app.RemoveAllChildren(); - app.AddChild(new SoftKeyboardContentOffset(ApplicationController.Instance.MainView)); app.AnchorAll(); #endif }); diff --git a/EeProm/EePromMarlinWindow.cs b/EeProm/EePromMarlinWindow.cs index 64c2cd4ab..fe1be04c6 100644 --- a/EeProm/EePromMarlinWindow.cs +++ b/EeProm/EePromMarlinWindow.cs @@ -266,11 +266,7 @@ namespace MatterHackers.MatterControl.EeProm PrinterConnectionAndCommunication.Instance.CommunicationUnconditionalFromPrinter.RegisterEvent(currentEePromSettings.Add, ref unregisterEvents); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(mainContainer)); -#else AddChild(mainContainer); -#endif ShowAsSystemWindow(); diff --git a/EeProm/EePromRepetierWindow.cs b/EeProm/EePromRepetierWindow.cs index aad322a10..017fc5826 100644 --- a/EeProm/EePromRepetierWindow.cs +++ b/EeProm/EePromRepetierWindow.cs @@ -184,11 +184,7 @@ namespace MatterHackers.MatterControl.EeProm topToBottom.AddChild(buttonBar); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(topToBottom)); -#else this.AddChild(topToBottom); -#endif Title = LocalizedString.Get("Firmware EEPROM Settings"); diff --git a/PartPreviewWindow/PartPreviewMainWindow.cs b/PartPreviewWindow/PartPreviewMainWindow.cs index 63eed14ad..0a2760407 100644 --- a/PartPreviewWindow/PartPreviewMainWindow.cs +++ b/PartPreviewWindow/PartPreviewMainWindow.cs @@ -57,11 +57,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Close(); }; -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(partPreviewWidget)); -#else this.AddChild(partPreviewWidget); -#endif AddHandlers(); diff --git a/PartPreviewWindow/SaveAsWindow.cs b/PartPreviewWindow/SaveAsWindow.cs index 1fc14c483..e8f31c7b6 100644 --- a/PartPreviewWindow/SaveAsWindow.cs +++ b/PartPreviewWindow/SaveAsWindow.cs @@ -145,11 +145,7 @@ namespace MatterHackers.MatterControl topToBottom.AddChild(buttonRow); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(topToBottom)); -#else this.AddChild(topToBottom); -#endif ShowAsSystemWindow(); } diff --git a/PrinterControls/TerminalWindow/TerminalWindow.cs b/PrinterControls/TerminalWindow/TerminalWindow.cs index 87ecf3be4..031b1d98d 100644 --- a/PrinterControls/TerminalWindow/TerminalWindow.cs +++ b/PrinterControls/TerminalWindow/TerminalWindow.cs @@ -96,11 +96,7 @@ namespace MatterHackers.MatterControl : base(width, height) { AlwaysOnTopOfMain = true; -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(new TerminalWidget(true))); -#else this.AddChild(new TerminalWidget(true)); -#endif Title = LocalizedString.Get("MatterControl - Terminal"); this.ShowAsSystemWindow(); MinimumSize = minSize; diff --git a/SetupWizard/WizardWindow.cs b/SetupWizard/WizardWindow.cs index d8af72873..6103aa8a6 100644 --- a/SetupWizard/WizardWindow.cs +++ b/SetupWizard/WizardWindow.cs @@ -162,11 +162,7 @@ namespace MatterHackers.MatterControl { pageToChangeTo.WizardWindow = this; this.CloseAllChildren(); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(pageToChangeTo)); -#else this.AddChild(pageToChangeTo); -#endif this.Invalidate(); } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index f676c35a6..83ec53c0d 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit f676c35a6660435156d8069da691ddedff8e2aee +Subproject commit 83ec53c0dc4ecf1068973c6f7ab04159995a13b6 diff --git a/TextCreator/TextCreatorMainWindow.cs b/TextCreator/TextCreatorMainWindow.cs index 767c7769d..44dcdf0a8 100644 --- a/TextCreator/TextCreatorMainWindow.cs +++ b/TextCreator/TextCreatorMainWindow.cs @@ -52,11 +52,7 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator ActiveSliceSettings.Instance.GetValue(SettingsKey.print_center), ActiveSliceSettings.Instance.GetValue(SettingsKey.bed_shape)); -#if __ANDROID__ - this.AddChild(new SoftKeyboardContentOffset(part3DView)); -#else this.AddChild(part3DView); -#endif this.AnchorAll();