Artemis.Profiles.ProfileModel.ResizeLayers C# (CSharp) Method

ResizeLayers() public method

Resizes layers that are shown in the editor and match exactly the full keyboard widht and height
public ResizeLayers ( KeyboardProvider target ) : void
target Artemis.DeviceProviders.KeyboardProvider The new keyboard to adjust the layers for
return void
        public void ResizeLayers(KeyboardProvider target)
        {
            foreach (var layer in GetLayers())
            {
                if (!layer.LayerType.ShowInEdtor ||
                    !(Math.Abs(layer.Properties.Width - Width) < 0.01) ||
                    !(Math.Abs(layer.Properties.Height - Height) < 0.01))
                    continue;

                layer.Properties.Width = target.Width;
                layer.Properties.Height = target.Height;
            }
        }