summaryrefslogtreecommitdiffstats
path: root/src/pdfquick/+Universal
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-02-15 21:51:14 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-02-22 05:07:21 +0000
commite11a60c6e50f95ad7fa467998a7c89b3dd384ce5 (patch)
tree96c689822dc2746e536cf72abda98d4223438a3c /src/pdfquick/+Universal
parent92cee86bb0defedf69b866212e8af3ab11c958ea (diff)
Make QtPdf a proper generated module
- remove plugins.qmltypes, because it's generated automatically since d32563a3365fd9432993590e6ac9817fe6f6bd41 - plugin code is also generated, so we don't need plugin-related CMake commands - QtQuick is a dependency; auto means forward the import version to the dependency. - QtQuick.Controls is only needed in bundled qml files, and we expect tooling to find it from import statements. It's not declared as a cmake dependency because we don't use it from C++. - move qml files into the source directory so that the implicit import matches the module directory - move style-specific PdfStyle.qml files into directories beginning with capital letters, since we are moving them anyway, and the styles now have capitalized names Change-Id: If517ce30d0e22fb0354272cd2002841fd2783cfc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/pdfquick/+Universal')
-rw-r--r--src/pdfquick/+Universal/PdfStyle.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/pdfquick/+Universal/PdfStyle.qml b/src/pdfquick/+Universal/PdfStyle.qml
new file mode 100644
index 000000000..3c322359a
--- /dev/null
+++ b/src/pdfquick/+Universal/PdfStyle.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtPDF module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import QtQml 2.14
+import QtQuick 2.14
+import QtQuick.Controls 2.14
+import QtQuick.Controls.Universal 2.14
+import QtQuick.Shapes 1.14
+
+QtObject {
+ property Control prototypeControl: Control { }
+ function withAlpha(color, alpha) {
+ return Qt.hsla(color.hslHue, color.hslSaturation, color.hslLightness, alpha)
+ }
+ property color selectionColor: withAlpha(prototypeControl.palette.highlight, 0.5)
+ property color pageSearchResultsColor: withAlpha(Qt.lighter(Universal.accent, 1.5), 0.5)
+ property color currentSearchResultStrokeColor: Universal.accent
+ property real currentSearchResultStrokeWidth: 2
+ property color linkUnderscoreColor: prototypeControl.palette.link
+ property real linkUnderscoreStrokeWidth: 1
+ property var linkUnderscoreStrokeStyle: ShapePath.DashLine
+ property var linkUnderscoreDashPattern: [ 1, 4 ]
+}