为了演示,我加载了通过选择“VCL / FMX的新样式”创建的默认自定义样式 – >位图样式设计器中的“另存为.style”.我在一些彩色矩形上放了几个标准控件:红色& TScaledLayout上的绿色,直接在表单上的蓝色.当我拉伸表格时,ScaledLayout上的控件上会出现彩色线条;背景部分可见:
如果我将表单的大小设置为与设计时尺寸完全匹配,则线条会消失.这似乎是一个非常重要的问题,我当然不能像这样一起使用这两个.有没有人对可能的修复或解决方法有所了解?
解决方法
I’ve found an internally reported issue of a similar case,but haven’t
found one that matches this scenario. Certainly worth adding to quality
portal. Having said this,I fear that bitmap-based operations and
scaling don’t really fit together very well,and it might be difficult
to have an all encompassing solution.Let me explain with an example. Take a button. This is painted by FMX
with 9 sections (borders,corners,central part) so that regardless of
the size the bitmap elements are stretched in one direction at most,
often just draw. Stretching a single bitmap for the button to the
target size would break anti-aliasing and create a blurred image when
using colors.This is example what happens with a ScaledLayout,given it takes the
complete final image and transforms it. ScaledLayout was originally
introduced with vector styles,and worked very well in that scenario.
With todays’s bitmap styles things get a bit more complex.Regardless of this explanation of there the issue lies,I’d recommend reporting it on QC,and I’ll make sure it doesn’t get closed as design (it could naturally happen,this is how the system works) but that we do some investigation to address the issue — turning this into a feature request.