summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-11-10 23:01:48 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-11-12 10:25:11 +0000
commit014b0674a17845ac320a4d3de6c7497ad803f17d (patch)
tree75f04c34ab12457f925a085f1f647630696e377d /sd
parentbin/rename-sw-abbreviations.sh run to fix few re-introduced abbrvtns. (diff)
downloadcore-014b0674a17845ac320a4d3de6c7497ad803f17d.tar.gz
core-014b0674a17845ac320a4d3de6c7497ad803f17d.zip
Encourage ValueSet to render a legend as well as an icon.
Change-Id: I83688a70b864bddb2af0a0a5b34968099c49d112 Reviewed-on: https://gerrit.libreoffice.org/19913 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index dc16de9c2a5b..e223d116d6c6 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -52,9 +52,6 @@
#include <algorithm>
-#define TRANSITION_THUMB_WIDTH 64
-#define TRANSITION_THUMB_HEIGHT 40
-
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -389,8 +386,6 @@ public:
set_hexpand( true );
set_vexpand( true );
SetExtraSpacing( 2 );
- SetItemWidth( TRANSITION_THUMB_WIDTH );
- SetItemHeight( TRANSITION_THUMB_HEIGHT );
}
virtual ~TransitionPane() { disposeOnce(); }
@@ -444,8 +439,11 @@ SlideTransitionPane::SlideTransitionPane(
mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY );
// dummy list box of slide transitions for startup.
- mpVS_TRANSITION_ICONS->InsertItem( 0, Image( BitmapEx( "sd/cmd/transition-none.png" ) ),
- SD_RESSTR( STR_SLIDETRANSITION_NONE ) );
+ mpVS_TRANSITION_ICONS->InsertItem(
+ 0, Image( BitmapEx( "sd/cmd/transition-none.png" ) ),
+ SD_RESSTR( STR_SLIDETRANSITION_NONE ),
+ VALUESET_APPEND, /* show legend */ true );
+ mpVS_TRANSITION_ICONS->RecalculateItemSizes();
// set defaults
mpCB_AUTO_PREVIEW->Check(); // automatic preview on
@@ -1123,7 +1121,9 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, LateInitCallback, Timer *, void)
if ( aIcon.IsEmpty() ) // need a fallback
aIcon = BitmapEx( "sd/cmd/transition-none.png" );
- mpVS_TRANSITION_ICONS->InsertItem( nPresetOffset + 1, Image( aIcon ), sLabel );
+ mpVS_TRANSITION_ICONS->InsertItem(
+ nPresetOffset + 1, Image( aIcon ), sLabel,
+ VALUESET_APPEND, /* show legend */ true );
m_aNumVariants[ pPreset->getSetId() ] = 1;
}
@@ -1134,6 +1134,7 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, LateInitCallback, Timer *, void)
}
nPresetOffset++;
}
+ mpVS_TRANSITION_ICONS->RecalculateItemSizes();
SAL_INFO( "sd.transitions", "Item transition offsets in ValueSet:");
for( size_t i = 0; i < mpVS_TRANSITION_ICONS->GetItemCount(); ++i )