From 352e52f454fd7e099c624d07ffdc4ff38bae78ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 24 May 2023 20:58:01 +0200 Subject: [PATCH] Remove usage of Qt.platform.os --- YACReaderLibrary/grid_comics_view.cpp | 3 ++- YACReaderLibrary/qml/GridComicsView.qml | 6 +++--- YACReaderLibrary/qml/GridComicsView6.qml | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/YACReaderLibrary/grid_comics_view.cpp b/YACReaderLibrary/grid_comics_view.cpp index b971bc87..c490e775 100644 --- a/YACReaderLibrary/grid_comics_view.cpp +++ b/YACReaderLibrary/grid_comics_view.cpp @@ -44,6 +44,7 @@ GridComicsView::GridComicsView(QWidget *parent) ctxt->setContextProperty("borderColor", "#DBDBDB"); ctxt->setContextProperty("titleColor", "#121212"); ctxt->setContextProperty("textColor", "#636363"); + ctxt->setContextProperty("showDropShadow", QVariant(false)); // fonts settings ctxt->setContextProperty("fontSize", 11); ctxt->setContextProperty("fontFamily", QApplication::font().family()); @@ -76,7 +77,7 @@ GridComicsView::GridComicsView(QWidget *parent) ctxt->setContextProperty("borderColor", "#121212"); ctxt->setContextProperty("titleColor", "#FFFFFF"); ctxt->setContextProperty("textColor", "#A8A8A8"); - ctxt->setContextProperty("dropShadow", QVariant(false)); + ctxt->setContextProperty("showDropShadow", QVariant(true)); // fonts settings int fontSize = QApplication::font().pointSize(); if (fontSize == -1) diff --git a/YACReaderLibrary/qml/GridComicsView.qml b/YACReaderLibrary/qml/GridComicsView.qml index 37ffecef..b43a0288 100644 --- a/YACReaderLibrary/qml/GridComicsView.qml +++ b/YACReaderLibrary/qml/GridComicsView.qml @@ -73,7 +73,7 @@ SplitView { samples: 17 color: "#FF000000" source: realCell - visible: (Qt.platform.os === "osx") ? false : true; + visible: showDropShadow; } Rectangle { @@ -468,7 +468,7 @@ SplitView { samples: 17 color: "#FF000000" source: currentCoverElement - visible: (Qt.platform.os === "osx") ? false : true; + visible: showDropShadow; } ColumnLayout @@ -678,7 +678,7 @@ SplitView { samples: 17 color: "#AA000000" source: readButton - visible: ((Qt.platform.os === "osx") ? false : true) && !readButton.pressed + visible: showDropShadow && !readButton.pressed } } } diff --git a/YACReaderLibrary/qml/GridComicsView6.qml b/YACReaderLibrary/qml/GridComicsView6.qml index b1c2b5dc..d01a85c4 100644 --- a/YACReaderLibrary/qml/GridComicsView6.qml +++ b/YACReaderLibrary/qml/GridComicsView6.qml @@ -76,7 +76,7 @@ SplitView { //samples: 17 color: "#FF000000" source: realCell - visible: (Qt.platform.os === "osx") ? false : true; + visible: showDropShadow; } Rectangle { @@ -472,7 +472,7 @@ SplitView { //samples: 17 color: "#FF000000" source: currentCoverElement - visible: (Qt.platform.os === "osx") ? false : true; + visible: showDropShadow; } ColumnLayout @@ -686,7 +686,7 @@ SplitView { //samples: 17 color: "#AA000000" source: readButton - visible: ((Qt.platform.os === "osx") ? false : true) && !readButton.pressed + visible: showDropShadow && !readButton.pressed } } }