From 0fca1c0f442080c9700af6f1e031aa7daa8a77ee Mon Sep 17 00:00:00 2001 From: John Lewin Date: Thu, 29 Sep 2016 14:27:42 -0700 Subject: [PATCH] Improve keyboard support for make/model selectors - Turn on TabStop for make/model DropLists - Add focus indicator for make/model DropLists --- PrinterControls/PrinterConnections/PrinterChooser.cs | 12 ++++++++++++ .../PrinterConnections/SetupStepMakeModelName.cs | 4 +++- Submodules/agg-sharp | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/PrinterControls/PrinterConnections/PrinterChooser.cs b/PrinterControls/PrinterConnections/PrinterChooser.cs index dae3c1573..48fd338aa 100644 --- a/PrinterControls/PrinterConnections/PrinterChooser.cs +++ b/PrinterControls/PrinterConnections/PrinterChooser.cs @@ -34,6 +34,8 @@ using System.Collections.Generic; using MatterHackers.MatterControl.SettingsManagement; using System.IO; using System.Linq; +using MatterHackers.Agg; +using System; namespace MatterHackers.MatterControl { @@ -72,6 +74,16 @@ namespace MatterHackers.MatterControl Invalidate(); } } + + public override void OnDraw(Graphics2D graphics2D) + { + base.OnDraw(graphics2D); + + if (Focused) + { + graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Orange); + } + } } } \ No newline at end of file diff --git a/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs b/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs index cb9f075e3..51eb939d7 100644 --- a/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs +++ b/PrinterControls/PrinterConnections/SetupStepMakeModelName.cs @@ -46,7 +46,8 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections HAnchor = HAnchor.ParentLeftRight, Margin = elementMargin, Name = "Select Make", - ListSource = OemSettings.Instance.AllOems + ListSource = OemSettings.Instance.AllOems, + TabStop = true }; printerManufacturerSelector.SelectionChanged += ManufacturerDropList_SelectionChanged; @@ -66,6 +67,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections Name = "Select Model", HAnchor = HAnchor.ParentLeftRight, Margin = elementMargin, + TabStop = true }; printerModelSelector.SelectionChanged += ModelDropList_SelectionChanged; diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index b88e5198b..a5dd5f2c4 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit b88e5198bd8f923ac47a59b92fba7a3b77afbf0a +Subproject commit a5dd5f2c490013763dc7fb53358c22a255f2e108