From 2fe8c80aa5b5e9fe843052fdff9c533492c376f6 Mon Sep 17 00:00:00 2001 From: miruka Date: Wed, 4 Dec 2019 11:49:20 -0400 Subject: [PATCH] Enable high DPI scaling --- TODO.md | 6 ++---- src/main.cpp | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TODO.md b/TODO.md index ce91abe0..de2360dc 100644 --- a/TODO.md +++ b/TODO.md @@ -93,7 +93,7 @@ - Replies - Messages editing and redaction - Code highlighting - - Adapt shortcuts flicking speed to font size and DPI + - Adapt shortcuts flicking speed to font size - EditAccount page: - Device settings @@ -131,9 +131,7 @@ - https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#creating-a-custom-style - icons.preferredPack: accept multiple values - Find icon packs in user data dir - - Correctly implement uiScale/fontScale + ctrl+-= keys - - See `QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)` - - See [Text.fontSizeMode](https://doc.qt.io/qt-5/qml-qtquick-text.html#fontSizeMode-prop) + - See [Text.fontSizeMode](https://doc.qt.io/qt-5/qml-qtquick-text.html#fontSizeMode-prop) - Way to round avatar corners to allow box radius - If avatar is set, name color from average color? - Accent color from background diff --git a/src/main.cpp b/src/main.cpp index 9c1dbc91..4ad88e60 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,8 @@ int main(int argc, char *argv[]) { QApplication::setApplicationName("harmonyqml"); QApplication::setApplicationDisplayName("HarmonyQML"); QApplication::setApplicationVersion("0.2.3"); + QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QQmlEngine engine; QQmlContext *objectContext = new QQmlContext(engine.rootContext());