/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// Field name. // Get the font and size the same way as in scenario selection (lcl_DrawOneFrame in gridwin4.cxx)
vcl::Font aTextFont( mrStyle.GetAppFont() ); // use ScPatternAttr::GetFont only for font size
vcl::Font aAttrFont;
mrDoc.getCellAttributeHelper().getDefaultCellAttribute().fillFontOnly(aAttrFont, mpOutDev, &maZoomY);
aTextFont.SetFontSize(aAttrFont.GetFontSize());
mpOutDev->SetFont(aTextFont);
mpOutDev->SetTextColor(mrStyle.GetButtonTextColor());
// #i114944# AutoFilter button is left-aligned in RTL. // DataPilot button is always right-aligned for now, so text output isn't affected. if (mbPopupLeft)
rPos.setX(maPos.getX()); else
rPos.setX(maPos.getX() + maSize.getWidth() - nW);
// Button background color
Color aFaceColor = mrStyle.GetFaceColor();
Color aBackgroundColor
= mbHasHiddenMember ? mrStyle.GetHighlightColor()
: mbPopupPressed ? mrStyle.GetShadowColor() : aFaceColor;
// Button line color
mpOutDev->SetLineColor(mrStyle.GetLabelTextColor()); // If the document background is light and face color is dark, use ShadowColor instead
Color aDocColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; if (aDocColor.IsBright() && aFaceColor.IsDark())
mpOutDev->SetLineColor(mrStyle.GetShadowColor());
// the arrowhead
Color aArrowColor = mbHasHiddenMember ? mrStyle.GetHighlightTextColor() : mrStyle.GetButtonTextColor(); // FIXME: HACK: The following DrawPolygon draws twice in lok rtl mode for some reason. // => one at the correct location with fill (possibly no outline) // => and the other at an x offset with outline and without fill // eg. Replacing this with a DrawRect() does not have any such problems.
comphelper::LibreOfficeKit::isActive() ? mpOutDev->SetLineColor() : mpOutDev->SetLineColor(aArrowColor);
mpOutDev->SetFillColor(aArrowColor);
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.