[Libreoffice-commits] .: 6 commits - vcl/aqua vcl/source vcl/unx

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Nov 25 12:12:59 PST 2010


 vcl/aqua/source/window/salframe.cxx      |    2 ++
 vcl/source/control/combobox.cxx          |    2 +-
 vcl/source/control/ilstbox.cxx           |   12 ++++++++++++
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    3 +--
 vcl/unx/kde/salnativewidgets-kde.cxx     |    2 ++
 vcl/unx/kde4/KDESalFrame.cxx             |    2 ++
 6 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit 56b2d48cfe847ef3e0fea6d5d8dae0341d0cfb02
Merge: efe6ea3... 96d6379...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Nov 25 21:11:18 2010 +0100

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-gui

commit efe6ea38489d5e9c3f7fa1717d67964db74207d2
Merge: 7c0e859... a53e399...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Nov 25 21:00:22 2010 +0100

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-gui

commit 7c0e8598fb941022396fdf32b499c9beaa9dff6f
Merge: 7b0c28f... 87ae510...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Nov 25 14:27:02 2010 +0100

    Merge remote branch 'origin/libreoffice-3-3'

commit 87ae510658ecfa4ebfa08381482ac0ee3f27cb40
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Nov 25 00:25:02 2010 +0100

    Make toolbar icon size native-widget controlled
    
    This improves on the gui-toolbox-large-icons.diff, in that the
    icon size is set to 'auto', and the native widget code decides which
    size to pick. This was chiefly triggered by Mac user complaints, not
    so much liking the large icons there.

diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index eb1ed95..745152f 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1170,6 +1170,8 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
     getResolution( nDPIX, nDPIY );
     aAppFont = getFont( [NSFont systemFontOfSize: 0], nDPIY, aAppFont );
 
+    aStyleSettings.SetToolbarIconSize( nDPIY > 160 ? STYLE_TOOLBAR_ICONSIZE_LARGE : STYLE_TOOLBAR_ICONSIZE_SMALL );
+
     // TODO: better mapping of aqua<->ooo font settings
     aStyleSettings.SetAppFont( aAppFont );
     aStyleSettings.SetHelpFont( aAppFont );
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 13e3852..0dcaf0c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3581,8 +3581,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     aStyleSet.SetPreferredSymbolsStyleName( OUString::createFromAscii( pIconThemeName ) );
     g_free( pIconThemeName );
 
-    //  FIXME: need some way of fetching toolbar icon size.
-//	aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
+	aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
 
     const cairo_font_options_t* pNewOptions = NULL;
     if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 3f964f3..c15e617 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1831,6 +1831,8 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
     StyleSettings aStyleSettings( rSettings.GetStyleSettings() );
     bool bSetTitleFont = false;
 
+    aStyleSettings.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+
     // WM settings
     KConfig *pConfig = KGlobal::config();
     if ( pConfig )
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index c891c93..80adaa9 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -185,6 +185,8 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
     // General settings
     QPalette pal = kapp->palette();
     
+    style.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
+
     style.SetActiveColor(toColor(pal.color(QPalette::Active, QPalette::Window)));
     style.SetDeactiveColor(toColor(pal.color(QPalette::Inactive, QPalette::Window)));
     
commit b44cfbbf6ed9bc53310dcb37507f534800572fb5
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Nov 19 18:12:56 2010 -0500

    Allow the dropdown list of a combo box to be scrollable. (fdo#31710)
    
    This change makes the dropdown list of a combo box control to be
    horizontally scrollable in case the longest text in the list box
    is wider than the maximum allowed width of the dropdown list.
    
    Also, previously the dropdown list would become wider than the
    desktop width when the longest text exceeded the desktop width.
    This change caps the max width of the dropdown list to be the width
    of the desktop width.

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 329f88e..178974d 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -213,7 +213,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle )
     Window* pLBParent = this;
     if ( mpFloatWin )
         pLBParent = mpFloatWin;
-    mpImplLB = new ImplListBox( pLBParent, nListStyle|WB_SIMPLEMODE );
+    mpImplLB = new ImplListBox( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL );
     mpImplLB->SetPosPixel( Point() );
     mpImplLB->SetSelectHdl( LINK( this, ComboBox, ImplSelectHdl ) );
     mpImplLB->SetCancelHdl( LINK( this, ComboBox, ImplCancelHdl ) );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 78f535e..5c8f422 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -3147,6 +3147,11 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
             long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
             aFloatSz.Width() += nSBWidth;
         }
+
+        long nDesktopWidth = GetDesktopRectPixel().getWidth();
+        if (aFloatSz.Width() > nDesktopWidth)
+            // Don't exceed the desktop width.
+            aFloatSz.Width() = nDesktopWidth;
     }
 
     if ( aFloatSz.Height() > nMaxHeight )
@@ -3173,6 +3178,13 @@ Size ImplListBoxFloatingWindow::CalcFloatSize()
         aFloatSz.Height() = nInnerHeight + nTop + nBottom;
     }
 
+    if (aFloatSz.Width() < aSz.Width())
+    {
+        // The max width of list box entries exceeds the window width.
+        // Account for the scroll bar height.
+        long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
+        aFloatSz.Height() += nSBWidth;
+    }
     return aFloatSz;
 }
 
commit c5827cd5ef54c189eadbc12ff2f971fe1235723d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 17 09:13:50 2010 +0000

    Resolves: rhbz#654203# crash after unhandled exception
    (cherry picked from commit 4af5d4b6be76231c0db1a0f5dcbfdd5dab293f2c)

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 43833df..18ac631 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3788,11 +3788,18 @@ uno::Reference<accessibility::XAccessibleEditableText> lcl_GetxText()
     uno::Reference<accessibility::XAccessibleEditableText> xText;
     Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin;
     if (!pFocusWin)
-    return xText;
+        return xText;
 
-    uno::Reference< accessibility::XAccessible > xAccessible( pFocusWin->GetAccessible( true ) );
-    if (xAccessible.is())
-        xText = FindFocus(xAccessible->getAccessibleContext());
+    try
+    {
+        uno::Reference< accessibility::XAccessible > xAccessible( pFocusWin->GetAccessible( true ) );
+        if (xAccessible.is())
+            xText = FindFocus(xAccessible->getAccessibleContext());
+    }
+    catch(const uno::Exception& e)
+    {
+        g_warning( "Exception in getting input method surrounding text" );
+    }
     return xText;
 }
 


More information about the Libreoffice-commits mailing list