Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - v17.2.0 bug in skinned Tabs and Edit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

v17.2.0 bug in skinned Tabs and Edit

 Post Reply Post Reply
Author
Message
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (1) Thanks(1)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Topic: v17.2.0 bug in skinned Tabs and Edit
    Posted: 21 April 2016 at 4:47am
Hello,

There are still some bugs in the MFC ToolKit Pro release 17.2.0.
We are using Visual Studio 2015 update 2.

You can also check and see them directly on your own sample projects, just open the SkinMDISample:



Run the project, and on the second dialog box pane (Skins and Themes), please chose 'Office 2010 Style' and color scheme 'Silver':



Then select the first dialog box pane, you can see:



Now, you see these bugs (and we see them also in our software):



Could you please fix them as soon as possible, we have to release our software now. We are waiting for these fixes.

Your support line (support tickets) seems unresponsive.

Thanks.

Regards,
Sergio
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2016 at 7:39am
Hello Sergio,

I have fixed borders of edit boxes again. Another line (~1096) with  DS_MODALFRAME  in Source\SkinFramework\XTPSkinManagerSchema.cpp  should be removed from condition.

I will try to fix tab later.

Regards,
 Oleksandr Lebed
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2016 at 9:30am
Hello Oleksandr,

Thank you for your prompt answer.

If I have well understood, I have to delete the line:

|| (dwStyle & DS_MODALFRAME)

from your source file Source\SkinFramework\XTPSkinManagerSchema.cpp,
and deploy (recompile) the ToolKit Pro again.

I will keep you informed as soon as I can test it.

Meanwhile, please take some time to check the tabs too.
Thanks & Regards,

Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 22 April 2016 at 5:43am
Hello Oleksandr,

I have just tested your fix (and the fix you gave from the support ticket), both of them are working fine, thanks.

Please include these fixes on the next release.

Please check also a value that may be wrong for your InflateRect(...):

