Commit 0b053e64 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

qt: specify the image extension in Qt ressource keys for proper rendering of SVG with Qt5.6

this is workaround for https://bugreports.qt.io/browse/QTBUG-55388Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 2c62c0b5
...@@ -239,7 +239,7 @@ void ActionsManager::renderer_event_item_added( vlc_renderer_discovery_t*, ...@@ -239,7 +239,7 @@ void ActionsManager::renderer_event_item_added( vlc_renderer_discovery_t*,
return; /* we already have this item */ return; /* we already have this item */
} }
QAction *action = new QAction( vlc_renderer_item_flags(p_item) & VLC_RENDERER_CAN_VIDEO ? QIcon( ":/sidebar/movie" ) : QIcon( ":/sidebar/music" ), QAction *action = new QAction( vlc_renderer_item_flags(p_item) & VLC_RENDERER_CAN_VIDEO ? QIcon( ":/sidebar/movie.svg" ) : QIcon( ":/sidebar/music.svg" ),
vlc_renderer_item_name(p_item), VLCMenuBar::rendererMenu ); vlc_renderer_item_name(p_item), VLCMenuBar::rendererMenu );
action->setCheckable(true); action->setCheckable(true);
......
...@@ -67,13 +67,13 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -67,13 +67,13 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent,
/* Nice icons */ /* Nice icons */
#define BI( a,b) QIcon a##_icon = QIcon( b ) #define BI( a,b) QIcon a##_icon = QIcon( b )
BI( audio, ":/prefsmenu/advanced/audio" ); BI( audio, ":/prefsmenu/advanced/audio.svg" );
BI( video, ":/prefsmenu/advanced/video" ); BI( video, ":/prefsmenu/advanced/video.svg" );
BI( input, ":/prefsmenu/advanced/codec" ); BI( input, ":/prefsmenu/advanced/codec.svg" );
BI( sout, ":/prefsmenu/advanced/sout" ); BI( sout, ":/prefsmenu/advanced/sout.svg" );
BI( advanced, ":/prefsmenu/advanced/extended" ); BI( advanced, ":/prefsmenu/advanced/extended.svg" );
BI( playlist, ":/prefsmenu/advanced/playlist" ); BI( playlist, ":/prefsmenu/advanced/playlist.svg" );
BI( interface, ":/prefsmenu/advanced/intf" ); BI( interface, ":/prefsmenu/advanced/intf.svg" );
#undef BI #undef BI
/* Build the tree for the main module */ /* Build the tree for the main module */
......
...@@ -209,7 +209,7 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout_, ...@@ -209,7 +209,7 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout_,
a_button->setIcon( QIcon( iconL[button] ) ); a_button->setIcon( QIcon( iconL[button] ) );
#define BUTTON_SET_BAR2( button, image, tooltip ) \ #define BUTTON_SET_BAR2( button, image, tooltip ) \
button->setToolTip( tooltip ); \ button->setToolTip( tooltip ); \
button->setIcon( QIcon( ":/"#image ) ); button->setIcon( QIcon( ":/"#image ".svg" ) );
#define ENABLE_ON_VIDEO( a ) \ #define ENABLE_ON_VIDEO( a ) \
CONNECT( THEMIM->getIM(), voutChanged( bool ), a, setEnabled( bool ) ); \ CONNECT( THEMIM->getIM(), voutChanged( bool ), a, setEnabled( bool ) ); \
......
...@@ -126,15 +126,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP, ...@@ -126,15 +126,15 @@ static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
N_("Open subtitle file"), N_("Open subtitle file"),
N_("Dock/undock fullscreen controller to/from bottom of screen"), N_("Dock/undock fullscreen controller to/from bottom of screen"),
}; };
static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b", ":/toolbar/stop_b", static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b.svg", ":/toolbar/stop_b.svg",
":/toolbar/eject", ":/toolbar/previous_b", ":/toolbar/next_b", ":/toolbar/eject.svg", ":/toolbar/previous_b.svg", ":/toolbar/next_b.svg",
":/toolbar/slower", ":/toolbar/faster", ":/toolbar/fullscreen", ":/toolbar/slower.svg", ":/toolbar/faster.svg", ":/toolbar/fullscreen.svg",
":/toolbar/defullscreen", ":/toolbar/extended", ":/toolbar/playlist", ":/toolbar/defullscreen.svg", ":/toolbar/extended.svg", ":/toolbar/playlist.svg",
":/toolbar/snapshot", ":/toolbar/record", ":/toolbar/atob_nob", ":/toolbar/snapshot.svg", ":/toolbar/record.svg", ":/toolbar/atob_nob.svg",
":/toolbar/frame", ":/toolbar/reverse", ":/toolbar/skip_back", ":/toolbar/frame.svg", ":/toolbar/reverse.svg", ":/toolbar/skip_back.svg",
":/toolbar/skip_fw", ":/toolbar/clear", ":/buttons/playlist/shuffle_on", ":/toolbar/skip_fw.svg", ":/toolbar/clear.svg", ":/buttons/playlist/shuffle_on.svg",
":/buttons/playlist/repeat_all", ":/menu/info", ":/buttons/playlist/repeat_all.svg", ":/menu/info.svg",
":/toolbar/previous_b", ":/toolbar/next_b", ":/toolbar/eject", ":/toolbar/space" ":/toolbar/previous_b.svg", ":/toolbar/next_b.svg", ":/toolbar/eject.svg", ":/toolbar/space.svg"
}; };
enum enum
......
...@@ -53,7 +53,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -53,7 +53,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
/* We need a Label for the pix */ /* We need a Label for the pix */
volMuteLabel = new QLabel; volMuteLabel = new QLabel;
volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/volume-medium", 16, 16 ) ); volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/volume-medium.svg", 16, 16 ) );
/* We might need a subLayout too */ /* We might need a subLayout too */
QVBoxLayout *subLayout; QVBoxLayout *subLayout;
...@@ -128,7 +128,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -128,7 +128,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
void SoundWidget::refreshLabels() void SoundWidget::refreshLabels()
{ {
int i_sliderVolume = volumeSlider->value(); int i_sliderVolume = volumeSlider->value();
const char *psz_icon = ":/toolbar/volume-muted"; const char *psz_icon = ":/toolbar/volume-muted.svg";
if( b_is_muted ) if( b_is_muted )
{ {
...@@ -138,11 +138,11 @@ void SoundWidget::refreshLabels() ...@@ -138,11 +138,11 @@ void SoundWidget::refreshLabels()
} }
if( i_sliderVolume < VOLUME_MAX / 3 ) if( i_sliderVolume < VOLUME_MAX / 3 )
psz_icon = ":/toolbar/volume-low"; psz_icon = ":/toolbar/volume-low.svg";
else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) ) else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
psz_icon = ":/toolbar/volume-high"; psz_icon = ":/toolbar/volume-high.svg";
else else
psz_icon = ":/toolbar/volume-medium"; psz_icon = ":/toolbar/volume-medium.svg";
volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( psz_icon, 16, 16 ) ); volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( psz_icon, 16, 16 ) );
volMuteLabel->setToolTip( qfu(vlc_pgettext("Tooltip|Mute", "Mute")) ); volMuteLabel->setToolTip( qfu(vlc_pgettext("Tooltip|Mute", "Mute")) );
...@@ -230,7 +230,7 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) ...@@ -230,7 +230,7 @@ bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
**/ **/
void PlayButton::updateButtonIcons( bool b_playing ) void PlayButton::updateButtonIcons( bool b_playing )
{ {
setIcon( b_playing ? QIcon( ":/toolbar/pause_b" ) : QIcon( ":/toolbar/play_b" ) ); setIcon( b_playing ? QIcon( ":/toolbar/pause_b.svg" ) : QIcon( ":/toolbar/play_b.svg" ) );
setToolTip( b_playing ? qtr( "Pause the playback" ) setToolTip( b_playing ? qtr( "Pause the playback" )
: qtr( I_PLAY_TOOLTIP ) ); : qtr( I_PLAY_TOOLTIP ) );
} }
...@@ -239,18 +239,18 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB ) ...@@ -239,18 +239,18 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB )
{ {
if( !timeA && !timeB) if( !timeA && !timeB)
{ {
setIcon( QIcon( ":/toolbar/atob_nob" ) ); setIcon( QIcon( ":/toolbar/atob_nob.svg" ) );
setToolTip( qtr( "Loop from point A to point B continuously\n" setToolTip( qtr( "Loop from point A to point B continuously\n"
"Click to set point A" ) ); "Click to set point A" ) );
} }
else if( timeA && !timeB ) else if( timeA && !timeB )
{ {
setIcon( QIcon( ":/toolbar/atob_noa" ) ); setIcon( QIcon( ":/toolbar/atob_noa.svg" ) );
setToolTip( qtr( "Click to set point B" ) ); setToolTip( qtr( "Click to set point B" ) );
} }
else if( timeA && timeB ) else if( timeA && timeB )
{ {
setIcon( QIcon( ":/toolbar/atob" ) ); setIcon( QIcon( ":/toolbar/atob.svg" ) );
setToolTip( qtr( "Stop the A to B loop" ) ); setToolTip( qtr( "Stop the A to B loop" ) );
} }
} }
...@@ -258,8 +258,8 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB ) ...@@ -258,8 +258,8 @@ void AtoB_Button::updateButtonIcons( bool timeA, bool timeB )
void LoopButton::updateButtonIcons( int value ) void LoopButton::updateButtonIcons( int value )
{ {
setChecked( value != NORMAL ); setChecked( value != NORMAL );
setIcon( ( value == REPEAT_ONE ) ? QIcon( ":/buttons/playlist/repeat_one" ) setIcon( ( value == REPEAT_ONE ) ? QIcon( ":/buttons/playlist/repeat_one.svg" )
: QIcon( ":/buttons/playlist/repeat_all" ) ); : QIcon( ":/buttons/playlist/repeat_all.svg" ) );
} }
void AspectRatioComboBox::updateRatios() void AspectRatioComboBox::updateRatios()
......
...@@ -84,9 +84,9 @@ void PLSelItem::addAction( ItemAction act, const QString& tooltip ) ...@@ -84,9 +84,9 @@ void PLSelItem::addAction( ItemAction act, const QString& tooltip )
switch( act ) switch( act )
{ {
case ADD_ACTION: case ADD_ACTION:
icon = QIcon( ":/buttons/playlist/playlist_add" ); break; icon = QIcon( ":/buttons/playlist/playlist_add.svg" ); break;
case RM_ACTION: case RM_ACTION:
icon = QIcon( ":/buttons/playlist/playlist_remove" ); break; icon = QIcon( ":/buttons/playlist/playlist_remove.svg" ); break;
default: default:
return; return;
} }
...@@ -233,7 +233,7 @@ void PLSelector::createItems() ...@@ -233,7 +233,7 @@ void PLSelector::createItems()
playlistItem = putPLData( addItem( PL_ITEM_TYPE, N_("Playlist"), true ), playlistItem = putPLData( addItem( PL_ITEM_TYPE, N_("Playlist"), true ),
THEPL->p_playing ); THEPL->p_playing );
playlistItem->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_PL ) ); playlistItem->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_PL ) );
playlistItem->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/playlist" ) ); playlistItem->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/playlist.svg" ) );
setCurrentItem( playlistItem->treeItem() ); setCurrentItem( playlistItem->treeItem() );
/* ML */ /* ML */
...@@ -242,7 +242,7 @@ void PLSelector::createItems() ...@@ -242,7 +242,7 @@ void PLSelector::createItems()
PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, N_("Media Library"), true ), PLSelItem *ml = putPLData( addItem( PL_ITEM_TYPE, N_("Media Library"), true ),
THEPL->p_media_library ); THEPL->p_media_library );
ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) ); ml->treeItem()->setData( 0, SPECIAL_ROLE, QVariant( IS_ML ) );
ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library" ) ); ml->treeItem()->setData( 0, Qt::DecorationRole, QIcon( ":/sidebar/library.svg" ) );
} }
/* SD nodes */ /* SD nodes */
...@@ -285,16 +285,16 @@ void PLSelector::createItems() ...@@ -285,16 +285,16 @@ void PLSelector::createItems()
selItem->addAction( ADD_ACTION, qtr( "Subscribe to a podcast" ) ); selItem->addAction( ADD_ACTION, qtr( "Subscribe to a podcast" ) );
CONNECT( selItem, action( PLSelItem* ), this, podcastAdd( PLSelItem* ) ); CONNECT( selItem, action( PLSelItem* ), this, podcastAdd( PLSelItem* ) );
podcastsParent = selItem->treeItem(); podcastsParent = selItem->treeItem();
icon = QIcon( ":/sidebar/podcast" ); icon = QIcon( ":/sidebar/podcast.svg" );
} }
else if ( name.startsWith( "lua{" ) ) else if ( name.startsWith( "lua{" ) )
{ {
int i_head = name.indexOf( "sd='" ) + 4; int i_head = name.indexOf( "sd='" ) + 4;
int i_tail = name.indexOf( '\'', i_head ); int i_tail = name.indexOf( '\'', i_head );
QString iconname = QString( ":/sidebar/sd/%1" ).arg( name.mid( i_head, i_tail - i_head ) ); QString iconname = QString( ":/sidebar/sd/%1.svg" ).arg( name.mid( i_head, i_tail - i_head ) );
QResource resource( iconname ); QResource resource( iconname );
if ( !resource.isValid() ) if ( !resource.isValid() )
icon = QIcon( ":/sidebar/network" ); icon = QIcon( ":/sidebar/network.svg" );
else else
icon = QIcon( iconname ); icon = QIcon( iconname );
} }
...@@ -304,29 +304,29 @@ void PLSelector::createItems() ...@@ -304,29 +304,29 @@ void PLSelector::createItems()
name = name.mid( 0, name.indexOf( '{' ) ); name = name.mid( 0, name.indexOf( '{' ) );
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, devices ); selItem = addItem( SD_TYPE, *ppsz_longname, false, false, devices );
if ( name == "xcb_apps" ) if ( name == "xcb_apps" )
icon = QIcon( ":/sidebar/screen" ); icon = QIcon( ":/sidebar/screen.svg" );
else if ( name == "mtp" ) else if ( name == "mtp" )
icon = QIcon( ":/sidebar/mtp" ); icon = QIcon( ":/sidebar/mtp.svg" );
else if ( name == "disc" ) else if ( name == "disc" )
icon = QIcon( ":/sidebar/disc" ); icon = QIcon( ":/sidebar/disc.svg" );
else else
icon = QIcon( ":/sidebar/capture" ); icon = QIcon( ":/sidebar/capture.svg" );
break; break;
case SD_CAT_LAN: case SD_CAT_LAN:
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, lan ); selItem = addItem( SD_TYPE, *ppsz_longname, false, false, lan );
icon = QIcon( ":/sidebar/lan" ); icon = QIcon( ":/sidebar/lan.svg" );
break; break;
case SD_CAT_MYCOMPUTER: case SD_CAT_MYCOMPUTER:
name = name.mid( 0, name.indexOf( '{' ) ); name = name.mid( 0, name.indexOf( '{' ) );
selItem = addItem( SD_TYPE, *ppsz_longname, false, false, mycomp ); selItem = addItem( SD_TYPE, *ppsz_longname, false, false, mycomp );
if ( name == "video_dir" ) if ( name == "video_dir" )
icon = QIcon( ":/sidebar/movie" ); icon = QIcon( ":/sidebar/movie.svg" );
else if ( name == "audio_dir" ) else if ( name == "audio_dir" )
icon = QIcon( ":/sidebar/music" ); icon = QIcon( ":/sidebar/music.svg" );
else if ( name == "picture_dir" ) else if ( name == "picture_dir" )
icon = QIcon( ":/sidebar/pictures" ); icon = QIcon( ":/sidebar/pictures.svg" );
else else
icon = QIcon( ":/sidebar/movie" ); icon = QIcon( ":/sidebar/movie.svg" );
break; break;
default: default:
selItem = addItem( SD_TYPE, *ppsz_longname ); selItem = addItem( SD_TYPE, *ppsz_longname );
......
...@@ -101,10 +101,10 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -101,10 +101,10 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
lastActivatedPLItemId = -1; lastActivatedPLItemId = -1;
QList<QString> frames; QList<QString> frames;
frames << ":/util/wait1"; frames << ":/util/wait1.svg";
frames << ":/util/wait2"; frames << ":/util/wait2.svg";
frames << ":/util/wait3"; frames << ":/util/wait3.svg";
frames << ":/util/wait4"; frames << ":/util/wait4.svg";
spinnerAnimation = new PixmapAnimator( this, frames, SPINNER_SIZE, SPINNER_SIZE ); spinnerAnimation = new PixmapAnimator( this, frames, SPINNER_SIZE, SPINNER_SIZE );
CONNECT( spinnerAnimation, pixmapReady( const QPixmap & ), this, updateViewport() ); CONNECT( spinnerAnimation, pixmapReady( const QPixmap & ), this, updateViewport() );
...@@ -190,27 +190,27 @@ bool StandardPLPanel::popup( const QPoint &point ) ...@@ -190,27 +190,27 @@ bool StandardPLPanel::popup( const QPoint &point )
/* Play/Stream/Info static actions */ /* Play/Stream/Info static actions */
ADD_MENU_ENTRY( QIcon( ":/toolbar/play_b" ), qtr(I_POP_PLAY), ADD_MENU_ENTRY( QIcon( ":/toolbar/play_b.svg" ), qtr(I_POP_PLAY),
VLCModelSubInterface::ACTION_PLAY ) VLCModelSubInterface::ACTION_PLAY )
ADD_MENU_ENTRY( QIcon( ":/toolbar/pause_b" ), qtr("Pause"), ADD_MENU_ENTRY( QIcon( ":/toolbar/pause_b.svg" ), qtr("Pause"),
VLCModelSubInterface::ACTION_PAUSE ) VLCModelSubInterface::ACTION_PAUSE )
ADD_MENU_ENTRY( QIcon( ":/menu/stream" ), qtr(I_POP_STREAM), ADD_MENU_ENTRY( QIcon( ":/menu/stream.svg" ), qtr(I_POP_STREAM),
VLCModelSubInterface::ACTION_STREAM ) VLCModelSubInterface::ACTION_STREAM )
ADD_MENU_ENTRY( QIcon(), qtr(I_POP_SAVE), ADD_MENU_ENTRY( QIcon(), qtr(I_POP_SAVE),
VLCModelSubInterface::ACTION_SAVE ); VLCModelSubInterface::ACTION_SAVE );
ADD_MENU_ENTRY( QIcon( ":/menu/info" ), qtr(I_POP_INFO), ADD_MENU_ENTRY( QIcon( ":/menu/info.svg" ), qtr(I_POP_INFO),
VLCModelSubInterface::ACTION_INFO ); VLCModelSubInterface::ACTION_INFO );
menu.addSeparator(); menu.addSeparator();
ADD_MENU_ENTRY( QIcon( ":/type/folder-grey" ), qtr(I_POP_EXPLORE), ADD_MENU_ENTRY( QIcon( ":/type/folder-grey.svg" ), qtr(I_POP_EXPLORE),
VLCModelSubInterface::ACTION_EXPLORE ); VLCModelSubInterface::ACTION_EXPLORE );
QIcon addIcon( ":/buttons/playlist/playlist_add" ); QIcon addIcon( ":/buttons/playlist/playlist_add.svg" );
ADD_MENU_ENTRY( addIcon, qtr(I_POP_NEWFOLDER), ADD_MENU_ENTRY( addIcon, qtr(I_POP_NEWFOLDER),
VLCModelSubInterface::ACTION_CREATENODE ) VLCModelSubInterface::ACTION_CREATENODE )
...@@ -240,10 +240,10 @@ bool StandardPLPanel::popup( const QPoint &point ) ...@@ -240,10 +240,10 @@ bool StandardPLPanel::popup( const QPoint &point )
/* Item removal */ /* Item removal */
ADD_MENU_ENTRY( QIcon( ":/buttons/playlist/playlist_remove" ), qtr(I_POP_DEL), ADD_MENU_ENTRY( QIcon( ":/buttons/playlist/playlist_remove.svg" ), qtr(I_POP_DEL),
VLCModelSubInterface::ACTION_REMOVE ); VLCModelSubInterface::ACTION_REMOVE );
ADD_MENU_ENTRY( QIcon( ":/toolbar/clear" ), qtr("Clear the playlist"), ADD_MENU_ENTRY( QIcon( ":/toolbar/clear.svg" ), qtr("Clear the playlist"),
VLCModelSubInterface::ACTION_CLEAR ); VLCModelSubInterface::ACTION_CLEAR );
menu.addSeparator(); menu.addSeparator();
...@@ -558,7 +558,8 @@ bool StandardPLPanel::eventFilter ( QObject *obj, QEvent * event ) ...@@ -558,7 +558,8 @@ bool StandardPLPanel::eventFilter ( QObject *obj, QEvent * event )
{ {
QWidget *viewport = qobject_cast<QWidget *>( obj ); QWidget *viewport = qobject_cast<QWidget *>( obj );
QStylePainter painter( viewport ); QStylePainter painter( viewport );
QPixmap dropzone = ImageHelper::loadSvgToPixmap(":/dropzone", DROPZONE_SIZE, DROPZONE_SIZE);
QPixmap dropzone = ImageHelper::loadSvgToPixmap(":/dropzone.svg", DROPZONE_SIZE, DROPZONE_SIZE);
qreal scale = dropzone.devicePixelRatio(); qreal scale = dropzone.devicePixelRatio();
QRect rect = viewport->geometry(); QRect rect = viewport->geometry();
QSize size = rect.size() / 2 - dropzone.size() / (2 * scale); QSize size = rect.size() / 2 - dropzone.size() / (2 * scale);
......
...@@ -133,7 +133,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -133,7 +133,7 @@ void PlIconViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
painter->fillPath( nodeRectPath, option.palette.color( QPalette::Highlight ) ); painter->fillPath( nodeRectPath, option.palette.color( QPalette::Highlight ) );
painter->setOpacity( 1.0 ); painter->setOpacity( 1.0 );
} }
QSvgRenderer renderer( QString(":/type/node") ); QSvgRenderer renderer( QString(":/type/node.svg") );
renderer.render(painter, r); renderer.render(painter, r);
} }
...@@ -233,7 +233,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt ...@@ -233,7 +233,7 @@ void PlListViewItemDelegate::paint( QPainter * painter, const QStyleOptionViewIt
if( !index.data( VLCModel::LEAF_NODE_ROLE ).toBool() ) if( !index.data( VLCModel::LEAF_NODE_ROLE ).toBool() )
{ {
qreal pixsize = fm.height(); qreal pixsize = fm.height();
QSvgRenderer renderer( QString( ":/type/node" ) ); QSvgRenderer renderer( QString( ":/type/node.svg" ) );
renderer.render(painter, QRect( renderer.render(painter, QRect(
textRect.x(), textRect.center().y() - pixsize / 2, textRect.x(), textRect.center().y() - pixsize / 2,
pixsize, pixsize ) ); pixsize, pixsize ) );
...@@ -296,7 +296,7 @@ void CellPixmapDelegate::paint( QPainter * painter, const QStyleOptionViewItem & ...@@ -296,7 +296,7 @@ void CellPixmapDelegate::paint( QPainter * painter, const QStyleOptionViewItem &
static inline void plViewStartDrag( QAbstractItemView *view, const Qt::DropActions & supportedActions ) static inline void plViewStartDrag( QAbstractItemView *view, const Qt::DropActions & supportedActions )
{ {
QDrag *drag = new QDrag( view ); QDrag *drag = new QDrag( view );
drag->setPixmap( QPixmap( ":/noart64" ) ); drag->setPixmap( QPixmap( ":/noart64.png" ) );
drag->setMimeData( view->model()->mimeData( drag->setMimeData( view->model()->mimeData(
view->selectionModel()->selectedIndexes() ) ); view->selectionModel()->selectedIndexes() ) );
drag->exec( supportedActions ); drag->exec( supportedActions );
......
...@@ -54,13 +54,13 @@ VLCModel::VLCModel( intf_thread_t *_p_intf, QObject *parent ) ...@@ -54,13 +54,13 @@ VLCModel::VLCModel( intf_thread_t *_p_intf, QObject *parent )
/* Icons initialization */ /* Icons initialization */
#define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( x ) #define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( x )
ADD_ICON( UNKNOWN , QPixmap( type_unknown_xpm ) ); ADD_ICON( UNKNOWN , QPixmap( type_unknown_xpm ) );
ADD_ICON( FILE, ":/type/file" ); ADD_ICON( FILE, ":/type/file.svg" );
ADD_ICON( DIRECTORY, ":/type/directory" ); ADD_ICON( DIRECTORY, ":/type/directory.svg" );
ADD_ICON( DISC, ":/type/disc" ); ADD_ICON( DISC, ":/type/disc.svg" );
ADD_ICON( CARD, ":/type/capture-card" ); ADD_ICON( CARD, ":/type/capture-card.svg" );
ADD_ICON( STREAM, ":/type/stream" ); ADD_ICON( STREAM, ":/type/stream.svg" );
ADD_ICON( PLAYLIST, ":/type/playlist" ); ADD_ICON( PLAYLIST, ":/type/playlist.svg" );
ADD_ICON( NODE, ":/type/node" ); ADD_ICON( NODE, ":/type/node.svg" );
#undef ADD_ICON #undef ADD_ICON
} }
......
...@@ -175,19 +175,19 @@ void InterfacePreviewWidget::setNormalPreview( bool b_minimal ) ...@@ -175,19 +175,19 @@ void InterfacePreviewWidget::setNormalPreview( bool b_minimal )
void InterfacePreviewWidget::setPreview( enum_style e_style ) void InterfacePreviewWidget::setPreview( enum_style e_style )
{ {
QString pixmapLocationString(":/prefsmenu/"); QString pixmapLocationString;
switch( e_style ) switch( e_style )
{ {
default: default:
case COMPLETE: case COMPLETE:
pixmapLocationString += "sample_complete"; pixmapLocationString = ":/prefsmenu/sample_complete.png";
break; break;
case MINIMAL: case MINIMAL:
pixmapLocationString += "sample_minimal"; pixmapLocationString = ":/prefsmenu/sample_minimal.png";
break; break;
case SKINS: case SKINS:
pixmapLocationString += "sample_skins"; pixmapLocationString = ":/prefsmenu/sample_skins.png";
break; break;
} }
......
...@@ -194,7 +194,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -194,7 +194,7 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
#define ADD_CATEGORY( button, label, ltooltip, icon, numb ) \ #define ADD_CATEGORY( button, label, ltooltip, icon, numb ) \
QToolButton * button = new QToolButton( this ); \ QToolButton * button = new QToolButton( this ); \
button->setIcon( QIcon( ":/prefsmenu/" #icon ) ); \ button->setIcon( QIcon( ":/prefsmenu/" #icon ".png" ) ); \
button->setText( label ); \ button->setText( label ); \
button->setToolTip( ltooltip ); \ button->setToolTip( ltooltip ); \
button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \ button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon ); \
......
...@@ -57,17 +57,17 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent ) ...@@ -57,17 +57,17 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
layout->addWidget( profileBox ); layout->addWidget( profileBox );
QToolButton *editButton = new QToolButton( this ); QToolButton *editButton = new QToolButton( this );
editButton->setIcon( QIcon( ":/menu/preferences" ) ); editButton->setIcon( QIcon( ":/menu/preferences.svg" ) );
editButton->setToolTip( qtr( "Edit selected profile" ) ); editButton->setToolTip( qtr( "Edit selected profile" ) );
layout->addWidget( editButton ); layout->addWidget( editButton );
QToolButton *deleteButton = new QToolButton( this ); QToolButton *deleteButton = new QToolButton( this );
deleteButton->setIcon( QIcon( ":/toolbar/clear" ) ); deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
deleteButton->setToolTip( qtr( "Delete selected profile" ) ); deleteButton->setToolTip( qtr( "Delete selected profile" ) );
layout->addWidget( deleteButton ); layout->addWidget( deleteButton );
QToolButton *newButton = new QToolButton( this ); QToolButton *newButton = new QToolButton( this );
newButton->setIcon( QIcon( ":/new" ) ); newButton->setIcon( QIcon( ":/new.svg" ) );
newButton->setToolTip( qtr( "Create a new profile" ) ); newButton->setToolTip( qtr( "Create a new profile" ) );
layout->addWidget(newButton); layout->addWidget(newButton);
...@@ -623,14 +623,14 @@ void VLCProfileEditor::muxSelected() ...@@ -623,14 +623,14 @@ void VLCProfileEditor::muxSelected()
int textsize = QFontMetrics(ui.muxerwarning->font()).ascent(); int textsize = QFontMetrics(ui.muxerwarning->font()).ascent();
if( current->property("module").toString() == "avformat" ) if( current->property("module").toString() == "avformat" )
ui.muxerwarning->setText( ui.muxerwarning->setText(
QString( "<img src=\":/menu/info\" width=%2 height=%2/> %1" ) QString( "<img src=\":/menu/info.svg\" width=%2 height=%2/> %1" )
.arg( qtr( "This muxer is not provided directly by VLC: It could be missing." ) ) .arg( qtr( "This muxer is not provided directly by VLC: It could be missing." ) )
.arg(textsize) .arg(textsize)
); );
else if ( !caps["muxers"].contains( current->property("module").toString() ) && else if ( !caps["muxers"].contains( current->property("module").toString() ) &&
!caps["muxers"].contains( "mux_" + current->property("module").toString() ) ) !caps["muxers"].contains( "mux_" + current->property("module").toString() ) )
ui.muxerwarning->setText( ui.muxerwarning->setText(
QString( "<img src=\":/toobar/clear\" width=%2 height=%2/> %1" ) QString( "<img src=\":/toobar/clear.svg\" width=%2 height=%2/> %1" )
.arg( qtr( "This muxer is missing. Using this profile will fail" ) ) .arg( qtr( "This muxer is missing. Using this profile will fail" ) )
.arg(textsize) .arg(textsize)
); );
......
...@@ -62,7 +62,7 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf) ...@@ -62,7 +62,7 @@ GotoTimeDialog::GotoTimeDialog( intf_thread_t *_p_intf)
timeEdit->setAlignment( Qt::AlignRight ); timeEdit->setAlignment( Qt::AlignRight );
timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ); timeEdit->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
QPushButton *resetButton = new QPushButton( QIcon(":/update"), "" ); QPushButton *resetButton = new QPushButton( QIcon(":/update.svg"), "" );
resetButton->setToolTip( qtr("Reset") ); resetButton->setToolTip( qtr("Reset") );
mainLayout->addWidget( timeIntro, 0, 0, 1, 1 ); mainLayout->addWidget( timeIntro, 0, 0, 1, 1 );
......
...@@ -98,7 +98,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf) ...@@ -98,7 +98,7 @@ MessagesDialog::MessagesDialog( intf_thread_t *_p_intf)
ui.filterEdit->setText( getSettings()->value( "messages-filter" ).toString() ); ui.filterEdit->setText( getSettings()->value( "messages-filter" ).toString() );
getSettings()->endGroup(); getSettings()->endGroup();
updateButton = new QPushButton( QIcon(":/update"), "" ); updateButton = new QPushButton( QIcon(":/update.svg"), "" );
updateButton->setFlat( true ); updateButton->setFlat( true );
ui.mainTab->setCornerWidget( updateButton ); ui.mainTab->setCornerWidget( updateButton );
...@@ -330,7 +330,7 @@ void MessagesDialog::updateOrClear() ...@@ -330,7 +330,7 @@ void MessagesDialog::updateOrClear()
void MessagesDialog::tabChanged( int i ) void MessagesDialog::tabChanged( int i )
{ {
updateButton->setIcon( i != 0 ? QIcon(":/update") : QIcon(":/toolbar/clear") ); updateButton->setIcon( i != 0 ? QIcon(":/update.svg") : QIcon(":/toolbar/clear.svg") );
updateButton->setToolTip( i != 0 ? qtr("Update the tree") updateButton->setToolTip( i != 0 ? qtr("Update the tree")
: qtr("Clear the messages") ); : qtr("Clear the messages") );
} }
......
...@@ -86,14 +86,14 @@ OpenDialog::OpenDialog( QWidget *parent, ...@@ -86,14 +86,14 @@ OpenDialog::OpenDialog( QWidget *parent,
captureOpenPanel = new CaptureOpenPanel( this, p_intf ); captureOpenPanel = new CaptureOpenPanel( this, p_intf );
/* Insert the tabs */ /* Insert the tabs */
ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/file-asym" ), ui.Tab->insertTab( OPEN_FILE_TAB, fileOpenPanel, QIcon( ":/type/file-asym.svg" ),
qtr( "&File" ) ); qtr( "&File" ) );
ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc" ), ui.Tab->insertTab( OPEN_DISC_TAB, discOpenPanel, QIcon( ":/type/disc.svg" ),
qtr( "&Disc" ) ); qtr( "&Disc" ) );
ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network" ), ui.Tab->insertTab( OPEN_NETWORK_TAB, netOpenPanel, QIcon( ":/type/network.svg" ),
qtr( "&Network" ) ); qtr( "&Network" ) );
ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel, ui.Tab->insertTab( OPEN_CAPTURE_TAB, captureOpenPanel,
QIcon( ":/type/capture-card" ), qtr( "Capture &Device" ) ); QIcon( ":/type/capture-card.svg" ), qtr( "Capture &Device" ) );
/* Hide the Slave input widgets */ /* Hide the Slave input widgets */
ui.slaveLabel->hide(); ui.slaveLabel->hide();
......
...@@ -251,7 +251,7 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ ) ...@@ -251,7 +251,7 @@ ExtensionTab::ExtensionTab( intf_thread_t *p_intf_ )