Bitmap Style Designer非官方说明

Bitmap Style Designer

Bitmap Style Designer给我的第一印象就是简陋,估计也是为了赶工。大致体会了一下,还是能够使用。因为目前没有对此有比较详细的中文资料,就把自己的使用心得总结一下。

Bitmap Style Designer对于VCL Style的支持相对还是比较不错的, 可以新建,可以打开,可以编辑。而对于Firemonkey Style就显得有些捉襟见肘了,不过我们还是可以绕过去的。

新建,保存

新建的时候,在新建图标的下拉框中可以选择metro ui style , ios style (目前还不支持预览,毕竟设备的差距比较大,估计不久之后应该会出对应的模拟器了吧),默认的就是vcl style。新建完了就可以进行和编辑。不过默认保存的是*.vsf格式的,修改保存类型就可以得到我们需要的*.style文件了,一点都不易用⊙﹏⊙b。这种方法可以让我们把vcl style 转化为 firemonkey style

编辑

首先我们new一个metro style,在左侧Objects中的images中我们可以看到两张图,需要什么风格直接导出修改图片即可。是不是很简单,让美工单独去干吗,我们就可以用默认的先开发了。如果美工不靠谱,把图标的位置放错了,那怎么办?

放心吧,有办法解决。

找到objects节点,展开。在右侧一般都能看到Bitmap属性,点开它,会发现这就是设置控件对应的图标的地方,通过鼠标左键和右键圈定需要的范围即可。所以我们的图片完全不用和原来的一致。



关于Colors的设置目前还没有摸出门道来,感觉没什么实际的价值,默认即可。

官方的说明是这样子的:

http://docwiki.embarcadero.com/RADStudio/XE4/en/Creating_a_Style_using_the_Bitmap_Style_Designer

§ Click Colors in the Objects tree to see a list of base colors that are used in the current style. There are two categories of colors:The first category includes colors used for control parts that are rendered directly from an image. In this case, the color item offers you a way to access the color of that image. For instance, the Window item specifies the color of the form background.

Note that changing this color does not affect the way the control part is rendered, but is only a way to programmatically access that color. To do that, call StyleServices.GetStyleColor.

For example, to obtain the color used for form background, call StyleServices.GetStyleColor(scWindow).

§ The second category includes the colors used for controls that are rendered from code at run time (Panel, ListBox, Grid, and so on). In this case, modifying the color in the Colors list changes the appearance of the control.

预览

其实预览功能还是还是挺有帮助的,不仅仅是查看效果。它还提供了一些控件属性设置的方法。

Metro style的预览有两种,一种是Metro,一种是Firemonkey的。

对于Metro的,可以通过键盘的上下键 查看缩放界面的效果。Load style还支持你载入其他风格预览


同样Firemonkey下也可以指定其他style进行预览。



其他的再慢慢摸索吧~

原文地址:https://www.cnblogs.com/dyllove98/p/3198805.html