Skip to content

Conversation

rgeraskin
Copy link
Contributor

Add Layouts Submenu to Application Menu

Description

This PR introduces a new layouts submenu in the application menu, providing users with quick access to layout options directly from the menu bar.

Closes: #1080

Changes Made

  • AppDelegate.swift: Added 87 lines of code to implement the layouts submenu functionality
  • MainMenu.xib: Updated the interface builder file to include the new submenu structure

What's New

  • ✨ New layouts submenu in the application menu
  • 🎯 Enhanced user experience with easier layout access
  • 📱 Improved menu navigation for layout management

Files Modified

  • Amethyst/AppDelegate.swift (+87 lines)
  • Amethyst/Base.lproj/MainMenu.xib (+7 lines)

Comment on lines +203 to +210
// Get current layout
let focusedScreenManager = windowManager?.focusedScreenManager()
var currentLayoutKey = focusedScreenManager?.currentLayout?.layoutKey

// If no focused screen manager, fallback to the first screen manager
if focusedScreenManager == nil, let firstScreenManager = windowManager?.screenManager(at: 0) {
currentLayoutKey = firstScreenManager.currentLayout?.layoutKey
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure that this is the correct way to find ScreenManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Layouts available from menus
1 participant