Skip to content
Snippets Groups Projects
Commit e66d4764 authored by SeeLook's avatar SeeLook
Browse files

Fixed path under Android

parent c810d915
No related branches found
No related tags found
No related merge requests found
......@@ -204,22 +204,22 @@ void TguitarView::paintEvent(QPaintEvent* event) {
// painter.scale(-1, 1);
// }
if (m_guitar->guitarTypeId() == 1) { // No need to check for non guitar - in such a case it never goes here
QPixmap guitarPixmap = QPixmap(Tpath::img(QStringLiteral("body"))).scaled(
QPixmap guitarPixmap = QPixmap(Tpath::img("body")).scaled(
(m_parent->width() / 2) * transform().m11(), height() * 2.445714285714286, Qt::IgnoreAspectRatio);
painter.drawPixmap((m_guitar->posX12fret() + 7) * transform().m11() - horizontalScrollBar()->value(),
height() - guitarPixmap.height(), guitarPixmap);
} else {
QPixmap guitarPixmap;
if (m_guitar->guitarTypeId() == 2)
guitarPixmap = QPixmap(Tpath::img(QStringLiteral("body-electro"))).scaled(644 * ((height() * 2.9) / 614), height() * 2.9);
guitarPixmap = QPixmap(Tpath::img("body-electro")).scaled(644 * ((height() * 2.9) / 614), height() * 2.9);
else
guitarPixmap = QPixmap(Tpath::img(QStringLiteral("body-bass"))).scaled(640 * ((height() * 2.9) / 535), height() * 2.9);
guitarPixmap = QPixmap(Tpath::img("body-bass")).scaled(640 * ((height() * 2.9) / 535), height() * 2.9);
painter.drawPixmap((m_guitar->fbRect().right() - m_guitar->height() * 1.449532710280374) * transform().m11() - horizontalScrollBar()->value(),
height() - guitarPixmap.height() , guitarPixmap);
// if (!gl->GisRightHanded)
// painter.resetTransform();
qreal pickCoef = (((height() * 2.9) / 614.0) * 0.5);
QPixmap rosettePixmap = QPixmap(Tpath::img(QStringLiteral("pickup"))).scaled(291 * pickCoef, 468 * pickCoef, Qt::KeepAspectRatio);
QPixmap rosettePixmap = QPixmap(Tpath::img("pickup")).scaled(291 * pickCoef, 468 * pickCoef, Qt::KeepAspectRatio);
painter.drawPixmap(m_guitar->pickRect()->x() * transform().m11() - horizontalScrollBar()->value(),
6 * transform().m11(), rosettePixmap);
}
......
......@@ -53,7 +53,7 @@ public:
/** Returns a path to given ogg file with samples in sound resource directory */
static QString sound(const char* soundFileName, const char* ext = ".ogg") {
#if defined (Q_OS_ANDROID)
return QString("assets:/sounds/%1%2").arg(main).arg(soundFileName).arg(ext);
return QString("assets:/sounds/%1%2").arg(soundFileName).arg(ext);
#else
return QString("%1sounds/%2%3").arg(main).arg(soundFileName).arg(ext);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment