ooo-build r12445 - in trunk: . patches/dev300



Author: kyoshida
Date: Sat May  3 03:40:30 2008
New Revision: 12445
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12445&view=rev

Log:
2008-05-02  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/svtools-adjust-sheet-tabcolor.diff: ensure that the 
	tab colors of selected and unselected sheets can be distinguished, 
	because in some color schemes the two colors are so close that it's 
	very hard to tell them apart. (n#386029)

	* patches/dev300/apply: apply the new patch.


Added:
   trunk/patches/dev300/svtools-adjust-sheet-tabcolor.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Sat May  3 03:40:30 2008
@@ -1557,6 +1557,10 @@
 # navigating through cells.
 sc-skip-overlapped-cells.diff, i#86943, n#362674, kohei
 
+# Make sure that the colors between the tabs of selected and unselected 
+# sheets can be distinguished.
+svtools-adjust-sheet-tabcolor.diff, n#386029, kohei
+
 
 #[ OOXSTLport5 ]
 #

Added: trunk/patches/dev300/svtools-adjust-sheet-tabcolor.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/svtools-adjust-sheet-tabcolor.diff	Sat May  3 03:40:30 2008
@@ -0,0 +1,36 @@
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svtools.vpj svtools.clean/source/control/tabbar.cxx svtools/source/control/tabbar.cxx
+--- svtools.clean/source/control/tabbar.cxx	2008-05-02 23:19:10.000000000 -0400
++++ svtools/source/control/tabbar.cxx	2008-05-02 23:22:27.000000000 -0400
+@@ -518,6 +518,32 @@ void TabBar::ImplGetColors( Color& rFace
+     else
+         rSelectTextColor = rStyleSettings.GetWindowTextColor();
+ 
++    // Make sure the normal tab color is darker or brighter enough than the
++    // selected tab color.
++
++    int nDelta = abs(rSelectColor.GetRed() - rFaceColor.GetRed()) + 
++        abs(rSelectColor.GetGreen() - rFaceColor.GetGreen()) + 
++        abs(rSelectColor.GetBlue() - rFaceColor.GetBlue());
++
++    if (nDelta < 80)
++    {
++        // There isn't enough contrast between the two colors.
++        if ( rFaceColor.IsDark() )
++        {
++            double fRate = 1.0 + 2.0*(80.0 - nDelta)/80.0;
++            rFaceColor.SetRed( rFaceColor.GetRed()*fRate );
++            rFaceColor.SetGreen( rFaceColor.GetGreen()*fRate );
++            rFaceColor.SetBlue( rFaceColor.GetBlue()*fRate );
++        }
++        else
++        {
++            double fRate = 1.0 - 0.12*(80.0 - nDelta)/80.0;
++            rFaceColor.SetRed( rFaceColor.GetRed()*fRate );
++            rFaceColor.SetGreen( rFaceColor.GetGreen()*fRate );
++            rFaceColor.SetBlue( rFaceColor.GetBlue()*fRate );
++        }
++    }
++
+     // Bei 3D-Tabs wird Selektions- und Face-Farbe umgedreht, da die
+     // selektierten Tabs in 3D erscheinen sollen
+     if ( mnWinStyle & WB_3DTAB )



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]