mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(ui): 增加对话框最小尺寸并调整默认大小
- 将对话框默认大小从500x400调整为800x800 - 添加MINSIZE属性确保对话框不可缩小 - 清理ui.c中的多余空白字符 - 在main.c中添加编译和打包说明注释
This commit is contained in:
Binary file not shown.
+12
-11
@@ -6,23 +6,24 @@
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// 对话框设置
|
// 对话框设置
|
||||||
#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" // 列表项内边距
|
||||||
#define UI_LIST_BACKCOLOR "255 255 255" // 列表背景颜色
|
#define UI_LIST_BACKCOLOR "255 255 255" // 列表背景颜色
|
||||||
|
|
||||||
// 按钮设置
|
// 按钮设置
|
||||||
#define UI_BTN_RASTERSIZE "100x32" // 按钮默认大小
|
#define UI_BTN_RASTERSIZE "100x32" // 按钮默认大小
|
||||||
|
|
||||||
// 布局间隙和边距
|
// 布局间隙和边距
|
||||||
#define UI_VBOX_GAP "5" // 垂直布局项间隙
|
#define UI_VBOX_GAP "5" // 垂直布局项间隙
|
||||||
#define UI_VBOX_MARGIN "0x0" // 垂直布局外边距
|
#define UI_VBOX_MARGIN "0x0" // 垂直布局外边距
|
||||||
#define UI_VBOX_ALL_MARGIN "10x10" // 垂直布局总外边距
|
#define UI_VBOX_ALL_MARGIN "10x10" // 垂直布局总外边距
|
||||||
#define UI_VBOX_ALL_GAP "5" // 垂直布局总间隙
|
#define UI_VBOX_ALL_GAP "5" // 垂直布局总间隙
|
||||||
|
|
||||||
#define UI_HBOX_GAP "10" // 水平布局项间隙
|
#define UI_HBOX_GAP "10" // 水平布局项间隙
|
||||||
#define UI_HBOX_MARGIN "10x10" // 水平布局外边距
|
#define UI_HBOX_MARGIN "10x10" // 水平布局外边距
|
||||||
#define UI_HBOX_ALIGNMENT "ACENTER" // 水平布局对齐方式
|
#define UI_HBOX_ALIGNMENT "ACENTER" // 水平布局对齐方式
|
||||||
|
|
||||||
#endif // CONFIG_H
|
#endif // CONFIG_H
|
||||||
|
|||||||
+9
-1
@@ -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");
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Ihandle *create_main_buttons()
|
|||||||
NULL);
|
NULL);
|
||||||
IupSetAttribute(vbox_btns, "GAP", UI_VBOX_GAP);
|
IupSetAttribute(vbox_btns, "GAP", UI_VBOX_GAP);
|
||||||
IupSetAttribute(vbox_btns, "MARGIN", UI_VBOX_MARGIN);
|
IupSetAttribute(vbox_btns, "MARGIN", UI_VBOX_MARGIN);
|
||||||
|
|
||||||
return vbox_btns;
|
return vbox_btns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user