diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-10-30 16:24:37 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-10-30 18:00:05 +0000 |
commit | b1426b5b502fd591402d666994e3f1fb3a8ad959 (patch) | |
tree | 3614d896993b004e805f9714a126070ec5d5c29f /cui/source | |
parent | 17b1ebbf86ceabe2e9cabf9626ca94fae3fb9216 (diff) |
tdf#95014 initial support for 32 px icons in toolbar
This adds support for 32 pixel icons - mainly to get them into
the toolbar.
Most changes made are to change the behavior of having only small
and large icons as a boolean choice, but not every code path was
converted to non-boolean choice yet.
Breeze icon theme has the 32px variants so it can be used already.
Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87
Reviewed-on: https://gerrit.libreoffice.org/30398
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/customize/cfg.cxx | 13 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 13 |
2 files changed, 21 insertions, 5 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 6d08562a321d..20dece223187 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -374,10 +374,14 @@ void InitImageType() css::ui::ImageType::COLOR_NORMAL | css::ui::ImageType::SIZE_DEFAULT; - if ( SvtMiscOptions().AreCurrentSymbolsLarge() ) + if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE) { theImageType |= css::ui::ImageType::SIZE_LARGE; } + else if (SvtMiscOptions().GetSymbolsSize() == SFX_SYMBOLS_SIZE_32) + { + theImageType |= css::ui::ImageType::SIZE_32; + } } sal_Int16 GetImageType() @@ -5040,8 +5044,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow, pTbSymbol->SetPageScroll( true ); - bool bLargeIcons = GetImageType() & css::ui::ImageType::SIZE_LARGE; - m_nExpectedSize = bLargeIcons ? 26 : 16; + m_nExpectedSize = 16; + if (GetImageType() & css::ui::ImageType::SIZE_LARGE) + m_nExpectedSize = 26; + else if (GetImageType() & css::ui::ImageType::SIZE_32) + m_nExpectedSize = 32; if ( m_nExpectedSize != 16 ) { diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 78f5ad6b99a4..e308843eb438 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -761,6 +761,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) case 0: eSet = SFX_SYMBOLS_SIZE_AUTO; break; case 1: eSet = SFX_SYMBOLS_SIZE_SMALL; break; case 2: eSet = SFX_SYMBOLS_SIZE_LARGE; break; + case 3: eSet = SFX_SYMBOLS_SIZE_32; break; default: OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_pIconSizeLB should not be possible!" ); } @@ -953,10 +954,18 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) SvtMiscOptions aMiscOptions; mpOpenGLConfig->reset(); - if( aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO ) - nSizeLB_InitialSelection = ( aMiscOptions.AreCurrentSymbolsLarge() )? 2 : 1; + if (aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO) + { + nSizeLB_InitialSelection = 1; + + if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE) + nSizeLB_InitialSelection = 2; + else if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_32) + nSizeLB_InitialSelection = 3; + } m_pIconSizeLB->SelectEntryPos( nSizeLB_InitialSelection ); m_pIconSizeLB->SaveValue(); + if( aMiscOptions.GetSidebarIconSize() == ToolBoxButtonSize::DontCare ) ; // do nothing else if( aMiscOptions.GetSidebarIconSize() == ToolBoxButtonSize::Small ) |