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進行預覽。



其他的再慢慢摸索吧~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章