*/}}
Bladeren bron

preference layout update

YimingWu 23 uur geleden
bovenliggende
commit
520b6ac152
3 gewijzigde bestanden met toevoegingen van 42 en 58 verwijderingen
  1. 33 41
      resources/la_templates.c
  2. 4 8
      resources/la_translations_es-ES.c
  3. 5 9
      resources/la_translations_zh-hans.c

+ 33 - 41
resources/la_templates.c

@@ -1359,7 +1359,7 @@ void laui_Screen(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *U
 void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
     laColumn* c = laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.5);cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
     laUiList *muil;
-    laColumn *mc, *mcl, *mcr, *mcll, *mclr;
+    laColumn *mc, *mcl, *mcr, *mcll, *mclr, *mcrl, *mcrr;
     laUiItem *b, *bracket;
 
     b=laBeginRow(uil,cl,0,0); 
@@ -1376,16 +1376,15 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
     bracket = laMakeTab(uil, c, 0);{
 
         for(laExtraPreferencePage* epp=MAIN.ExtraPreferencePages.pFirst;epp;epp=epp->Item.pNext){
-            muil = laAddTabPage(bracket, epp->Name); epp->Func(muil,0,0,0,0);
+            muil = laAddTabPage(bracket, epp->Name); 
+            muil->HeightCoeff = -1; epp->Func(muil,0,0,0,0);
         }
 
         
         muil = laAddTabPage(bracket, "Display");{
-            //muil->HeightCoeff = -1;
-            mc = laFirstColumn(muil);
-            laSplitColumn(muil, mc, 0.5);
-            mcl = laLeftColumn(mc, 0);
-            mcr = laRightColumn(mc, 0);
+            muil->HeightCoeff = -1;
+            mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.33);
+            mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
 
             if(MAIN.PreferencePageDisplay){
                 MAIN.PreferencePageDisplay(muil,0,0,0,0); 
@@ -1393,41 +1392,34 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
             }
 
             laShowLabel(muil, mc, "Translation:", 0, 0);
-            laShowLabel(muil, mcl, "Enable Translation:", 0, 0);
-            laShowItemFull(muil, mcr, &UP->PP, "enable_translation",LA_WIDGET_ENUM_CYCLE,0,0,0);
+            laShowItemWithLabel(muil,mcl,mcr,&UP->PP,"enable_translation",LA_WIDGET_ENUM_CYCLE,0,0,0,0,0,0);
             b = laOnConditionThat(muil, mcl, laPropExpression(&UP->PP, "enable_translation"));{
-            laShowLabel(muil, mcl, "Language:", 0, 0);
-                laShowItemFull(muil, mcr, &UP->PP, "languages", LA_WIDGET_COLLECTION_SELECTOR, 0, 0, 0);
-                laShowItem(muil, mcl, 0, "LA_translation_dump");
+                laShowItemWithLabel(muil,mcl,mcr,&UP->PP,"languages", LA_WIDGET_COLLECTION_SELECTOR,0,0,0,"Language",0,0);
+                laShowItem(muil, mcr, 0, "LA_translation_dump");
             }
             laEndCondition(muil, b);
 
             laShowSeparator(muil, mc);
 
             laShowLabel(muil, mc, "Interface:", 0, 0);
-            laShowLabel(muil, mcl, "Row Height:", 0, 0);
             laShowItem(muil, mcr, &UP->PP, "interface_size");
-            laShowLabel(muil, mcl, "Font Size:", 0, 0);
             laShowItem(muil, mcr, &UP->PP, "font_size");
-            laShowLabel(muil, mcl, "Margin Size:", 0, 0);
             laShowItem(muil, mcr, &UP->PP, "margin_size");
+            laShowItem(muil, mcr, &UP->PP, "top_framerate");
 #ifndef LA_USE_GLES
-            laShowLabel(muil, mcl, "Panel Multisample:", 0, 0);
-            laShowItem(muil, mcr, &UP->PP, "panel_multisample")->Flags|=LA_UI_FLAGS_EXPAND;
+            laShowItemWithLabel(muil,mcl,mcr,&UP->PP,"panel_multisample",0,0,0,0,"Panel Multisample",0,mc)->Flags|=LA_UI_FLAGS_EXPAND;
 #endif
-            laShowLabel(muil, mcl, "Top Framerate:", 0, 0);
-            laShowItem(muil, mc, &UP->PP, "top_framerate");
 
             laShowSeparator(muil, mc);
 
             laShowLabel(muil, mc, "Color:", 0, 0);
-            laShowItem(muil, mcl, &UP->PP, "color_picker_gamma");
-            laShowItem(muil, mcr, &UP->PP, "enable_color_management");
+            laShowItem(muil, mcr, &UP->PP, "color_picker_gamma");
+            laShowItem(muil, mcr, &UP->PP, "enable_color_management")->Flags|=LA_UI_FLAGS_CHECKBOX;
 
 #ifndef LAGUI_ANDROID
             laUiItem* bb=laOnConditionThat(muil,mc,laPropExpression(&UP->PP,"enable_color_management"));{
                 laUiItem*bbr=laBeginRow(muil,mc,0,0);
-                laShowLabel(muil, mcl, "Per screen config:", 0, 0)->Expand=1;
+                laShowLabel(muil, mc, "Per screen config:", 0, 0)->Expand=1;
                 laShowItem(muil,mc,0,"LA_refresh_screens")->Flags|=LA_UI_FLAGS_ICON;
                 laShowItemFull(muil, mcr, &UP->PP, "auto_switch_color_space",0,"text=Auto Switch",0,0);
                 laEndRow(muil,bbr);
@@ -1451,30 +1443,28 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
         }
         
         muil = laAddTabPage(bracket, "Input");{
-            //muil->HeightCoeff = -1;
-            mc = laFirstColumn(muil);
-            laSplitColumn(muil, mc, 0.5);
-            mcl = laLeftColumn(mc, 0);
-            mcr = laRightColumn(mc, 0);
+            muil->HeightCoeff = -1;
+            mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.33);
+            mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
+            laSplitColumn(muil, mcr, 0.5);
+            mcrl = laLeftColumn(mcr, 0); mcrr = laRightColumn(mcr, 0);
 
             if(MAIN.PreferencePageInput){ MAIN.PreferencePageInput(muil,0,0,0,0); }
 
             laShowLabel(muil, mc, "User Interactions:", 0, 0);
-            laShowItem(muil, mc, &UP->PP, "scroll_speed");
-            laShowItem(muil, mcl, &UP->PP, "animation_speed");
+            laShowItem(muil, mcr, &UP->PP, "scroll_speed");
+            laShowItem(muil, mcr, &UP->PP, "animation_speed");
             laShowItem(muil, mcr, &UP->PP, "panel_animation_speed");
-            laShowItem(muil, mc, &UP->PP, "valuator_threshold");
-            laShowItem(muil, mc, &UP->PP, "zoom_speed_2d");
-            laShowItem(muil, mcl, &UP->PP, "tooltip_close_distance");
+            laShowItem(muil, mcr, &UP->PP, "valuator_threshold");
+            laShowItem(muil, mcr, &UP->PP, "zoom_speed_2d");
+            laShowItem(muil, mcr, &UP->PP, "tooltip_close_distance");
             laShowItem(muil, mcr, &UP->PP, "idle_time");
 
             laShowSeparator(muil,mc);
 
             laShowLabel(muil, mc, "Input device handling:", 0, 0);
-            laShowLabel(muil, mcl, "Input Mapping:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
-            laShowItemFull(muil, mcr, 0, "LA_panel_activator",0,"panel_id=LAUI_input_mapping;text=Configure",0,0);
-            laShowLabel(muil, mcl, "Pads/Joysticks:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
-            laShowItemFull(muil, mcr, 0, "LA_panel_activator",0,"panel_id=LAUI_controllers;text=Configure",0,0);
+            laShowItemWithLabel(muil,mcrl,mcrl,0,"LA_panel_activator",0,"panel_id=LAUI_input_mapping;text=Configure",0,0,"Input Mapping",LA_TEXT_ALIGN_LEFT,0);
+            laShowItemWithLabel(muil,mcrr,mcrr, 0,"LA_panel_activator",0,"panel_id=LAUI_controllers;text=Configure",0,0,"Pads/Joysticks",LA_TEXT_ALIGN_LEFT,0);
 
 #ifndef LAGUI_ANDROID
             laShowSeparator(muil,mc);
@@ -1486,14 +1476,15 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
             laEndRow(muil, b);
             laShowItem(muil, mcr, &UP->PP, "wacom_driver");
 #else
-            laShowItem(muil, mcl, &UP->PP, "wacom_device_stylus");
-            laShowItem(muil, mcl, &UP->PP, "wacom_device_eraser");
-            laShowItemFull(muil, mcr, 0, "LA_refresh_controllers",0,"text=Refresh",0,0);
+            laShowItem(muil, mcrl, &UP->PP, "wacom_device_stylus");
+            laShowItem(muil, mcrr, &UP->PP, "wacom_device_eraser");
+            laShowItemFull(muil, mcrl, 0, "LA_refresh_controllers",0,"text=Refresh",0,0);
 #endif //!win32
 #endif //!android
         }
         if(MAIN.InitArgs.HasAudio){
             muil = laAddTabPage(bracket, "Audio");{
+                muil->HeightCoeff = -1;
                 mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.5);
                 mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
                 b=laBeginRow(muil,mcl,0,0);
@@ -1507,7 +1498,7 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
         }
 
         muil = laAddTabPage(bracket, "Resource");{
-            //muil->HeightCoeff = -1;
+            muil->HeightCoeff = -1;
             mc = laFirstColumn(muil);
 
             laSplitColumn(muil, mc, 0.5);
@@ -1529,7 +1520,7 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
         }
 
         muil = laAddTabPage(bracket, "Theme");{
-            //muil->HeightCoeff = -1;
+            muil->HeightCoeff = -1;
             mc = laFirstColumn(muil);
             //laSplitColumn(muil,mc,0.4); mcl=laLeftColumn(mc,7);mcr=laRightColumn(mc,0);
 
@@ -1551,6 +1542,7 @@ void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorIn
         }
 
         muil = laAddTabPage(bracket, "System");{
+            muil->HeightCoeff = -1;
             mc = laFirstColumn(muil); laSplitColumn(muil, mc, 0.5);
             mcl = laLeftColumn(mc, 0); mcr = laRightColumn(mc, 0);
             laShowLabel(muil,mcl,"OpenGL Debugging:",0,0);

+ 4 - 8
resources/la_translations_es-ES.c

@@ -395,7 +395,6 @@ static const char *entries[]={
 "Binding","绑定",
 "You still have unsaved/unassigned datablocks:","Aún tiene bloques da datos no guardados/no asignado:",
 "If you exit the program now, you will lose those changes.","Si abandona el programa ahora, perderá las modificaciones",
-"Input Mapping:","Mapeo de Entrada:",
 "Undo","Deshacer",
 "UDF Manager","Gestor UDF",
 "Please select a controller.","Por favor seleccione un controlador.",
@@ -414,7 +413,7 @@ static const char *entries[]={
 "Meshes","Mallas",
 "Add Resource Folder","Agregar Carpeta de Recursos",
 "User Interactions:","Interacciones de Usuario:",
-"Enable Translation:","Activar Traducción:",
+"Enable Translation","Activar Traducción",
 "Active","Activa",
 "Inactive Mix","Mezcla Inactiva",
 "Edit","Edición",
@@ -433,7 +432,6 @@ static const char *entries[]={
 "Interface:","Interfaz:",
 "Settings","Opciones",
 "New Panel","Nuevo Panel",
-"Font Size:","Tamaño de fuente:",
 "Border","Límite",
 "Accent Color","Color de Acentuado",
 "Wire Saturation","Saturación de los cables",
@@ -441,7 +439,7 @@ static const char *entries[]={
 "LaGUI application framework is made by Wu Yiming.","Marco de Aplicación LaGUI programado por Wu Yiming.",
 "Refresh Controllers","Refrescar Controladores",
 "Dock","Anclar",
-"Panel Multisample:","Panel Multimuestra:",
+"Panel Multisample","Panel Multimuestra",
 "Files","Ficheros",
 "None","Ninguno",
 "Text Active","Texto Activo",
@@ -452,7 +450,6 @@ static const char *entries[]={
 "Viewing Texture:","Textura de Visualización:",
 "Stylus Device","Dispositivo de Pluma",
 "Base Color A","Color de Base A",
-"Margin Size:","Tamaño de Márgen:",
 "Eraser Device","Dispositivo Borrador",
 "Animation Speed","Velocidad de Animación",
 "File Dialog","Diálogo de Fichero",
@@ -467,14 +464,13 @@ static const char *entries[]={
 "Idle time","Tiempo inactivo",
 "UDF Extensions:","Extensiones UDF:",
 "Options","Opciones",
-"Top Framerate:","Velocidad de Refreco superior:",
 "Top Framerate","Velocidad de Refresco superior",
 "Goto","Ir a",
 "Cursor:","Cursor:",
 "Yes Or No","Si o No",
 "Selection Alpha","Selección Alfa",
 "Widgets:","挂件:",
-"Pads/Joysticks:","Pads/Joysticks:",
+"Pads/Joysticks","Pads/Joysticks",
 "Edge Brightness","Brillo de Borde",
 "Valuator Threshold","Valuador de Umbral",
 "Save as","Guardar como",
@@ -496,7 +492,7 @@ static const char *entries[]={
 "Panel Activator","Activador de Panel",
 "Data Blocks","Bloques de Datos",
 "Transparency:","Transparencia:",
-"Language:","Idioma:",
+"Language","Idioma",
 "Wacom Devices:","Dispositivos Wacom:",
 "Move Rack","Mover Rack",
 "Yes","Si",

+ 5 - 9
resources/la_translations_zh-hans.c

@@ -390,7 +390,6 @@ static const char *entries[]={
 "Binding","绑定",
 "You still have unsaved/unassigned datablocks:","您还有未保存/未指定文件的数据块:",
 "If you exit the program now, you will lose those changes.","如果现在退出,这些更改将丢失",
-"Input Mapping:","输入映射:",
 "Undo","撤销",
 "UDF Manager","UDF 管理",
 "Please select a controller.","请选择一个控制器",
@@ -409,7 +408,7 @@ static const char *entries[]={
 "Meshes","网格",
 "Add Resource Folder","添加资源文件夹",
 "User Interactions:","用户交互:",
-"Enable Translation:","使用翻译",
+"Enable Translation","使用翻译",
 "Active","活动的",
 "Inactive Mix","不活动的",
 "Edit","编辑",
@@ -428,7 +427,6 @@ static const char *entries[]={
 "Interface:","界面:",
 "Settings","设置",
 "New Panel","新面板",
-"Font Size:","字符尺寸:",
 "Border","边框",
 "Accent Color","亮点颜色",
 "Wire Saturation","线条饱和度",
@@ -436,7 +434,7 @@ static const char *entries[]={
 "LaGUI application framework is made by Wu Yiming.","LaGUI应用程序框架由吴奕茗制作。",
 "Refresh Controllers","刷新控制器",
 "Dock","停靠",
-"Panel Multisample:","面板多重采样",
+"Panel Multisample","面板多重采样",
 "Files","文件",
 "None","无",
 "Text Active","文字激活",
@@ -447,11 +445,10 @@ static const char *entries[]={
 "Viewing Texture:","查看贴图:",
 "Stylus Device","手写笔设备",
 "Base Color A","基础颜色 A",
-"Margin Size:","留白尺寸:",
 "Eraser Device","橡皮擦设备",
 "Animation Speed","动画速度",
 "File Dialog","选择文件",
-"Row Height:","行高",
+"Row Height","行高",
 "Border:","边缘:",
 "Selected Vertex Transparency","已选择点的透明度",
 "Quit","退出",
@@ -462,14 +459,13 @@ static const char *entries[]={
 "Idle time","静止时间",
 "UDF Extensions:","UDF扩展:",
 "Options","选项",
-"Top Framerate:","最高帧率:",
 "Top Framerate","最高帧率",
 "Goto","前往",
 "Cursor:","光标:",
 "Yes Or No","是/否",
 "Selection Alpha","选择区域透明度",
 "Widgets:","挂件:",
-"Pads/Joysticks:","手柄/操纵杆",
+"Pads/Joysticks","手柄/操纵杆",
 "Edge Brightness","边缘亮度",
 "Valuator Threshold","数值挂件拖动阈值",
 "Save as","另存为",
@@ -491,7 +487,7 @@ static const char *entries[]={
 "Panel Activator","面板激活工具",
 "Data Blocks","数据块",
 "Transparency:","透明度:",
-"Language:","语言",
+"Language","语言",
 "Wacom Devices:","Wacom 设备:",
 "Move Rack","移动挂架",
 "Yes","是",