qtpass: Fix huge icons and spacing

This commit is contained in:
adisbladis 2018-01-05 16:11:12 +08:00
parent 028068a274
commit 1e6a48e296
No known key found for this signature in database
GPG Key ID: ED58F95069B004F5
2 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "0pp38b3fifkfwqcb6vi194ccgb8j3zc8j8jq8ww5ib0wvhldzsg8";
};
patches = [ ./hidpi.patch ];
buildInputs = [ git gnupg pass qtbase qtsvg qttools ];
nativeBuildInputs = [ makeWrapper qmake ];

View File

@ -0,0 +1,13 @@
diff --git a/main/main.cpp b/main/main.cpp
index 8a18409c..1cddd911 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -35,7 +35,7 @@
* @return
*/
int main(int argc, char *argv[]) {
- qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QString text = "";
for (int i = 1; i < argc; ++i) {
if (i > 1)