Print Page | Close Window

[solved] Ribbon bar artifact

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23601
Printed Date: 20 April 2024 at 4:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] Ribbon bar artifact
Posted By: mckoy
Subject: [solved] Ribbon bar artifact
Date Posted: 12 February 2018 at 6:48am
Hi.

If minimized ribbon and click to the tab, will popup ribbon, but between tab and ribbon is grey line.

   
Word ribbon                               Codejock ribbon

How I can hide the line under tab with minimized ribbon like in MS Word?



Replies:
Posted By: markr
Date Posted: 07 March 2018 at 7:37pm
Hello,

In the XTP 18.3 ribbon sample (Ribbon.RibbonSample.exe), if you choose an Office 2013/2016 theme and are running at high DPI (I've tested at 150% and 200% scaling), an artifact appears when drawing tabs:



As show in the screenshot above, there's an unwanted horizontal line below the tab caption.

Wondering if there might be a source patch available for this problem.

Many thanks,

Mark R.



Posted By: markr
Date Posted: 15 March 2018 at 3:39am
Any thoughts on what might be causing this? 

I can start digging through the XTP ribbon rendering code, but any information that might help me to narrow down my investigations would be appreciated.

Regards,

Mark R.


Posted By: olebed
Date Posted: 24 June 2018 at 10:50am
Hello,

Problem was in method CXTPRibbonOffice2013Theme::DrawRibbonTab()
void CXTPRibbonOffice2013Theme::DrawRibbonTab(CDC *pDC, CXTPRibbonTab *pItem)
{
......

    XTPRibbonTabContextColor tabColor = pItem->GetContextColor();
    XTPTabPosition tabPosition = pItem->GetTabManager()->GetPosition();

    CRect r(pItem->GetRect());
    CXTPTabPaintManagerTheme::InflateRectEx(r, CRect(-1, 1, -1, -1), tabPosition);
    BOOL bSelected = pItem->IsSelected();
    if (pRibbon->IsRibbonMinimized() && bSelected)
    {
        CXTPRibbonControlTab* pControlTab = (CXTPRibbonControlTab*)pItem->GetTabManager();
        if (pControlTab)
        {
            if (!pControlTab->GetCommandBar() || !pControlTab->GetCommandBar()->IsTrackingMode())
                bSelected = FALSE;
        }
    }

    if (bSelected)
    {
        r.DeflateRect(0, 0, 1, 0);
.....
Regards,
 Oleksandr Lebed


Posted By: markr
Date Posted: 25 June 2018 at 7:00pm
Hello Oleksandr,

Thanks very much for sharing this fix.

- Mark R.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net