设备 | DPI | 像素数 | 物理尺寸 |
MacBook Air | 108 | 360 | 3.33英寸/8.46cm |
MacBook Pro | 192 | 360 | 1.87英寸/4.76cm |
iPhone6 | 326 | 360 | 1.1英寸/2.8cm |
density | 名称 | DPI |
0.75 | ldpi | 120 |
1.0 | mdpi | 160 |
1.5 | hdpi | 240 |
2.0 | xhdpi | 320 |
3.0 | xxhdpi | 480 |
4.0 | xxxhdpi | 640 |
控件 | 字段 |
control(所有控件) | window_width/height, default_width/height, max_width/height, text_extra_width/height, text_font_size |
slider(滑块) | minimum_positioner_length, maximum_positioner_length, left_offset, right_offset |
report(报表) | unit_width, unit_height, gap |
父块 | 字段 | 描述 |
[column] | border_size | border_size *= hdpi_scale |
图元 | 字段 | 描述 |
image | name | hdpi不是1时,它会在文件名加上后缀“@<hdpi_scale>”。举个例子,button2-botleft.png,当hdpi=2时,会先尝试使用button2-botleft@2.png,如果不存在则使用button2-botleft.png。 |
text | font_size | font_size *= hdpi_scale |
欢迎光临 SDL中文论坛 (http://www.libsdl.cn/bbs/) | Powered by Discuz! X3.3 |