summaryrefslogtreecommitdiff
path: root/avmedia/source/framework/MediaControlBase.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-12-23 20:40:22 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-12-23 20:40:22 +0000
commit7a339a03d2dbdd84fdc2b583b2c52a7f2f477589 (patch)
treeacce785e8e5dcfc86d4f0dd32afc2d527974f4c1 /avmedia/source/framework/MediaControlBase.cxx
parent3cbe00474c373f21b5793915c4919e5c277d2c01 (diff)
unwind AVMEDIA_IMGLST/AVMEDIA_IMGLST_L ImageLists
Change-Id: Idf115c12c5da138141010673ed2bf0525aec6aaa
Diffstat (limited to 'avmedia/source/framework/MediaControlBase.cxx')
-rw-r--r--avmedia/source/framework/MediaControlBase.cxx46
1 files changed, 37 insertions, 9 deletions
diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx
index 522479d39652..29921e78c553 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -34,8 +34,7 @@ using ::rtl::OUString;
namespace avmedia {
-MediaControlBase::MediaControlBase():
- maImageList( SvtMiscOptions().AreCurrentSymbolsLarge() ? AVMEDIA_RESID( AVMEDIA_IMGLST_L ) : AVMEDIA_RESID( AVMEDIA_IMGLST ) )
+MediaControlBase::MediaControlBase()
{
}
@@ -97,21 +96,21 @@ void MediaControlBase::UpdateTimeSlider( MediaItem aMediaItem )
void MediaControlBase::InitializeWidgets()
{
- mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage( AVMEDIA_IMG_PLAY ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE );
+ mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, GetImage(AVMEDIA_TOOLBOXITEM_PLAY), OUString( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), ToolBoxItemBits::CHECKABLE );
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY );
- mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage( AVMEDIA_IMG_PAUSE ), OUString( AVMEDIA_RESID( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE );
+ mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_PAUSE, GetImage(AVMEDIA_TOOLBOXITEM_PAUSE), OUString( AVMEDIA_RESID( AVMEDIA_STR_PAUSE ) ), ToolBoxItemBits::CHECKABLE );
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_PAUSE, HID_AVMEDIA_TOOLBOXITEM_PAUSE );
- mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage( AVMEDIA_IMG_STOP ), OUString( AVMEDIA_RESID( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE );
+ mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_STOP, GetImage(AVMEDIA_TOOLBOXITEM_STOP), OUString( AVMEDIA_RESID( AVMEDIA_STR_STOP ) ), ToolBoxItemBits::CHECKABLE );
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_STOP, HID_AVMEDIA_TOOLBOXITEM_STOP );
mpPlayToolBox->InsertSeparator();
- mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage( AVMEDIA_IMG_ENDLESS ), OUString( AVMEDIA_RESID( AVMEDIA_STR_ENDLESS ) ) );
+ mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, GetImage(AVMEDIA_TOOLBOXITEM_LOOP), OUString( AVMEDIA_RESID( AVMEDIA_STR_LOOP ) ) );
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_LOOP, HID_AVMEDIA_TOOLBOXITEM_LOOP );
- mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage( AVMEDIA_IMG_MUTE ), OUString( AVMEDIA_RESID( AVMEDIA_STR_MUTE ) ) );
+ mpMuteToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, GetImage(AVMEDIA_TOOLBOXITEM_MUTE), OUString( AVMEDIA_RESID( AVMEDIA_STR_MUTE ) ) );
mpMuteToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_MUTE, HID_AVMEDIA_TOOLBOXITEM_MUTE );
mpZoomListBox->InsertEntry( OUString( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_50 ) ), AVMEDIA_ZOOMLEVEL_50 );
@@ -265,9 +264,38 @@ void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem aI
}
}
-Image MediaControlBase::GetImage( sal_Int32 nImageId) const
+Image MediaControlBase::GetImage(sal_Int32 nImageId)
{
- return maImageList.GetImage( static_cast< sal_uInt16 >( nImageId ) );
+ const bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
+
+ switch (nImageId)
+ {
+ default:
+ case AVMEDIA_TOOLBOXITEM_PLAY:
+ nImageId = bLarge ? AVMEDIA_IMG_PLAY_LARGE : AVMEDIA_IMG_PLAY_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_PAUSE:
+ nImageId = bLarge ? AVMEDIA_IMG_PAUSE_LARGE : AVMEDIA_IMG_PAUSE_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_STOP:
+ nImageId = bLarge ? AVMEDIA_IMG_STOP_LARGE : AVMEDIA_IMG_STOP_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_MUTE:
+ nImageId = bLarge ? AVMEDIA_IMG_MUTE_LARGE : AVMEDIA_IMG_MUTE_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_LOOP:
+ nImageId = bLarge ? AVMEDIA_IMG_LOOP_LARGE : AVMEDIA_IMG_LOOP_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_OPEN:
+ nImageId = bLarge ? AVMEDIA_IMG_OPEN_LARGE : AVMEDIA_IMG_OPEN_NORMAL;
+ break;
+ case AVMEDIA_TOOLBOXITEM_INSERT:
+ nImageId = bLarge ? AVMEDIA_IMG_INSERT_LARGE : AVMEDIA_IMG_INSERT_NORMAL;
+ break;
+
+ }
+
+ return Image(BitmapEx(AVMEDIA_RESID(nImageId)));
}
}