Convert images to use .qrc file, move images
All images have been moved to the /img/ folder in order to fully separate qml from images. The .qrc file allows qml to use the images by appending the qrc:/ prefix before the abstract path to the image. Note that the .qrc file is also check at compile time, which further enhances the confidence the lack of errors. Some of the images are not used in the QML, but instead directly passed through to the OpenVR API. These have not been added to the .qrc file.
This commit is contained in:
@@ -72,7 +72,8 @@ void AudioTabController::initStage2( OverlayController* var_parent,
|
||||
{
|
||||
QString notifIconPath = QStandardPaths::locate(
|
||||
QStandardPaths::AppDataLocation,
|
||||
QStringLiteral( "/res/qml/ptt_notification.png" ) );
|
||||
QStringLiteral(
|
||||
"/res/img/audio/microphone/ptt_notification.png" ) );
|
||||
if ( QFile::exists( notifIconPath ) )
|
||||
{
|
||||
vr::VROverlay()->SetOverlayFromFile(
|
||||
|
||||
@@ -274,7 +274,7 @@ void UtilitiesTabController::modAlarmTimeMinute( int value, bool notify )
|
||||
|
||||
QString getBatteryIconPath( int batteryState )
|
||||
{
|
||||
QString batteryPrefix = "/res/battery_";
|
||||
QString batteryPrefix = "/res/img/battery/battery_";
|
||||
return QStandardPaths::locate(
|
||||
QStandardPaths::AppDataLocation,
|
||||
batteryPrefix + QString::number( batteryState ) + ".png" );
|
||||
|
||||
Reference in New Issue
Block a user