Thorsten Kani wrote:
Nice Patch - looks good now! i have changed the offsets and used SM_CXBORDER instead of SM_CXEDGE. (According to MSDN, cxedge is used for 3D while cxborder is used for Flat ) This seems to fix the"draw below" issue. Visual Experience comes now really near native.
I noticed that SM_CXEDGE is used everywhere, regardless of Style TBSTYLE_FLAT. Please review my attached Patch. It seems to me that this Stylechecks shoud be used everywhere.
I don't think this is correct. If you change the return value for GetSystemMetrics(SM_CXEDGE) in wine/windows/sysmetrics.c then you can see that it does affect the spacing between border and icon (but our toolbar control doesn't exactly match the native for this).
As for String position issue, maybe i can help out with the controlspy check. Im interested in understanding the controls and wanted to play around with CSpy anyway. Suggestions ?
You can download controlspy here: http://www.microsoft.com/msj/0798/controlspy.aspx
It is very useful for throwing messages at the common controls, but it cannot test custom draw functionality and it is becoming dated (it is missing new functionality from comctl32 v5.80 and new controls).
Rob
Hmm, sorry- i meant SM_CYBORDER and SM_CYEDGE. (classical past_1:00am typo) testing shows that using SM_CYBORDER instead of SM_CYEDGE affects appearence only minimal. if this bug only appears while using it under windows, it shouldnt be really important.
Do you agree setting OFFSET_Y to zero is a good compromise in this case ?
Tho http://dict.leo.org/se?p=/Mn4k.&search=tradeoff Robert Shearman wrote:
Thorsten Kani wrote:
Nice Patch - looks good now! EDIT: i have changed the offsets and used SM_C*y*BORDER instead of SM_C*y*EDGE. (According to MSDN, cxedge is used for 3D while cxborder is used for Flat ) This seems to fix the"draw below" issue. Visual Experience comes now really near native.
I noticed that SM_CXEDGE is used everywhere, regardless of Style TBSTYLE_FLAT. Please review my attached Patch. It seems to me that this Stylechecks shoud be used everywhere.
I don't think this is correct. If you change the return value for GetSystemMetrics(SM_CXEDGE) in wine/windows/sysmetrics.c then you can see that it does affect the spacing between border and icon (but our toolbar control doesn't exactly match the native for this).
As for String position issue, maybe i can help out with the controlspy check. Im interested in understanding the controls and wanted to play around with CSpy anyway. Suggestions ?
You can download controlspy here: http://www.microsoft.com/msj/0798/controlspy.aspx
It is very useful for throwing messages at the common controls, but it cannot test custom draw functionality and it is becoming dated (it is missing new functionality from comctl32 v5.80 and new controls).
Rob
Thorsten Kani wrote:
Hmm, sorry- i meant SM_CYBORDER and SM_CYEDGE. (classical past_1:00am typo) testing shows that using SM_CYBORDER instead of SM_CYEDGE affects appearence only minimal. if this bug only appears while using it under windows, it shouldnt be really important.
GetSystemMetrics(SM_CYEDGE) == GetSystemMetrics(SM_CXEDGE) on all known platforms (including Wine) so my comment stands.
Do you agree setting OFFSET_Y to zero is a good compromise in this case ?
It is not a perfect solution. I believe that OFFSET_X and OFFSET_Y should be removed completely, but the other places that these are used (apart from positioning the bitmap) need to be checked. In particular, my testing shows that the padding value doesn't depend on GetSystemMetrics(SM_CXEDGE) and hence should be hardcoded (without OFFSET_{X,Y}).
For the moment, you could submit a patch that removes the calculation of rcBitmap.top and rcBitmap.left based on OFFSET_Y and OFFSET_X.
Rob