Skip to content

Commit

Permalink
BB10: A small fix for BlackBerry 10.3
Browse files Browse the repository at this point in the history
In BlackBerry 10.3 title in white theme is not branded anymore so title
text is badly visible (white text on light background).
  • Loading branch information
leppa committed Oct 7, 2014
1 parent c5712d0 commit b73c749
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qml/bb10/MainPage.qml
Expand Up @@ -37,7 +37,7 @@ Page {
Label {
text: translator.selectedService.name
textStyle {
color: Color.White
color: osVersion < 0x0A0300 ? Color.White : undefined
base: SystemDefaults.TextStyles.TitleText
}
verticalAlignment: VerticalAlignment.Center
Expand Down
9 changes: 9 additions & 0 deletions src/main.cpp
Expand Up @@ -47,6 +47,7 @@
# include <bb/cascades/AbstractPane>
# include <bb/cascades/Container>
# include <bb/cascades/SceneCover>
# include <bb/platform/PlatformInfo>
# include <bb/system/SystemToast>
using namespace bb::cascades;
#elif defined(Q_OS_SYMBIAN)
Expand Down Expand Up @@ -142,6 +143,14 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
TranslationInterface *translator = new TranslationInterface(app.data());
QmlDocument *qml = QmlDocument::create(QLatin1String("asset:///main.qml"))
.property("translator", translator).parent(app.data());

const QStringList v = bb::platform::PlatformInfo().osVersion().split(".");
const int ver = v.count() >= 3 ? (v.at(0).toInt() << 16)
+ (v.at(1).toInt() << 8)
+ v.at(2).toInt()
: 0;
qml->documentContext()->setContextProperty("osVersion", ver);

#elif defined(MEEGO_EDITION_HARMATTAN)
QDir dir(app->applicationDirPath());
dir.cdUp();
Expand Down
2 changes: 1 addition & 1 deletion taot.pro
Expand Up @@ -88,7 +88,7 @@ blackberry {
src/bb10/clipboard.cpp \
src/bb10/repeater.cpp

LIBS += -lbbsystem
LIBS += -lbbplatform -lbbsystem
} else {
HEADERS += \
src/dictionarymodel.h \
Expand Down

0 comments on commit b73c749

Please sign in to comment.