Point aBoxPos = GetParent()->LogicToPixel(rPortionPaintArea.Pos());
Size aBoxSize = GetParent()->LogicToPixel(rPortionPaintArea.SSize());
// First calculate the size of the frame around the content control's last portion int nPadding = aBoxSize.Height() / 4;
aBoxPos.AdjustX(-nPadding / 2);
aBoxPos.AdjustY(-1);
aBoxSize.AdjustWidth(nPadding);
aBoxSize.AdjustHeight(2);
// Then extend the size with the button area if (m_bRTL)
{
aBoxPos.AdjustX(-GetParent()->LogicToPixel(rPortionPaintArea.SSize()).Height());
}
aBoxSize.AdjustWidth(GetParent()->LogicToPixel(rPortionPaintArea.SSize()).Height());
Color aLineColor = COL_BLACK;
Color aFillColor = aLineColor;
aFillColor.IncreaseLuminance(255 * (m_xPopup ? 0.5 : 0.75));
// Calc the frame around the content control's last portion int nPadding = 1;
Point aPos(nPadding, nPadding);
Size aSize(m_aFramePixel.GetSize().Width() - nPadding,
m_aFramePixel.GetSize().Height() - nPadding); const tools::Rectangle aFrameRect(tools::Rectangle(aPos, aSize));
// Draw the button next to the frame
Point aButtonPos(aFrameRect.TopLeft()); if (m_bRTL)
{
aButtonPos.AdjustX(nPadding * 2);
} else
{
aButtonPos.AdjustX(aFrameRect.GetSize().getWidth() - nPadding * 2);
}
Size aButtonSize(aFrameRect.GetSize());
aButtonSize.setWidth(GetSizePixel().getWidth() - aFrameRect.getOpenWidth() - nPadding); const tools::Rectangle aButtonRect(tools::Rectangle(aButtonPos, aButtonSize));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.