Put additional width constraints to a few buttons - #749
Conversation
They can sometimes look too narrow when the title is short. This restores the pre-auto-layout look.
Summary of ChangesHello @lukhnos, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the user interface consistency and responsiveness within the application's installer and alert windows. By implementing minimum width constraints for critical action buttons, the changes ensure that these buttons maintain a readable and aesthetically pleasing size, regardless of their title length. Furthermore, the update modernizes the layout of certain progress and informational elements by transitioning them to Auto Layout, which provides more robust and flexible UI positioning. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds minimum width constraints to buttons in the installer and alert dialogs to restore their pre-auto-layout appearance and prevent them from looking too narrow with short titles. Additionally, it includes cleanup of text field attributes and converts some fixed-frame UI elements to use proper auto-layout constraints.
- Adds
greaterThanOrEqualwidth constraints to buttons in alert dialogs and installer windows - Removes deprecated
focusRingType="none"attributes from text fields - Converts fixed-frame progress indicators and text fields to auto-layout with proper constraints
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Source/NonModalAlertWindowController.xib | Adds 90pt minimum width to confirm and cancel buttons; removes focusRingType="none" from text fields |
| Source/Installer/zh-Hant.lproj/MainMenu.xib | Adds 96pt minimum width to installer buttons; removes focusRingType="none" from text fields; converts progress indicator and label from fixed frame to auto-layout |
| Source/Installer/Base.lproj/MainMenu.xib | Adds 132pt and 96pt minimum width to installer buttons; removes focusRingType="none" from text fields; converts progress indicator and label from fixed frame to auto-layout |
| <font key="font" metaFont="system"/> | ||
| </buttonCell> | ||
| <constraints> | ||
| <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="96" id="iM3-Dn-zWz"/> |
There was a problem hiding this comment.
The width constraint for the "Agree and Install" button differs between localizations. The Base (English) version uses 132pt (line 102 in Base.lproj/MainMenu.xib), while the zh-Hant (Traditional Chinese) version uses 96pt. For consistency, these should likely have the same minimum width constraint since they represent the same UI element across different localizations.
| <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="96" id="iM3-Dn-zWz"/> | |
| <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="132" id="iM3-Dn-zWz"/> |
There was a problem hiding this comment.
Code Review
This pull request introduces width constraints to several buttons across different interface files to prevent them from appearing too narrow, which improves UI consistency. The changes correctly use greaterThanOrEqual constraints to set a minimum width. Additionally, the updates include modernizing the XIB files by removing deprecated attributes and replacing frame-based layouts with Auto Layout. These changes improve accessibility and make the layouts more robust. The implementation is mostly solid, but I've pointed out a minor visual inconsistency in the Chinese localization that could be addressed.
This ports the following PRs from McBopomofo: - openvanilla/McBopomofo#740 - openvanilla/McBopomofo#746 - openvanilla/McBopomofo#749
This ports the following PRs from McBopomofo: - openvanilla/McBopomofo#740 - openvanilla/McBopomofo#746 - openvanilla/McBopomofo#749
They can sometimes look too narrow when the title is short. This restores the pre-auto-layout look.