[commit] r2585 - branches/GME-449/SDK/DecoratorLib
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Feb 18 07:56:08 CST 2015
Author: lattmann
Date: Wed Feb 18 07:56:08 2015
New Revision: 2585
Log:
GME-449 use the old model style if no icon is defined.
Modified:
branches/GME-449/SDK/DecoratorLib/ModelComplexPart.cpp
Modified: branches/GME-449/SDK/DecoratorLib/ModelComplexPart.cpp
==============================================================================
--- branches/GME-449/SDK/DecoratorLib/ModelComplexPart.cpp Tue Feb 17 20:17:37 2015 (r2584)
+++ branches/GME-449/SDK/DecoratorLib/ModelComplexPart.cpp Wed Feb 18 07:56:08 2015 (r2585)
@@ -1292,8 +1292,9 @@
CRect location = cRect;
//if (m_LeftPorts.size() != 0 || m_RightPorts.size() != 0)
+ if (m_pBitmap->getName() != createResString(IDB_MODEL) && TypeableBitmapPart::m_bActive)
{
-
+ // draw this type of background only if icon is defined
Gdiplus::Rect rect(cRect.left, cRect.top, cRect.Width(), cRect.Height());
Gdiplus::LinearGradientBrush linearGradientBrush(rect,
Gdiplus::Color(GetRValue(m_crBrush), GetGValue(m_crBrush), GetBValue(m_crBrush)),
@@ -1310,6 +1311,15 @@
path.AddArc(location.right - m_iRoundCornerRadius, location.bottom - m_iRoundCornerRadius, m_iRoundCornerRadius, m_iRoundCornerRadius, 0, 90);
path.AddArc(location.left, location.bottom - m_iRoundCornerRadius, m_iRoundCornerRadius, m_iRoundCornerRadius, 90, 90);
gdip->FillPath(&brush, &path);
+ } else {
+ // use the old model style if no icon is defined
+ int iDepth = (m_bReferenced) ? 2 : ((m_iTypeInfo == 3) ? 4 : 8);
+ CRect cRect2 = cRect;
+ cRect2.InflateRect(1, 1);
+ getFacilities().DrawBox(gdip, cRect2, (!m_bActive) ? COLOR_LIGHTGRAY : (m_bOverlay) ? m_crOverlay : COLOR_GRAY,
+ iDepth, m_bRoundCornerRect, m_bRoundCornerRadius);
+ getFacilities().DrawRect(gdip, cRect, (m_bActive) ? m_crBorder : COLOR_GRAY, 1, m_bRoundCornerRect,
+ m_bRoundCornerRadius);
}
if (m_bmp.get())
More information about the gme-commit
mailing list