[Libreoffice-commits] .: Branch 'feature/cmclayout' - 2 commits - vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Tue May 22 07:28:38 PDT 2012


 vcl/source/window/brdwin.cxx             |    9 ++-------
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    6 ++++--
 2 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit a112f8e30bc7be8d9bb9b80848689d1283aa086c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 22 15:28:29 2012 +0100

    make radiobuttons a more pleasing height

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 90a43be..950555e 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1076,12 +1076,14 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  ControlType nType,
         NWEnsureGTKRadio( m_nXScreen );
         NWEnsureGTKCheck( m_nXScreen );
         GtkWidget* widget = (nType == CTRL_RADIOBUTTON) ? gWidgetData[m_nXScreen].gRadioWidget : gWidgetData[m_nXScreen].gCheckWidget;
-        gint indicator_size, indicator_spacing;
+        gint indicator_size, indicator_spacing, focusPad, focusWidth;
         gtk_widget_style_get( widget,
                               "indicator_size", &indicator_size,
                               "indicator_spacing", &indicator_spacing,
+                              "focus-line-width", &focusWidth,
+                              "focus-padding", &focusPad,
                               (char *)NULL);
-        indicator_size += 2*indicator_spacing; // guess overpaint of theme
+        indicator_size += 2*indicator_spacing + 2*(focusWidth + focusWidth);
         rNativeBoundingRegion = rControlRegion;
         Rectangle aIndicatorRect( Point( 0,
                                          (rControlRegion.GetHeight()-indicator_size)/2),
commit 7a7231e3e0621a60b26d7eb9965f7ff7086f8252
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 22 15:26:13 2012 +0100

    don't factor in border window spacing after all
    
    it makes the spinboxes too tall, possibly might
    make sense to add the border window padding, but
    maybe in the native widgets remove it again

diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index e0d4fef..5456663 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -2355,15 +2355,10 @@ Size ImplBorderWindow::GetOptimalSize(WindowSizeType eType) const
         return Size(mnMaxWidth, mnMaxHeight);
     if (eType == WINDOWSIZE_MINIMUM)
         return Size(mnMinWidth, mnMinHeight);
-    Size aRet(0, 0);
     Window* pClientWindow = ImplGetClientWindow();
     if (pClientWindow)
-        aRet = pClientWindow->GetOptimalSize(eType);
-    sal_Int32 nLeftBorder, nTopBorder, nRightBorder, nBottomBorder;
-    GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
-    aRet.Width() += nLeftBorder+nRightBorder;
-    aRet.Height() += nTopBorder+nBottomBorder;
-    return aRet;
+        return pClientWindow->GetOptimalSize(eType);
+    return Size(0, 0);
 }
 
 void ImplBorderWindow::setChildAnyProperty(const rtl::OString &rString, const ::com::sun::star::uno::Any &rValue)


More information about the Libreoffice-commits mailing list