[Libreoffice] [PATCH] set the icons size based on the DPI just like we do on Mac

Christian Lohmaier lohmaier+libreoffice at googlemail.com
Sun Jan 2 17:16:06 PST 2011


Hi *,

On Sun, Jan 2, 2011 at 9:51 PM, Robert Nagy <robert at openbsd.org> wrote:
> ---
>  vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
> index f7a1cf2..fe7791d 100644
> --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
> +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
> @@ -3592,7 +3592,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
>     aStyleSet.SetPreferredSymbolsStyleName( OUString::createFromAscii( pIconThemeName ) );
>     g_free( pIconThemeName );
>
> -       aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
> +    aStyleSet.SetToolbarIconSize( nDispDPIY > 160 ? STYLE_TOOLBAR_ICONSIZE_LARGE : STYLE_TOOLBAR_ICONSIZE_SMALL );
>
>     const cairo_font_options_t* pNewOptions = NULL;
>     if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
> --
> 1.7.3.2

How much effort would it be to read the property from gconf if
available (or is this already done when DESKTOP=gnome)?

I prefer small icons, no matter what. Icons are there to preserve
space, provide access to functionality, not to waste my screen-estate
with "pretty pictures". I don't need to guess what people do by
looking at what they depict. (if I'm unsure, I read the
tooltip/extended tip). Of those I use frequently, I don't even look at
the picture, I know where it sits in the toolbar...

$ gconftool-2 --get /desktop/gnome/interface/toolbar_icons_size
small-toolbar
(as opposed to large-toolbar)

ciao
Christian


More information about the LibreOffice mailing list