feat(ui): 增加对话框最小尺寸并调整默认大小

- 将对话框默认大小从500x400调整为800x800
- 添加MINSIZE属性确保对话框不可缩小
- 清理ui.c中的多余空白字符
- 在main.c中添加编译和打包说明注释
This commit is contained in:
2026-03-18 22:03:57 +08:00
parent 276d2c5fe3
commit 3ecf35963d
4 changed files with 22 additions and 13 deletions
+9 -1
View File
@@ -10,6 +10,13 @@
#include "ui.h"
#include "config.h"
/*
编译命令:
Remove-Item -Path "obj\*.o" -Force -ErrorAction SilentlyContinue && mingw32-make
打包命令:
build_installer.bat
*/
// 主函数
int main(int argc, char **argv)
{
@@ -84,7 +91,8 @@ int main(int argc, char **argv)
// 创建对话框
dlg = IupDialog(vbox_all);
IupSetAttribute(dlg, "TITLE", "编辑环境变量 (IUP版)");
IupSetAttribute(dlg, "SIZE", UI_DLG_SIZE); // 稍微调大一点
IupSetAttribute(dlg, "RASTERSIZE", UI_DLG_SIZE); // 对话框初始大小 (像素)
IupSetAttribute(dlg, "MINSIZE", UI_DLG_MINSIZE); // 对话框最小大小 (像素)
IupSetAttribute(dlg, "MINBOX", "NO");
IupSetAttribute(dlg, "MAXBOX", "NO");
+1 -1
View File
@@ -59,7 +59,7 @@ Ihandle *create_main_buttons()
NULL);
IupSetAttribute(vbox_btns, "GAP", UI_VBOX_GAP);
IupSetAttribute(vbox_btns, "MARGIN", UI_VBOX_MARGIN);
return vbox_btns;
}