-
Notifications
You must be signed in to change notification settings - Fork 34
Page DropDown with icons #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Page DropDown with icons #527
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this nice improvement!
As mentioned in the other PRs, a changelog entry would be appreciated
|
Changelog filled |
| MainScreen.Instance.SetActivePage(copy); | ||
| } | ||
| } | ||
| if (gui.BuildContextMenuButton(LSs.RemovePage, icon:Icon.Delete, disabled: !page.canDelete)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (gui.BuildContextMenuButton(LSs.RemovePage, icon:Icon.Delete, disabled: !page.canDelete)) { | |
| if (gui.BuildContextMenuButton(LSs.DeletePage, icon: Icon.Delete, disabled: !page.canDelete)) { |
For consistency with ProjectPageSettingsPanel, this should probably use the same string.
| open-secondary-page=Open as secondary | ||
| shortcut-ctrl-click=Ctrl+Click | ||
| close-secondary-page=Close secondary | ||
| remove-page=Remove page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if we do want separate strings (Factorio has four "Cancel"s and three "Back"s in English), they should probably have the same content, to avoid questions about the differences between 'remove' and 'delete'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. We can reuse the delete-page instead.
| bool isSecondary = screen.secondaryPage == page; | ||
| bool isActive = screen.activePage == page; | ||
| if (gui.BuildContextMenuButton(LSs.EditPageProperties)) { | ||
| if (gui.BuildContextMenuButton(LSs.EditPageProperties, icon:Icon.Edit)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (gui.BuildContextMenuButton(LSs.EditPageProperties, icon:Icon.Edit)) { | |
| if (gui.BuildContextMenuButton(LSs.EditPageProperties, icon: Icon.Edit)) { |
Our code style calls for spaces here, and missing spaces will cause problems for those of us who are using the recommended pre-push hook.
| Version: | ||
| Date: | ||
| Features: | ||
| - Add icons to Page DropDown items |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to point out that it's about the right-mouse-button menu, just to be clear.
This pull request enhances the user interface for managing project pages by adding new functionality and improving the context menu options in the tab bar. The changes focus on enabling page removal, improving icon usage for menu actions, and updating localization strings.
UI improvements and new page management features:
Yafc/Widgets/MainScreenTabBar.cs,Yafc/Data/locale/en/yafc.cfg). [1] [2]Yafc/Widgets/MainScreenTabBar.cs).Icon and localization updates:
Secondaryicon in theIconenum to visually represent secondary page actions (Yafc.UI/Core/Structs.cs).remove-pagestring to the English locale file for proper localization of the new menu option (Yafc/Data/locale/en/yafc.cfg).