ColorPanelController.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using AvalonDock.Layout;
  2. using System.Windows;
  3. namespace PixiEditor.Views
  4. {
  5. internal class ColorPanelController
  6. {
  7. private LayoutAnchorable colorPickerPanel;
  8. private LayoutAnchorable colorSlidersPanel;
  9. private LayoutAnchorable smallColorPickerPanel;
  10. public ColorPanelController(LayoutAnchorable colorPickerPanel, LayoutAnchorable colorSlidersPanel, LayoutAnchorable smallColorPickerPanel)
  11. {
  12. this.colorPickerPanel = colorPickerPanel;
  13. this.colorSlidersPanel = colorSlidersPanel;
  14. this.smallColorPickerPanel = smallColorPickerPanel;
  15. }
  16. public void DeterminePanelsToDisplay()
  17. {
  18. if (SystemParameters.PrimaryScreenHeight < 1010)
  19. {
  20. colorPickerPanel.IsVisible = false;
  21. colorSlidersPanel.IsVisible = true;
  22. smallColorPickerPanel.IsVisible = true;
  23. }
  24. else
  25. {
  26. colorSlidersPanel.IsVisible = false;
  27. smallColorPickerPanel.IsVisible = false;
  28. }
  29. }
  30. }
  31. }