diff --git a/TODO b/TODO index 4281b433cb2a62e39becb0b612c95559e9b447b2..fe5061facf6a5f34d769bf68c4ef165107df5654 100644 --- a/TODO +++ b/TODO @@ -11,6 +11,8 @@ ================ TODO LIST ====================== ============================================================================ Translations: + - All uses of QApplication::translate("QtClass", "text") change int QtClass::tr("text") - + this way no Qt translations go into Nootka ts - remove <br> from some status strings (rangesettings.cpp, accidsettings.cpp) ANDROID: diff --git a/changes b/changes index 0d931557bb9c37c78b2a38927e1013d0f7161191..248cdf605e74d49be1ff6ddffa3a70a974ed5e91 100644 --- a/changes +++ b/changes @@ -1,7 +1,7 @@ 1.3.0 alpha - added touch interface, adjusted GUI layout to it ANDROID - - file and color dialogues adjusted for touch screens + - new file and color dialogues adjusted for touch screens - corner menu button and menu similar to Android native - new layout of dialog windows for better touch integration - audio stack ported to Qt Audio for mobile devices diff --git a/src/exam/tcanvas.cpp b/src/exam/tcanvas.cpp index fd6bcf69e6862cc45bf2b98ec4e0fedf8fb6f838..bb29f232bedc150769c3ee8fee7681e939e0ba64 100644 --- a/src/exam/tcanvas.cpp +++ b/src/exam/tcanvas.cpp @@ -65,6 +65,14 @@ QFont smalTipFont(QWidget* w) { #endif +ThackedTouchTip::ThackedTouchTip(const QString& text, QColor bgColor) : + TgraphicsTextTip(text, bgColor) +{ + setBaseColor(qApp->palette().text().color()); + setDefaultTextColor(qApp->palette().base().color()); +} + + Tcanvas::Tcanvas(QGraphicsView* view, Texam* exam, MainWindow* parent) : QObject(parent->centralWidget()), m_window(parent), @@ -696,7 +704,7 @@ void Tcanvas::setPosOfTip(TgraphicsTextTip* tip) { void Tcanvas::setResultPos() { - m_resultTip->setPos(m_scene->width() * 0.52 + (m_scene->width() * 0.48 - m_resultTip->realW()) / 2, m_scene->height() * 0.01); + m_resultTip->setPos(m_scene->width() * 0.52 + (m_scene->width() * 0.48 - m_resultTip->realW()) / 2, m_scene->height() * 0.05); } @@ -710,12 +718,21 @@ void Tcanvas::setTryAgainPos() { void Tcanvas::setWhatNextPos() { #if defined (Q_OS_ANDROID) + qreal sc = (m_view->height() / 8.0) / m_nextTip->realH(); + if (sc > 1.0) + m_nextTip->setScale(sc); qreal hh = m_view->height() * 0.75; // place tips above guitar, even it is hidden or doesn't exist m_nextTip->setPos(m_window->width() - m_nextTip->realW() - 4, hh - m_nextTip->realH()); - if (m_prevTip) + if (m_prevTip) { + if (sc > 1.0) + m_prevTip->setScale(sc); m_prevTip->setPos(4, hh - m_prevTip->realH()); - if (m_correctTip) + } + if (m_correctTip) { + if (sc > 1.0) + m_correctTip->setScale(sc); m_correctTip->setPos(m_window->width() - m_correctTip->realW() - 4, m_nextTip->y() - m_correctTip->realH() - 8); + } #else int maxTipHeight = getMaxTipHeight(); if (!m_nameFree && m_whatTip->realH() != maxTipHeight) @@ -743,6 +760,9 @@ void Tcanvas::setStartTipPos() { void Tcanvas::setConfirmPos() { // right top corner #if defined (Q_OS_ANDROID) + qreal sc = (m_view->height() / 8.0) / m_confirmTip->realH(); + if (sc > 1.0) + m_confirmTip->setScale(sc); m_confirmTip->setPos(m_window->width() - m_confirmTip->realW() - 4, 4); // 4 is more-less tip shadow size #else m_confirmTip->setPos(m_window->width() - m_confirmTip->realW() - 20, 20); diff --git a/src/exam/tcanvas.h b/src/exam/tcanvas.h index 3aeff1f08c18158db659c5386fa52048fa73c072..85ba588924f5a18ee8680a04523fae7dbf241395 100644 --- a/src/exam/tcanvas.h +++ b/src/exam/tcanvas.h @@ -51,7 +51,7 @@ class ThackedTouchTip : public TgraphicsTextTip { Q_OBJECT public: - ThackedTouchTip(const QString& text, QColor bgColor = -1) : TgraphicsTextTip(text, bgColor) {} + ThackedTouchTip(const QString& text, QColor bgColor = -1); protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent*) {