Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - [solved] icon in Pane title with VS 2015 themes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] icon in Pane title with VS 2015 themes

 Post Reply Post Reply
Author
Message
Vycheslav View Drop Down
Groupie
Groupie


Joined: 11 July 2008
Location: Russian Federation
Status: Offline
Points: 44
Post Options Post Options   Thanks (1) Thanks(1)   Quote Vycheslav Quote  Post ReplyReply Direct Link To This Post Topic: [solved] icon in Pane title with VS 2015 themes
    Posted: 27 November 2017 at 5:09am
AX CodeJock 18.2.0 versions (or other before) Visual Studio 6 or Visual Studio 2017

Pane title with icon (Visual Studio 2015 Light)


Pane title with icon (Microsoft Office 2016 DarkGray)


This is themes bug or my mistake?
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 28 November 2017 at 1:41pm
After pulling 18.0.1 we found some dialogs we had that used a ribbon had a similar looking bug. The tab region where we had a single tab displayed black in the entire area to the right of the tab. We were calling EnableFrameTheme(FALSE). I change to send in TRUE and it "fixed" the issue. But of course, the entire look of the dialog changed to boot.
Back to Top
Vycheslav View Drop Down
Groupie
Groupie


Joined: 11 July 2008
Location: Russian Federation
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vycheslav Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2017 at 3:30am
This dialog placed on the floating pane (DockingPane Object). See the icon on title bar. Title text putting under icon with all Visual Studio 2015 themes and putting correcttly with other themes. Property ...Options.ThemedFloatingFrames set to True.
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: 05 December 2017 at 11:17pm
Hello Vycheslav,

Thank you for information. I have solved this issue. Fix will be available in next release.
Problem was in drawing order in method CXTPDockingPaneVisualStudio2015Theme::DrawTitleBar
The same issue in VS2012 theme (CXTPDockingPaneVisualStudio2012Theme::DrawTitleBar)
// old version
void CXTPDockingPaneVisualStudio2015Theme::DrawTitleBar(CDC *pDC, CXTPDockingPaneBase *pPane, CRect rcCaption, BOOL bVertical)
{
......

    pDC->SetTextColor(pColorSet->m_clrText);
    int nWidth = DrawCaptionText(pDC, pPane->GetTitle(), rcCaption, bVertical, TRUE);

    if (NULL == hCustomBrush)
    {
        CRect rcGripper(rcCaption);

        if (bVertical)
        {
            rcGripper.top += nWidth + XTP_DPI_Y(5);
            rcGripper.left += ((rcCaption.Width() - XTP_DPI_X(5)) / 2);
        }
        else
        {
            rcGripper.top += ((rcCaption.Height() - XTP_DPI_Y(5)) / 2);
            rcGripper.left += nWidth + XTP_DPI_X(5);
        }

        DrawGripper(pDC, rcGripper, pColorSet->m_clrGripper, bVertical);
    }

    DrawCaptionIcon(pDC, pPane, rcCaption, bVertical);
    DrawCaptionButtons(pDC, pPane->GetCaptionButtons(), rcCaption, pColorSet->m_clrText, XTP_DPI_X(16), 0, bVertical);
}

// fixed version
void CXTPDockingPaneVisualStudio2015Theme::DrawTitleBar(CDC *pDC, CXTPDockingPaneBase *pPane, CRect rcCaption, BOOL bVertical)
{
......

    DrawCaptionIcon(pDC, pPane, rcCaption, bVertical);
    
    pDC->SetTextColor(pColorSet->m_clrText);
    int nWidth = DrawCaptionText(pDC, pPane->GetTitle(), rcCaption, bVertical, TRUE);

    DrawCaptionButtons(pDC, pPane->GetCaptionButtons(), rcCaption, pColorSet->m_clrText, XTP_DPI_X(16), 0, bVertical);
    
    if (NULL == hCustomBrush)
    {
        CRect rcGripper(rcCaption);

        if (bVertical)
        {
            rcGripper.top += nWidth + XTP_DPI_Y(5);
            rcGripper.left += ((rcCaption.Width() - XTP_DPI_X(5)) / 2);
        }
        else
        {
            rcGripper.top += ((rcCaption.Height() - XTP_DPI_Y(5)) / 2);
            rcGripper.left += nWidth + XTP_DPI_X(5);
        }

        DrawGripper(pDC, rcGripper, pColorSet->m_clrGripper, bVertical);
    }
}

Regards,
 Oleksandr Lebed
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.609 seconds.