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
Binary file not shown.
+2 -1
View File
@@ -6,7 +6,8 @@
// ============================================================================ // ============================================================================
// 对话框设置 // 对话框设置
#define UI_DLG_SIZE "500x400" // 对话框默认大小 #define UI_DLG_SIZE "800x800" // 对话框默认大小 (像素)
#define UI_DLG_MINSIZE "800x800" // 对话框最小大小 (像素)
// 列表控件设置 // 列表控件设置
#define UI_LIST_ITEM_PADDING "5x5" // 列表项内边距 #define UI_LIST_ITEM_PADDING "5x5" // 列表项内边距
+9 -1
View File
@@ -10,6 +10,13 @@
#include "ui.h" #include "ui.h"
#include "config.h" #include "config.h"
/*
编译命令:
Remove-Item -Path "obj\*.o" -Force -ErrorAction SilentlyContinue && mingw32-make
打包命令:
build_installer.bat
*/
// 主函数 // 主函数
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
@@ -84,7 +91,8 @@ int main(int argc, char **argv)
// 创建对话框 // 创建对话框
dlg = IupDialog(vbox_all); dlg = IupDialog(vbox_all);
IupSetAttribute(dlg, "TITLE", "编辑环境变量 (IUP版)"); 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, "MINBOX", "NO");
IupSetAttribute(dlg, "MAXBOX", "NO"); IupSetAttribute(dlg, "MAXBOX", "NO");