-
Notifications
You must be signed in to change notification settings - Fork 50
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
修复inputbox_getline缩放错误Fix inputbox scaling issue #262
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant UI as User Interface
participant IB as inputbox_getline
participant SC as Screen Dimensions
UI->>IB: Request input box display
IB->>SC: Retrieve available screen dimensions
SC-->>IB: Provide dimensions
IB->>IB: Compute width & height using MIN function
IB->>IB: Adjust position, size, and font scaling based on dimensions
IB->>UI: Render dynamically sized input box
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (5)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
最佳的方式也许是实际计算布局,把中间和左右的空白压缩下? |
我有想过改的多一点,但是估计工作量约等于重新做一个inputbox了,那我再看看要不要改改或者加个新接口重载什么的 |
如题,原本的inputbox由于锁死长宽高(默认设置为400*300)导致在窗口本身较小时会显示不完全,严重时甚至完全无法显示文本框,如下图所示:
或者:
对此,通过简单的修改补充了在窗口小于默认inputbox时进行简单的缩放,具体来说缩放逻辑是:
最终效果如下:
300*200的窗口:
680*400的窗口:
更多细节参见代码
Summary by CodeRabbit