void CXTPSkinObjectTab::FillTabFace(CDC* pDC, CRect rcItem, int iItem, 
        int iCount, BOOL bSelected, BOOL bFocused)
{
        …

        if (bSelected)
        {
                rcItem.InflateRect(XTP_DPI_X(2), XTP_DPI_Y(2), XTP_DPI_X(2), XTP_DPI_Y(2)); // I think we should use 2 instead of 1 (it was 2 before the XTP_DPI).
               …

Thank you very much and have a nice week-end.

Regards,
Sergio
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2016 at 10:46am
Hello,

I'm glad to inform you that I found solution!
First (in CXTPSkinObjectTab::DrawTab): pTabCtrl->GetCurFocus()  gets the same as  pTabCtrl->GetCurSel(),  not really focused tab item. So should be replaced with
    BOOL bFocused = bSelected && ::GetFocus() == m_hWnd && (SendMessage(WM_QUERYUISTATE) & UISF_HIDEFOCUS) == 0;
Second (in CXTPSkinObjectTab::FillTabFace and CXTPSkinObjectTab::DrawTabText ): order of getting nStateId   - hot item should be after  focused and selected  conditions.
	int nStateId = (bFocused ? TIS_FOCUSED
: (bSelected ? TIS_SELECTED
: (m_nHotItem == iItem ? TIS_HOT 
: TIS_NORMAL)));
There still some issues with HighDPI in tabs.

Regards,
Oleksandr Lebed  
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 23 April 2016 at 11:59am
about HighDPI  problems in skinned tab   - rescaling in CXTPSkinObjectTab::FillTabFace  no needed at all, that is why use
rcItem.InflateRect(2, 2, 2, 2);
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (1) Thanks(1)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2016 at 9:31am
Hello Oleksandr, 


Sorry for the little delay, I have tested other parts of our software to ensure that everything is working fine.


Bugs not related to high dpi displays:


Concerning your latest fix on tab items, you have perhaps not tested your fix, what happening now is a yellow/orange colour on tab item when it has the keyboard input focus, and not when the mouse is moving over it. They should be working as dialog buttons. Perhaps the "hot" item is not working in the source code.


I found that there are still these issues when using Office 2013 ribbon bars and office 2010 silver skin at the same time:


Borders of MDI forms windows are drawn reversely:



 

Scroll tab arrows aren't drawn correctly on the MDI tab switcher CXTPTabClientWnd:

 

1.      When scrolled to the leftmost position, the icon is disabled, but when scrolled to the rightmost position, the icon isn't disabled.

 

2.      When both icons are disabled, they aren't vertically aligned:




Bugs related to high dpi displays:


These bugs are visible when applying a larger text size (on Windows 8):




Our application isn't DPI aware (setting in .vcxproj: <EnableDPIAwareness>false</EnableDPIAwareness>).


The dialog box window border is incorrectly drawn, also visible on your SkinMDISample project:




And one last: double draw buffer of menu show animation is wrongly scaled, the animation transition uses a background of a different scale and it is ugly.


Thanks for your help.

Regards,

Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2016 at 8:57am
Hello Oleksandr,

I know you are busy, but at least could you please fix the bug of reversed MDI forms borders:



This is too much visible and blocking for another project that should also be delivered soon.

Thanks in advance,
Regards,
Sergio
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2016 at 11:18am
Hello Sergio,

About
Originally posted by Sergio Sergio wrote:

The dialog box window border is incorrectly drawn

I found that office2010 skin images  FrameBottom.png and FrameCaption.png  can't be scaled properly for highDPI mode because inner border lines on these images provided only for 96DPI.

This can't be easy fixed without breaking other skins. As workaround  you can turn off scaling of frame borders in method CXTPSkinManagerSchema::GetWindowBorders - delete all XTP_DPI_X there and rebuild.

Also I found highDPI issue with drawing gripper in skinned StatusBar. To fix them  delete in method CXTPSkinManagerSchema::DrawThemeBackground()  all XTP_DPI and XTP_DPI_Y. Then change
       CSize szDest(sz);
to
       CSize szDest(XTP_DPI(sz));

Regards,
 Oleksandr Lebed
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2016 at 11:06am
Hello Oleksandr,

Thank you for your work and response.

I had to switch to another urgent task, I will test your fixes as soon as possible and will get back to you.

Thank you for your help.

Regards,
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2016 at 9:13am
Hello Oleksandr,

I'm sorry, your last fix didn't worked. But now, I need to fix that for our next release.

You can see the bug by yourself on your own samples, but perhaps you can't because you haven't the same configuration.

I have a 4K screen (3840 x 2160 pixels), with a Quadro K620 graphic card, running on Windows 8.1 Enterprise.

We have the system settings "Change the size of all items, Make text and other items on the desktop smaller and larger." set to "Larger - 150 %".

We build using Visual Studio 2015 and the flag <EnableDPIAwareness>false</EnableDPIAwareness> in our project .vcxproj.

We are now using the ribbon bars of Office 2013 (xtpIniOffice2013WordGrayLight & xtpIniOffice2013WordGrayDark) and the Office2010 silver skin.

Initializations are:
CXTPCommandBarsFrameHook::m_bAllowDwm = FALSE;
XTPPaintManager()->SetTheme(xtpThemeRibbon);
VERIFY(XTPThemeDLL()->SetHandle(xtpIniOffice2013WordGrayLight));
CXTPPaintManager::SetTheme(xtpThemeOffice2013);
XTPSkinManager()->LoadSkin(NULLNULL); // Unload previous skin
VERIFY(XTPSkinManager()->LoadSkin(_T("Office2010.cjstyles")_T("NormalSilver.ini")));
pMainFrame->m_paneManager.SetTheme(xtpPaneThemeOffice2013);
GetMainFrame()->m_pRibbonBar->EnableFrameTheme(TRUE);
XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics | xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMenus);
... RefreshMetrics();
Please also note that double buffered drawings animation are wrongly scaled.

I think that it may take less time to fix if you can tell me where I have to look in your source code, so I can search also by my side. Where the MDI forms frame is drawn exactly?

Thanks and Regards,
Sergio
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.