rpms/openoffice.org/devel openoffice.org-1.9.92.oooXXXXX.gtk-nwf-combo-box-button-fix.patch, NONE, 1.1 openoffice.org.spec, 1.155, 1.156

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Apr 21 16:06:16 UTC 2005


Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14075

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-1.9.92.oooXXXXX.gtk-nwf-combo-box-button-fix.patch 
Log Message:
Fix GTK combo box button sizes


openoffice.org-1.9.92.oooXXXXX.gtk-nwf-combo-box-button-fix.patch:
 source/control/combobox.cxx          |    5 +++--
 unx/gtk/gdi/salnativewidgets-gtk.cxx |   20 +++++++++++++++++---
 2 files changed, 20 insertions(+), 5 deletions(-)

--- NEW FILE openoffice.org-1.9.92.oooXXXXX.gtk-nwf-combo-box-button-fix.patch ---
--- vcl/source/control/combobox.cxx.combo-button-fix	2005-04-21 10:39:50.000000000 -0400
+++ vcl/source/control/combobox.cxx	2005-04-21 10:55:14.000000000 -0400
@@ -677,8 +677,9 @@
             aContent.Move(-aPoint.X(), -aPoint.Y());
 
 			// use the themes drop down size for the button
-            aOutSz.Width() = aContent.GetBoundRect().Left();
-		    mpBtn->SetPosSizePixel( aContent.GetBoundRect().Left(), nTop, aContent.GetBoundRect().getWidth(), (nBottom-nTop) );
+            aOutSz.Width() = aContent.GetBoundRect().Left()-1;
+            Rectangle aContentRect = aContent.GetBoundRect();
+            mpBtn->SetPosSizePixel( aContentRect.TopLeft(), aContentRect.GetSize() );
 
             // adjust the size of the edit field
             if ( GetNativeControlRegion(CTRL_COMBOBOX, PART_SUB_EDIT,
--- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx.combo-button-fix	2005-04-19 11:55:20.000000000 -0400
+++ vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx	2005-04-21 12:00:33.000000000 -0400
@@ -859,7 +859,7 @@
             
 			returnVal = TRUE;
 		}
-		if ( (nType==CTRL_COMBOBOX) && (nPart==PART_BUTTON_DOWN) )
+		if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) )
 		{
 			rNativeBoundingRegion = NWGetComboBoxButtonRect( nType, nPart, rControlRegion.GetBoundRect(), nState,
             aValue, rControlHandle, aCaption );
@@ -1984,7 +1984,7 @@
         buttonRect.Left() += 1;
 
 	Rectangle		aEditBoxRect( pixmapRect );
-	aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth(), aEditBoxRect.GetHeight() ) );
+	aEditBoxRect.SetSize( Size( pixmapRect.GetWidth() - buttonRect.GetWidth() - 1, aEditBoxRect.GetHeight() ) );
 
     #define ARROW_EXTENT		0.7
 	arrowRect.SetSize( Size( (gint)(MIN_ARROW_SIZE * ARROW_EXTENT),
@@ -2035,6 +2035,7 @@
 									OUString				aCaption )
 {
 	Rectangle	aButtonRect;
+	Rectangle	aItemRect;
 	gint		nArrowWidth;
 	gint		nFocusWidth;
 	gint		nFocusPad;
@@ -2052,7 +2053,20 @@
 	aButtonRect.SetPos( Point( aAreaRect.Left() + aAreaRect.GetWidth() - aButtonRect.GetWidth(),
                         aAreaRect.Top() ) );
 
-	return( aButtonRect );
+	switch (nPart)
+	{
+		case PART_SUB_EDIT:
+			aItemRect.SetPos( Point(0, 0) );
+			aItemRect.SetSize( Size( aAreaRect.Left() + aAreaRect.GetWidth() - aButtonRect.GetWidth() - 1,
+							aAreaRect.GetHeight() ) );
+			break;
+
+		default:
+			aItemRect = aButtonRect;
+			break;
+	}
+
+	return( aItemRect );
 }
 
 //-------------------------------------


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- openoffice.org.spec	21 Apr 2005 07:25:46 -0000	1.155
+++ openoffice.org.spec	21 Apr 2005 16:06:09 -0000	1.156
@@ -93,6 +93,7 @@
 Patch40: openoffice.org-1.9.92.ooo47641.pptmimetype.patch
 Patch41: workspace.db4-2.patch
 Patch42: openoffice.org-1.9.93.gccXXXXX.broken.patch
+Patch43: openoffice.org-1.9.92.oooXXXXX.gtk-nwf-combo-box-button-fix.patch
 
 %define instdir %{_libdir}/openoffice.org%{version}
 
@@ -691,6 +692,7 @@
 %patch40 -p1 -b .ooo47641.pptmimetype.patch
 %patch41 -p1 -b .workspace.db4-2.patch
 %patch42 -p1 -b .gccXXXXX.broken.patch
+%patch43 -p1 -b .oooXXXXX.gtk-nwf-combo-box-button-fix.patch
 
 tar xvzf %{SOURCE1}
 %build
@@ -2439,6 +2441,9 @@
 %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
 
 %changelog
+* Thu Apr 21 2005 Dan Williams <dcbw at redhat.com> - xxxx
+- Fix GTK combo box button sizes
+
 * Wed Apr 13 2005 Caolan McNamara <caolanm at redhat.com> - 1:1.9.93-1
 - bump to next version
 - drop integrated openoffice.org-1.9.85.ooo45146.mandrakelicence.patch




More information about the fedora-cvs-commits mailing list