You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2022/03/09 16:10:00 UTC
[openoffice] branch trunk updated: Revert changes to menu button
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 323a7b1 Revert changes to menu button
323a7b1 is described below
commit 323a7b1d0184c1f13b360b02635f65e11294182c
Author: mseidel <ms...@apache.org>
AuthorDate: Wed Mar 9 17:09:39 2022 +0100
Revert changes to menu button
---
main/vcl/source/window/toolbox.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/main/vcl/source/window/toolbox.cxx b/main/vcl/source/window/toolbox.cxx
index 0c90597..dcf1304 100644
--- a/main/vcl/source/window/toolbox.cxx
+++ b/main/vcl/source/window/toolbox.cxx
@@ -3269,16 +3269,15 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight )
}
else
{
- // improve visibility, no gradient anymore. TODO: code cleanup
+ // improve visibility by using a dark gradient
Gradient g;
g.SetAngle( pThis->mbHorz ? 0 : 900 );
g.SetStyle( GRADIENT_LINEAR );
- g.SetStartColor( COL_LIGHTGRAY );
- g.SetEndColor( COL_LIGHTGRAY );
+ g.SetStartColor( pThis->GetSettings().GetStyleSettings().GetFaceColor() );
+ g.SetEndColor( pThis->GetSettings().GetStyleSettings().GetShadowColor() );
pThis->DrawGradient( aInnerRect, g );
- pThis->DrawRect( aInnerRect );
}
Rectangle aRect( aInnerRect );
@@ -3670,7 +3669,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHighlight, sal_Bool bPain
{
// left align also to leave space for drop down arrow
// and when drawing text+image
- // just center in y, except for vertical (i.e. rotated text)
+ // just center in y, except for vertical (ie rotated text)
if( mbHorz || !bText )
nImageOffY += (nBtnHeight-aImageSize.Height())/2;
}
@@ -5562,7 +5561,7 @@ void ToolBox::LoseFocus()
// -----------------------------------------------------------------------
-// performs the action associated with an item, i.e. simulates clicking the item
+// performs the action associated with an item, ie simulates clicking the item
void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl )
{
mnHighItemId = nItemId;