diff --git a/src/controls/Theme.qml b/src/controls/Theme.qml index 5eafea7e..8212e7af 100644 --- a/src/controls/Theme.qml +++ b/src/controls/Theme.qml @@ -1,110 +1,116 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.4 pragma Singleton /** * A set of named colors for the application * * Since frameworks 5.38 Kirigami.Theme has been made an attached * property - the recommended way to interact with the Kirigami.Theme * object is documented in its replacement found at * Kirigami::PlatformTheme. * * Attempting to access the depreciated colors declared here will * generate warnings. Use the attached properties color sets instead. * For example, instead of using: * * @code * color: Kirigami.Theme.buttonTextColor * @endcode * * Use the button color set instead: * * @code * Kirigami.Theme.colorSet: Kirigami.Theme.Button * color: Kirigami.Theme.textColor * @endcode * * For more color sets, see Kirigami::PlatformTheme::ColorSet. * @inherit QtQuick.QtObject */ QtObject { id: theme property color textColor: "#31363b" property color disabledTextColor: "#9931363b" property color highlightColor: "#2196F3" property color highlightedTextColor: "#eff0fa" property color backgroundColor: "#eff0f1" property color alternateBackgroundColor: "#bdc3c7" + property color activeTextColor: "#0176D3" + property color activeBackgroundColor: "#0176D3" property color linkColor: "#2196F3" + property color linkBackgroundColor: "#2196F3" property color visitedLinkColor: "#2196F3" - + property color visitedLinkBackgroundColor: "#2196F3" property color negativeTextColor: "#DA4453" + property color negativeBackgroundColor: "#DA4453" property color neutralTextColor: "#F67400" + property color neutralBackgroundColor: "#F67400" property color positiveTextColor: "#27AE60" + property color positiveBackgroundColor: "#27AE60" property color buttonTextColor: "#31363b" property color buttonBackgroundColor: "#eff0f1" property color buttonAlternateBackgroundColor: "#bdc3c7" property color buttonHoverColor: "#2196F3" property color buttonFocusColor: "#2196F3" property color viewTextColor: "#31363b" property color viewBackgroundColor: "#fcfcfc" property color viewAlternateBackgroundColor: "#eff0f1" property color viewHoverColor: "#2196F3" property color viewFocusColor: "#2196F3" property color selectionTextColor: "#eff0fa" property color selectionBackgroundColor: "#2196F3" property color selectionAlternateBackgroundColor: "#1d99f3" property color selectionHoverColor: "#2196F3" property color selectionFocusColor: "#2196F3" property color tooltipTextColor: "#eff0f1" property color tooltipBackgroundColor: "#31363b" property color tooltipAlternateBackgroundColor: "#4d4d4d" property color tooltipHoverColor: "#2196F3" property color tooltipFocusColor: "#2196F3" property color complementaryTextColor: "#eff0f1" property color complementaryBackgroundColor: "#31363b" property color complementaryAlternateBackgroundColor: "#3b4045" property color complementaryHoverColor: "#2196F3" property color complementaryFocusColor: "#2196F3" property font defaultFont: fontMetrics.font property list children: [ TextMetrics { id: fontMetrics } ] function __propagateColorSet(object, context) {} function __propagateTextColor(object, color) {} function __propagateBackgroundColor(object, color) {} function __propagatePrimaryColor(object, color) {} function __propagateAccentColor(object, color) {} } diff --git a/src/controls/plugins.qmltypes b/src/controls/plugins.qmltypes index d111c86f..096c3167 100644 --- a/src/controls/plugins.qmltypes +++ b/src/controls/plugins.qmltypes @@ -1,2078 +1,2090 @@ import QtQuick.tooling 1.2 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. // // This file was auto-generated by: // 'qmlplugindump -noinstantiate -notrelocatable org.kde.kirigami 2.5 /opt/kde5/qml' Module { dependencies: [ "QtGraphicalEffects 1.0", "QtQml 2.1", "QtQml.Models 2.2", "QtQuick 2.9", "QtQuick.Controls 2.4", "QtQuick.Controls.Fusion 2.4", "QtQuick.Controls.Fusion.impl 2.4", "QtQuick.Controls.Imagine 2.4", "QtQuick.Controls.Imagine.impl 2.4", "QtQuick.Controls.Material 2.4", "QtQuick.Controls.Material.impl 2.4", "QtQuick.Controls.Styles 1.4", "QtQuick.Controls.Styles.Plasma 2.0", "QtQuick.Controls.Universal 2.4", "QtQuick.Controls.Universal.impl 2.4", "QtQuick.Controls.impl 2.4", "QtQuick.Extras 1.4", "QtQuick.Layouts 1.2", "QtQuick.Templates 2.4", "QtQuick.Window 2.3", "org.kde.kconfig 1.0", "org.kde.kquickcontrolsaddons 2.0", "org.kde.plasma.components 2.0", "org.kde.plasma.core 2.0", "org.kde.plasma.extras 2.0" ] Component { name: "ApplicationHeaderStyle" prototype: "QObject" exports: ["org.kde.kirigami/ApplicationHeaderStyle 2.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Status" values: { "Auto": 0, "Breadcrumb": 1, "Titles": 2, "TabBar": 3, "ToolBar": 4, "None": 5 } } } Component { name: "DelegateRecycler" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.kirigami/DelegateRecycler 2.4"] exportMetaObjectRevisions: [0] Property { name: "sourceComponent"; type: "QQmlComponent"; isPointer: true } } Component { name: "DesktopIcon" defaultProperty: "data" prototype: "QQuickItem" exports: ["org.kde.kirigami/Icon 2.0"] exportMetaObjectRevisions: [0] Property { name: "source"; type: "QVariant" } Property { name: "smooth"; type: "bool" } Property { name: "implicitWidth"; type: "int"; isReadonly: true } Property { name: "implicitHeight"; type: "int"; isReadonly: true } Property { name: "enabled"; type: "bool" } Property { name: "active"; type: "bool" } Property { name: "valid"; type: "bool"; isReadonly: true } Property { name: "selected"; type: "bool" } Property { name: "isMask"; type: "bool" } Property { name: "color"; type: "QColor" } } Component { name: "FormLayoutAttached" prototype: "QObject" exports: ["org.kde.kirigami/FormData 2.3"] isCreatable: false exportMetaObjectRevisions: [0] Property { name: "label"; type: "string" } Property { name: "isSection"; type: "bool" } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "enabled"; type: "bool" } Property { name: "buddyFor"; type: "QQuickItem"; isPointer: true } } Component { name: "Kirigami::PlatformTheme" prototype: "QObject" exports: ["org.kde.kirigami/Theme 2.2"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "ColorSet" values: { "View": 0, "Window": 1, "Button": 2, "Selection": 3, "Tooltip": 4, "Complementary": 5 } } Enum { name: "ColorGroup" values: { "Disabled": 1, "Active": 0, "Inactive": 2, "Normal": 0 } } Property { name: "colorSet"; type: "ColorSet" } Property { name: "colorGroup"; type: "ColorGroup" } Property { name: "inherit"; type: "bool" } Property { name: "textColor"; type: "QColor" } Property { name: "disabledTextColor"; type: "QColor" } Property { name: "highlightedTextColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } Property { name: "linkColor"; type: "QColor" } Property { name: "visitedLinkColor"; type: "QColor" } Property { name: "negativeTextColor"; type: "QColor" } Property { name: "neutralTextColor"; type: "QColor" } Property { name: "positiveTextColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "highlightColor"; type: "QColor" } + Property { name: "activeBackgroundColor"; type: "QColor" } + Property { name: "linkBackgroundColor"; type: "QColor" } + Property { name: "visitedLinkBackgroundColor"; type: "QColor" } + Property { name: "negativeBackgroundColor"; type: "QColor" } + Property { name: "neutralBackgroundColor"; type: "QColor" } + Property { name: "positiveBackgroundColor"; type: "QColor" } Property { name: "focusColor"; type: "QColor" } Property { name: "hoverColor"; type: "QColor" } Property { name: "defaultFont"; type: "QFont"; isReadonly: true } Property { name: "palette"; type: "QPalette"; isReadonly: true } Signal { name: "colorsChanged" } Signal { name: "defaultFontChanged" Parameter { name: "font"; type: "QFont" } } Signal { name: "colorSetChanged" Parameter { name: "colorSet"; type: "Kirigami::PlatformTheme::ColorSet" } } Signal { name: "colorGroupChanged" Parameter { name: "colorGroup"; type: "Kirigami::PlatformTheme::ColorGroup" } } Signal { name: "paletteChanged" Parameter { name: "pal"; type: "QPalette" } } Signal { name: "inheritChanged" Parameter { name: "inherit"; type: "bool" } } Method { name: "iconFromTheme" type: "QIcon" Parameter { name: "name"; type: "string" } Parameter { name: "customColor"; type: "QColor" } } Method { name: "iconFromTheme" type: "QIcon" Parameter { name: "name"; type: "string" } } } Component { name: "MessageType" prototype: "QObject" exports: ["org.kde.kirigami/MessageType 2.4"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "Type" values: { "Information": 0, "Positive": 1, "Warning": 2, "Error": 3 } } } Component { name: "MnemonicAttached" prototype: "QObject" exports: ["org.kde.kirigami/MnemonicData 2.3"] isCreatable: false exportMetaObjectRevisions: [0] Enum { name: "ControlType" values: { "ActionElement": 0, "DialogButton": 1, "MenuItem": 2, "FormLabel": 3, "SecondaryControl": 4 } } Property { name: "label"; type: "string" } Property { name: "richTextLabel"; type: "string"; isReadonly: true } Property { name: "mnemonicLabel"; type: "string"; isReadonly: true } Property { name: "enabled"; type: "bool" } Property { name: "controlType"; type: "MnemonicAttached::ControlType" } Property { name: "sequence"; type: "QKeySequence"; isReadonly: true } } Component { name: "ScenePositionAttached" prototype: "QObject" exports: ["org.kde.kirigami/ScenePosition 2.5"] isCreatable: false exportMetaObjectRevisions: [0] Property { name: "x"; type: "int"; isReadonly: true } Property { name: "y"; type: "int"; isReadonly: true } } Component { name: "Settings" prototype: "QObject" exports: ["org.kde.kirigami/Settings 2.0"] isCreatable: false isSingleton: true exportMetaObjectRevisions: [0] Property { name: "tabletModeAvailable"; type: "bool"; isReadonly: true } Property { name: "isMobile"; type: "bool"; isReadonly: true } Property { name: "tabletMode"; type: "bool"; isReadonly: true } Property { name: "style"; type: "string"; isReadonly: true } Property { name: "mouseWheelScrollLines"; type: "int"; isReadonly: true } } Component { prototype: "QQuickItem" name: "org.kde.kirigami/AbstractApplicationHeader 2.0" exports: ["org.kde.kirigami/AbstractApplicationHeader 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentItem" Property { name: "minimumHeight"; type: "int" } Property { name: "preferredHeight"; type: "int" } Property { name: "maximumHeight"; type: "int" } Property { name: "pageRow"; type: "PageRow_QMLTYPE_5"; isPointer: true } Property { name: "page"; type: "Page_QMLTYPE_14"; isPointer: true } Property { name: "paintedHeight"; type: "int"; isReadonly: true } Property { name: "leftPadding"; type: "int" } Property { name: "topPadding"; type: "int" } Property { name: "rightPadding"; type: "int" } Property { name: "bottomPadding"; type: "int" } Property { name: "separatorVisible"; type: "bool" } Property { name: "__appWindow"; type: "QObject"; isPointer: true } Property { name: "background"; type: "QQuickItem"; isPointer: true } Property { name: "contentItem"; type: "QObject"; isList: true; isReadonly: true } } Component { prototype: "QQuickItem" name: "org.kde.kirigami/AbstractApplicationItem 2.1" exports: ["org.kde.kirigami/AbstractApplicationItem 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "__data" Property { name: "pageStack"; type: "QQuickItem"; isPointer: true } Property { name: "activeFocusItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "header"; type: "QQuickItem"; isPointer: true } Property { name: "footer"; type: "QQuickItem"; isPointer: true } Property { name: "controlsVisible"; type: "bool" } Property { name: "globalDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "wideScreen"; type: "bool" } Property { name: "contextDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "reachableMode"; type: "bool" } Property { name: "reachableModeEnabled"; type: "bool" } Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "overlay"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "__data"; type: "QObject"; isList: true; isReadonly: true } Method { name: "showPassiveNotification" type: "QVariant" Parameter { name: "message"; type: "QVariant" } Parameter { name: "timeout"; type: "QVariant" } Parameter { name: "actionText"; type: "QVariant" } Parameter { name: "callBack"; type: "QVariant" } } Method { name: "hidePassiveNotification"; type: "QVariant" } Method { name: "applicationWindow"; type: "QVariant" } } Component { prototype: "QQuickApplicationWindow" name: "org.kde.kirigami/AbstractApplicationWindow 2.0" exports: ["org.kde.kirigami/AbstractApplicationWindow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" Property { name: "pageStack"; type: "QQuickItem"; isPointer: true } Property { name: "controlsVisible"; type: "bool" } Property { name: "globalDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "wideScreen"; type: "bool" } Property { name: "contextDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "reachableMode"; type: "bool" } Property { name: "reachableModeEnabled"; type: "bool" } Method { name: "showPassiveNotification" type: "QVariant" Parameter { name: "message"; type: "QVariant" } Parameter { name: "timeout"; type: "QVariant" } Parameter { name: "actionText"; type: "QVariant" } Parameter { name: "callBack"; type: "QVariant" } } Method { name: "hidePassiveNotification"; type: "QVariant" } Method { name: "applicationWindow"; type: "QVariant" } } Component { prototype: "QQuickAbstractButton" name: "QtQuick.Controls/AbstractButton 2.0" exports: ["QtQuick.Controls/AbstractButton 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/AbstractCard 2.4" exports: ["org.kde.kirigami/AbstractCard 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" Property { name: "header"; type: "QQuickItem"; isPointer: true } Property { name: "headerOrientation"; type: "int" } Property { name: "footer"; type: "QQuickItem"; isPointer: true } Property { name: "showClickFeedback"; type: "bool" } } Component { prototype: "QQuickControl" name: "org.kde.kirigami/AbstractItemViewHeader 2.1" exports: ["org.kde.kirigami/AbstractItemViewHeader 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" Property { name: "minimumHeight"; type: "int" } Property { name: "maximumHeight"; type: "int" } Property { name: "view"; type: "QQuickListView"; isPointer: true } } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/AbstractListItem 2.0" exports: ["org.kde.kirigami/AbstractListItem 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "_default" Property { name: "supportsMouseEvents"; type: "bool" } Property { name: "sectionDelegate"; type: "bool" } Property { name: "separatorVisible"; type: "bool" } Property { name: "textColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } Property { name: "activeBackgroundColor"; type: "QColor" } Property { name: "containsMouse"; type: "bool"; isReadonly: true } Property { name: "_default"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QObject" name: "org.kde.kirigami/Action 2.0" exports: ["org.kde.kirigami/Action 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "children" Property { name: "visible"; type: "bool" } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "enabled"; type: "bool" } Property { name: "icon"; type: "ActionIconGroup_QMLTYPE_52"; isPointer: true } Property { name: "text"; type: "string" } Property { name: "tooltip"; type: "string" } Property { name: "__children"; type: "QObject"; isList: true; isReadonly: true } Property { name: "__shortcut"; type: "QQuickShortcut"; isPointer: true } Property { name: "iconName"; type: "string" } Property { name: "iconSource"; type: "string" } Property { name: "shortcut"; type: "QVariant" } Property { name: "children"; type: "QObject"; isList: true; isReadonly: true } Signal { name: "toggled" Parameter { name: "checked"; type: "bool" } } Signal { name: "triggered" Parameter { name: "source"; type: "QObject"; isPointer: true } } Method { name: "trigger" type: "QVariant" Parameter { name: "source"; type: "QVariant" } } } Component { prototype: "QQuickAction" name: "QtQuick.Controls/Action 2.3" exports: ["QtQuick.Controls/Action 2.3"] exportMetaObjectRevisions: [3] isComposite: true } Component { prototype: "QQuickActionGroup" name: "QtQuick.Controls/ActionGroup 2.3" exports: ["QtQuick.Controls/ActionGroup 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "actions" } Component { prototype: "QQuickItem" name: "org.kde.kirigami/ActionToolBar 2.5" exports: ["org.kde.kirigami/ActionToolBar 2.5"] exportMetaObjectRevisions: [5] isComposite: true defaultProperty: "data" Property { name: "actions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "hiddenActions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "flat"; type: "bool" } } Component { prototype: "QQuickItem" name: "org.kde.kirigami/ApplicationHeader 2.0" exports: ["org.kde.kirigami/ApplicationHeader 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentItem" Property { name: "headerStyle"; type: "int" } Property { name: "backButtonEnabled"; type: "bool" } Property { name: "pageDelegate"; type: "QQmlComponent"; isPointer: true } Property { name: "minimumHeight"; type: "int" } Property { name: "preferredHeight"; type: "int" } Property { name: "maximumHeight"; type: "int" } Property { name: "pageRow"; type: "PageRow_QMLTYPE_5"; isPointer: true } Property { name: "page"; type: "Page_QMLTYPE_14"; isPointer: true } Property { name: "paintedHeight"; type: "int"; isReadonly: true } Property { name: "leftPadding"; type: "int" } Property { name: "topPadding"; type: "int" } Property { name: "rightPadding"; type: "int" } Property { name: "bottomPadding"; type: "int" } Property { name: "separatorVisible"; type: "bool" } Property { name: "__appWindow"; type: "QObject"; isPointer: true } Property { name: "background"; type: "QQuickItem"; isPointer: true } Property { name: "contentItem"; type: "QObject"; isList: true; isReadonly: true } } Component { prototype: "QQuickItem" name: "org.kde.kirigami/ApplicationItem 2.1" exports: ["org.kde.kirigami/ApplicationItem 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "__data" Property { name: "pageStack"; type: "PageRow_QMLTYPE_5"; isReadonly: true; isPointer: true } Property { name: "activeFocusItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "header"; type: "QQuickItem"; isPointer: true } Property { name: "footer"; type: "QQuickItem"; isPointer: true } Property { name: "controlsVisible"; type: "bool" } Property { name: "globalDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "wideScreen"; type: "bool" } Property { name: "contextDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "reachableMode"; type: "bool" } Property { name: "reachableModeEnabled"; type: "bool" } Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "overlay"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "__data"; type: "QObject"; isList: true; isReadonly: true } Method { name: "showPassiveNotification" type: "QVariant" Parameter { name: "message"; type: "QVariant" } Parameter { name: "timeout"; type: "QVariant" } Parameter { name: "actionText"; type: "QVariant" } Parameter { name: "callBack"; type: "QVariant" } } Method { name: "hidePassiveNotification"; type: "QVariant" } Method { name: "applicationWindow"; type: "QVariant" } } Component { prototype: "QQuickApplicationWindow" name: "QtQuick.Controls/ApplicationWindow 2.0" exports: ["QtQuick.Controls/ApplicationWindow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickApplicationWindow" name: "org.kde.kirigami/ApplicationWindow 2.0" exports: ["org.kde.kirigami/ApplicationWindow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" Property { name: "pageStack"; type: "PageRow_QMLTYPE_5"; isReadonly: true; isPointer: true } Property { name: "controlsVisible"; type: "bool" } Property { name: "globalDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "wideScreen"; type: "bool" } Property { name: "contextDrawer"; type: "OverlayDrawer_QMLTYPE_23"; isPointer: true } Property { name: "reachableMode"; type: "bool" } Property { name: "reachableModeEnabled"; type: "bool" } Method { name: "showPassiveNotification" type: "QVariant" Parameter { name: "message"; type: "QVariant" } Parameter { name: "timeout"; type: "QVariant" } Parameter { name: "actionText"; type: "QVariant" } Parameter { name: "callBack"; type: "QVariant" } } Method { name: "hidePassiveNotification"; type: "QVariant" } Method { name: "applicationWindow"; type: "QVariant" } } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/BasicListItem 2.0" exports: ["org.kde.kirigami/BasicListItem 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "_basicDefault" Property { name: "icon"; type: "QVariant" } Property { name: "label"; type: "string" } Property { name: "reserveSpaceForIcon"; type: "bool" } Property { name: "_basicDefault"; type: "QQuickItem"; isList: true; isReadonly: true } Property { name: "supportsMouseEvents"; type: "bool" } Property { name: "sectionDelegate"; type: "bool" } Property { name: "separatorVisible"; type: "bool" } Property { name: "textColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } Property { name: "activeBackgroundColor"; type: "QColor" } Property { name: "containsMouse"; type: "bool"; isReadonly: true } Property { name: "_default"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/ListSectionHeader 2.10" exports: ["org.kde.kirigami/ListSectionHeader 2.10"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "_contents" Property { name: "label"; type: "string" } Property { name: "_contents"; type: "QQuickItem"; isList: true; isReadonly: true } Property { name: "supportsMouseEvents"; type: "bool" } Property { name: "sectionDelegate"; type: "bool" } Property { name: "separatorVisible"; type: "bool" } Property { name: "textColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } Property { name: "activeBackgroundColor"; type: "QColor" } Property { name: "containsMouse"; type: "bool"; isReadonly: true } Property { name: "_default"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Material.impl/BoxShadow 2.0" exports: ["QtQuick.Controls.Material.impl/BoxShadow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "offsetX"; type: "int" } Property { name: "offsetY"; type: "int" } Property { name: "blurRadius"; type: "int" } Property { name: "spreadRadius"; type: "int" } Property { name: "source"; type: "QQuickItem"; isPointer: true } Property { name: "fullWidth"; type: "bool" } Property { name: "fullHeight"; type: "bool" } Property { name: "glowRadius"; type: "double" } Property { name: "spread"; type: "double" } Property { name: "color"; type: "QColor" } Property { name: "cornerRadius"; type: "double" } Property { name: "cached"; type: "bool" } } Component { prototype: "QQuickBusyIndicator" name: "QtQuick.Controls/BusyIndicator 2.0" exports: ["QtQuick.Controls/BusyIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickButton" name: "QtQuick.Controls/Button 2.0" exports: ["QtQuick.Controls/Button 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickButtonGroup" name: "QtQuick.Controls/ButtonGroup 2.0" exports: ["QtQuick.Controls/ButtonGroup 2.0"] exportMetaObjectRevisions: [0] isComposite: true } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/ButtonPanel 2.3" exports: ["QtQuick.Controls.Fusion.impl/ButtonPanel 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "highlighted"; type: "bool" } } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/Card 2.4" exports: ["org.kde.kirigami/Card 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" Property { name: "actions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "hiddenActions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "banner"; type: "BannerImage_QMLTYPE_85"; isReadonly: true; isPointer: true } Property { name: "header"; type: "QQuickItem"; isPointer: true } Property { name: "headerOrientation"; type: "int" } Property { name: "footer"; type: "QQuickItem"; isPointer: true } Property { name: "showClickFeedback"; type: "bool" } } Component { prototype: "QQuickGridView" name: "org.kde.kirigami/CardsGridView 2.4" exports: ["org.kde.kirigami/CardsGridView 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "delegate" Property { name: "columns"; type: "int"; isReadonly: true } Property { name: "maximumColumns"; type: "int" } Property { name: "maximumColumnWidth"; type: "int" } Property { name: "minimumColumnWidth"; type: "int" } Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } Property { name: "_delegateComponent"; type: "QQmlComponent"; isPointer: true } } Component { prototype: "QQuickGridLayout" name: "org.kde.kirigami/CardsLayout 2.4" exports: ["org.kde.kirigami/CardsLayout 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" Property { name: "maximumColumns"; type: "int" } Property { name: "maximumColumnWidth"; type: "int" } Property { name: "minimumColumnWidth"; type: "int" } } Component { prototype: "QQuickListView" name: "org.kde.kirigami/CardsListView 2.4" exports: ["org.kde.kirigami/CardsListView 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } Property { name: "_delegateComponent"; type: "QQmlComponent"; isPointer: true } } Component { prototype: "QQuickCheckBox" name: "QtQuick.Controls/CheckBox 2.0" exports: ["QtQuick.Controls/CheckBox 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickCheckDelegate" name: "QtQuick.Controls/CheckDelegate 2.0" exports: ["QtQuick.Controls/CheckDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Material.impl/CheckIndicator 2.0" exports: ["QtQuick.Controls.Material.impl/CheckIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "checkState"; type: "int" } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/CheckIndicator 2.3" exports: ["QtQuick.Controls.Fusion.impl/CheckIndicator 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "pressedColor"; type: "QColor"; isReadonly: true } Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Universal.impl/CheckIndicator 2.0" exports: ["QtQuick.Controls.Universal.impl/CheckIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "partiallyChecked"; type: "bool"; isReadonly: true } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras.Private/CircularButton 1.0" exports: ["QtQuick.Extras.Private/CircularButton 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } Property { name: "menu"; type: "Menu_QMLTYPE_126"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } Property { name: "action"; type: "QQuickAction1"; isPointer: true } Property { name: "activeFocusOnPress"; type: "bool" } Property { name: "text"; type: "string" } Property { name: "tooltip"; type: "string" } Property { name: "iconSource"; type: "QUrl" } Property { name: "iconName"; type: "string" } Property { name: "__position"; type: "string" } Property { name: "__iconOverriden"; type: "bool"; isReadonly: true } Property { name: "__action"; type: "QQuickAction1"; isPointer: true } Property { name: "__iconAction"; type: "QQuickAction1"; isReadonly: true; isPointer: true } Property { name: "__behavior"; type: "QVariant" } Property { name: "__effectivePressed"; type: "bool" } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "hovered"; type: "bool"; isReadonly: true } Signal { name: "clicked" } Method { name: "accessiblePressAction"; type: "QVariant" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QObject" name: "QtQuick.Extras.Private/CircularButtonStyleHelper 1.0" exports: ["QtQuick.Extras.Private/CircularButtonStyleHelper 1.0"] exportMetaObjectRevisions: [0] isComposite: true Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "buttonColorUpTop"; type: "QColor" } Property { name: "buttonColorUpBottom"; type: "QColor" } Property { name: "buttonColorDownTop"; type: "QColor" } Property { name: "buttonColorDownBottom"; type: "QColor" } Property { name: "outerArcColorTop"; type: "QColor" } Property { name: "outerArcColorBottom"; type: "QColor" } Property { name: "innerArcColorTop"; type: "QColor" } Property { name: "innerArcColorBottom"; type: "QColor" } Property { name: "innerArcColorBottomStop"; type: "double" } Property { name: "shineColor"; type: "QColor" } Property { name: "smallestAxis"; type: "double" } Property { name: "outerArcLineWidth"; type: "double" } Property { name: "innerArcLineWidth"; type: "double" } Property { name: "shineArcLineWidth"; type: "double" } Property { name: "implicitWidth"; type: "double" } Property { name: "implicitHeight"; type: "double" } Property { name: "textColorUp"; type: "QColor" } Property { name: "textColorDown"; type: "QColor" } Property { name: "textRaisedColorUp"; type: "QColor" } Property { name: "textRaisedColorDown"; type: "QColor" } Property { name: "radius"; type: "double" } Property { name: "halfRadius"; type: "double" } Property { name: "outerArcRadius"; type: "double" } Property { name: "innerArcRadius"; type: "double" } Property { name: "shineArcRadius"; type: "double" } Property { name: "zeroAngle"; type: "double" } Property { name: "buttonColorTop"; type: "QColor" } Property { name: "buttonColorBottom"; type: "QColor" } Method { name: "toPixels" type: "QVariant" Parameter { name: "percentageOfSmallestAxis"; type: "QVariant" } } Method { name: "paintBackground" type: "QVariant" Parameter { name: "ctx"; type: "QVariant" } } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/CircularGauge 1.0" exports: ["QtQuick.Extras/CircularGauge 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "tickmarksVisible"; type: "bool" } Property { name: "minimumValue"; type: "double" } Property { name: "maximumValue"; type: "double" } Property { name: "value"; type: "double" } Property { name: "stepSize"; type: "double" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras.Private/CircularTickmarkLabel 1.0" exports: ["QtQuick.Extras.Private/CircularTickmarkLabel 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "minimumValueAngle"; type: "double" } Property { name: "maximumValueAngle"; type: "double" } Property { name: "angleRange"; type: "double"; isReadonly: true } Property { name: "tickmarkStepSize"; type: "double" } Property { name: "tickmarkInset"; type: "double" } Property { name: "tickmarkCount"; type: "int"; isReadonly: true } Property { name: "minorTickmarkCount"; type: "int" } Property { name: "minorTickmarkInset"; type: "double" } Property { name: "labelInset"; type: "double" } Property { name: "labelStepSize"; type: "double" } Property { name: "labelCount"; type: "int"; isReadonly: true } Property { name: "__tickmarkCount"; type: "double"; isReadonly: true } Property { name: "tickmarksVisible"; type: "bool" } Property { name: "minimumValue"; type: "double" } Property { name: "maximumValue"; type: "double" } Property { name: "stepSize"; type: "double" } Method { name: "valueToAngle" type: "QVariant" Parameter { name: "value"; type: "QVariant" } } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickComboBox" name: "QtQuick.Controls/ComboBox 2.0" exports: ["QtQuick.Controls/ComboBox 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickContainer" name: "QtQuick.Controls/Container 2.0" exports: ["QtQuick.Controls/Container 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickDrawer" name: "org.kde.kirigami/ContextDrawer 2.0" exports: ["org.kde.kirigami/ContextDrawer 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" Property { name: "title"; type: "string" } Property { name: "actions"; type: "QVariant" } Property { name: "drawerOpen"; type: "bool" } Property { name: "enabled"; type: "bool" } Property { name: "peeking"; type: "bool" } Property { name: "animating"; type: "bool"; isReadonly: true } Property { name: "collapsible"; type: "bool" } Property { name: "collapsed"; type: "bool" } Property { name: "collapsedSize"; type: "int" } Property { name: "handleOpenIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleClosedIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleVisible"; type: "bool" } Property { name: "handle"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "__internal"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickControl" name: "QtQuick.Controls/Control 2.0" exports: ["QtQuick.Controls/Control 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Material.impl/CursorDelegate 2.0" exports: ["QtQuick.Controls.Material.impl/CursorDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/DelayButton 1.0" exports: ["QtQuick.Extras/DelayButton 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "delay"; type: "int" } Property { name: "__progress"; type: "double" } Property { name: "progress"; type: "double"; isReadonly: true } Signal { name: "activated" } Property { name: "isDefault"; type: "bool" } Property { name: "menu"; type: "Menu_QMLTYPE_126"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } Property { name: "action"; type: "QQuickAction1"; isPointer: true } Property { name: "activeFocusOnPress"; type: "bool" } Property { name: "text"; type: "string" } Property { name: "tooltip"; type: "string" } Property { name: "iconSource"; type: "QUrl" } Property { name: "iconName"; type: "string" } Property { name: "__position"; type: "string" } Property { name: "__iconOverriden"; type: "bool"; isReadonly: true } Property { name: "__action"; type: "QQuickAction1"; isPointer: true } Property { name: "__iconAction"; type: "QQuickAction1"; isReadonly: true; isPointer: true } Property { name: "__behavior"; type: "QVariant" } Property { name: "__effectivePressed"; type: "bool" } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "hovered"; type: "bool"; isReadonly: true } Signal { name: "clicked" } Method { name: "accessiblePressAction"; type: "QVariant" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickDelayButton" name: "QtQuick.Controls/DelayButton 2.2" exports: ["QtQuick.Controls/DelayButton 2.2"] exportMetaObjectRevisions: [2] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/Dial 1.1" exports: ["QtQuick.Extras/Dial 1.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" Property { name: "__wrap"; type: "bool" } Property { name: "activeFocusOnPress"; type: "bool" } Property { name: "tickmarksVisible"; type: "bool" } Property { name: "value"; type: "double" } Property { name: "minimumValue"; type: "double" } Property { name: "maximumValue"; type: "double" } Property { name: "hovered"; type: "bool"; isReadonly: true } Property { name: "stepSize"; type: "double" } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/Dial 1.0" exports: ["QtQuick.Extras/Dial 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "__wrap"; type: "bool" } Property { name: "activeFocusOnPress"; type: "bool" } Property { name: "tickmarksVisible"; type: "bool" } Property { name: "value"; type: "double" } Property { name: "minimumValue"; type: "double" } Property { name: "maximumValue"; type: "double" } Property { name: "hovered"; type: "bool"; isReadonly: true } Property { name: "stepSize"; type: "double" } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickDial" name: "QtQuick.Controls/Dial 2.0" exports: ["QtQuick.Controls/Dial 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickDialog" name: "QtQuick.Controls/Dialog 2.1" exports: ["QtQuick.Controls/Dialog 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickDialogButtonBox" name: "QtQuick.Controls/DialogButtonBox 2.1" exports: ["QtQuick.Controls/DialogButtonBox 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickDrawer" name: "QtQuick.Controls/Drawer 2.0" exports: ["QtQuick.Controls/Drawer 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Material.impl/ElevationEffect 2.0" exports: ["QtQuick.Controls.Material.impl/ElevationEffect 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "source"; type: "QVariant" } Property { name: "elevation"; type: "int" } Property { name: "fullWidth"; type: "bool" } Property { name: "fullHeight"; type: "bool" } Property { name: "sourceItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "_shadows"; type: "QVariant"; isReadonly: true } Property { name: "_shadow"; type: "QVariant"; isReadonly: true } } Component { prototype: "QQuickItem" name: "org.kde.kirigami/FormLayout 2.3" exports: ["org.kde.kirigami/FormLayout 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "wideMode"; type: "bool" } } Component { prototype: "QQuickFrame" name: "QtQuick.Controls/Frame 2.0" exports: ["QtQuick.Controls/Frame 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/Gauge 1.0" exports: ["QtQuick.Extras/Gauge 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "orientation"; type: "int" } Property { name: "tickmarkAlignment"; type: "int" } Property { name: "__tickmarkAlignment"; type: "int" } Property { name: "__tickmarksInside"; type: "bool" } Property { name: "tickmarkStepSize"; type: "double" } Property { name: "minorTickmarkCount"; type: "int" } Property { name: "formatValue"; type: "QVariant" } Property { name: "minimumValue"; type: "double" } Property { name: "value"; type: "double" } Property { name: "maximumValue"; type: "double" } Property { name: "font"; type: "QFont" } Property { name: "__hiddenText"; type: "QQuickText"; isReadonly: true; isPointer: true } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickDrawer" name: "org.kde.kirigami/GlobalDrawer 2.0" exports: ["org.kde.kirigami/GlobalDrawer 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "content" Property { name: "actions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "showContentWhenCollapsed"; type: "bool" } Property { name: "showTopContentWhenCollapsed"; type: "bool" } Property { name: "resetMenuOnTriggered"; type: "bool" } Property { name: "currentSubMenu"; type: "Action_QMLTYPE_53"; isReadonly: true; isPointer: true } Property { name: "title"; type: "string" } Property { name: "titleIcon"; type: "QVariant" } Property { name: "bannerImageSource"; type: "QUrl" } Property { name: "content"; type: "QObject"; isList: true; isReadonly: true } Property { name: "topContent"; type: "QObject"; isList: true; isReadonly: true } Signal { name: "bannerClicked" } Method { name: "resetMenu"; type: "QVariant" } Property { name: "drawerOpen"; type: "bool" } Property { name: "enabled"; type: "bool" } Property { name: "peeking"; type: "bool" } Property { name: "animating"; type: "bool"; isReadonly: true } Property { name: "collapsible"; type: "bool" } Property { name: "collapsed"; type: "bool" } Property { name: "collapsedSize"; type: "int" } Property { name: "handleOpenIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleClosedIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleVisible"; type: "bool" } Property { name: "handle"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "__internal"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickGroupBox" name: "QtQuick.Controls/GroupBox 2.0" exports: ["QtQuick.Controls/GroupBox 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickLabel" name: "org.kde.kirigami/Heading 2.0" exports: ["org.kde.kirigami/Heading 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "level"; type: "int" } Property { name: "step"; type: "int" } Method { name: "headerPointSize" type: "QVariant" Parameter { name: "l"; type: "QVariant" } } } Component { prototype: "QQuickControl" name: "org.kde.kirigami/InlineMessage 2.4" exports: ["org.kde.kirigami/InlineMessage 2.4"] exportMetaObjectRevisions: [4] isComposite: true defaultProperty: "data" Property { name: "_animating"; type: "bool" } Property { name: "type"; type: "int" } Property { name: "icon"; type: "IconPropertiesGroup_QMLTYPE_22"; isPointer: true } Property { name: "text"; type: "string" } Property { name: "showCloseButton"; type: "bool" } Property { name: "actions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "animating"; type: "bool"; isReadonly: true } Signal { name: "linkHovered" Parameter { name: "link"; type: "string" } } Signal { name: "linkActivated" Parameter { name: "link"; type: "string" } } } Component { prototype: "QQuickItemDelegate" name: "QtQuick.Controls/ItemDelegate 2.0" exports: ["QtQuick.Controls/ItemDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickControl" name: "org.kde.kirigami/ItemViewHeader 2.1" exports: ["org.kde.kirigami/ItemViewHeader 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" Property { name: "title"; type: "string" } Property { name: "color"; type: "QColor" } Property { name: "backgroundImage"; type: "QQuickImage"; isReadonly: true; isPointer: true } Property { name: "minimumHeight"; type: "int" } Property { name: "maximumHeight"; type: "int" } Property { name: "view"; type: "QQuickListView"; isPointer: true } } Component { prototype: "QQuickLabel" name: "org.kde.kirigami/Label 2.0" exports: ["org.kde.kirigami/Label 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickLabel" name: "QtQuick.Controls/Label 2.0" exports: ["QtQuick.Controls/Label 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickItem" name: "org.kde.kirigami/ListItemDragHandle 2.5" exports: ["org.kde.kirigami/ListItemDragHandle 2.5"] exportMetaObjectRevisions: [5] isComposite: true defaultProperty: "data" Property { name: "listItem"; type: "QQuickItem"; isPointer: true } Property { name: "listView"; type: "QQuickListView"; isPointer: true } Signal { name: "moveRequested" Parameter { name: "oldIndex"; type: "int" } Parameter { name: "newIndex"; type: "int" } } Signal { name: "dropped" } } Component { prototype: "QQuickMenu" name: "QtQuick.Controls/Menu 2.0" exports: ["QtQuick.Controls/Menu 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickMenuBar" name: "QtQuick.Controls/MenuBar 2.3" exports: ["QtQuick.Controls/MenuBar 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickMenuBarItem" name: "QtQuick.Controls/MenuBarItem 2.3" exports: ["QtQuick.Controls/MenuBarItem 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickMenuItem" name: "QtQuick.Controls/MenuItem 2.0" exports: ["QtQuick.Controls/MenuItem 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickMenuSeparator" name: "QtQuick.Controls/MenuSeparator 2.1" exports: ["QtQuick.Controls/MenuSeparator 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickDrawer" name: "org.kde.kirigami/OverlayDrawer 2.0" exports: ["org.kde.kirigami/OverlayDrawer 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" Property { name: "drawerOpen"; type: "bool" } Property { name: "enabled"; type: "bool" } Property { name: "peeking"; type: "bool" } Property { name: "animating"; type: "bool"; isReadonly: true } Property { name: "collapsible"; type: "bool" } Property { name: "collapsed"; type: "bool" } Property { name: "collapsedSize"; type: "int" } Property { name: "handleOpenIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleClosedIcon"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "handleVisible"; type: "bool" } Property { name: "handle"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "__internal"; type: "QObject"; isPointer: true } } Component { prototype: "QObject" name: "org.kde.kirigami/OverlaySheet 2.0" exports: ["org.kde.kirigami/OverlaySheet 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentItem" Property { name: "contentItem"; type: "QQuickItem"; isPointer: true } Property { name: "sheetOpen"; type: "bool" } Property { name: "leftPadding"; type: "int" } Property { name: "topPadding"; type: "int" } Property { name: "rightPadding"; type: "int" } Property { name: "bottomPadding"; type: "int" } Property { name: "header"; type: "QQuickItem"; isPointer: true } Property { name: "footer"; type: "QQuickItem"; isPointer: true } Property { name: "background"; type: "QQuickItem"; isPointer: true } Property { name: "parent"; type: "QQuickItem"; isPointer: true } Property { name: "rootItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "showCloseButton"; type: "bool" } Method { name: "open"; type: "QVariant" } Method { name: "close"; type: "QVariant" } } Component { prototype: "QQuickPage" name: "org.kde.kirigami/Page 2.0" exports: ["org.kde.kirigami/Page 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" Property { name: "flickable"; type: "QQuickFlickable"; isPointer: true } Property { name: "isCurrentPage"; type: "bool"; isReadonly: true } Property { name: "contextualActions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "mainAction"; type: "QObject"; isPointer: true } Property { name: "leftAction"; type: "QObject"; isPointer: true } Property { name: "rightAction"; type: "QObject"; isPointer: true } Property { name: "actions" type: "PageActionPropertyGroup_QMLTYPE_3" isReadonly: true isPointer: true } Signal { name: "backRequested" Parameter { name: "event"; type: "QVariant" } } } Component { prototype: "QQuickPage" name: "QtQuick.Controls/Page 2.0" exports: ["QtQuick.Controls/Page 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickPageIndicator" name: "QtQuick.Controls/PageIndicator 2.0" exports: ["QtQuick.Controls/PageIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickControl" name: "org.kde.kirigami/PageRow 2.0" exports: ["org.kde.kirigami/PageRow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "depth"; type: "int"; isReadonly: true } Property { name: "lastItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "currentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } Property { name: "initialPage"; type: "QVariant" } Property { name: "defaultColumnWidth"; type: "int" } Property { name: "wideMode"; type: "bool"; isReadonly: true } Property { name: "separatorVisible"; type: "bool" } Property { name: "currentIndex"; type: "int" } Property { name: "interactive"; type: "bool" } Property { name: "globalToolBar" type: "PageRowGlobalToolBarStyleGroup_QMLTYPE_4" isReadonly: true isPointer: true } Property { name: "layers"; type: "QQuickStackView"; isReadonly: true; isPointer: true } Signal { name: "pagePushed" Parameter { name: "page"; type: "QQuickItem"; isPointer: true } } Signal { name: "pageRemoved" Parameter { name: "page"; type: "QQuickItem"; isPointer: true } } Method { name: "push" type: "QVariant" Parameter { name: "page"; type: "QVariant" } Parameter { name: "properties"; type: "QVariant" } } Method { name: "pop" type: "QVariant" Parameter { name: "page"; type: "QVariant" } } Method { name: "replace" type: "QVariant" Parameter { name: "page"; type: "QVariant" } Parameter { name: "properties"; type: "QVariant" } } Method { name: "clear"; type: "QVariant" } Method { name: "get" type: "QVariant" Parameter { name: "idx"; type: "QVariant" } } Method { name: "flickBack"; type: "QVariant" } } Component { prototype: "QQuickPane" name: "QtQuick.Controls/Pane 2.0" exports: ["QtQuick.Controls/Pane 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/PieMenu 1.0" exports: ["QtQuick.Extras/PieMenu 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "menuItems" Property { name: "selectionAngle"; type: "double"; isReadonly: true } Property { name: "triggerMode"; type: "int" } Property { name: "title"; type: "string" } Property { name: "boundingItem"; type: "QQuickItem"; isPointer: true } Property { name: "__protectedScope"; type: "QObject"; isPointer: true } Property { name: "activationMode"; type: "int" } Property { name: "menuItems"; type: "QQuickMenuItem1"; isList: true; isReadonly: true } Property { name: "currentIndex"; type: "int"; isReadonly: true } Property { name: "currentItem"; type: "QQuickMenuItem1"; isReadonly: true; isPointer: true } Property { name: "__mouseThief"; type: "QQuickMouseThief"; isReadonly: true; isPointer: true } Method { name: "popup" type: "QVariant" Parameter { name: "x"; type: "QVariant" } Parameter { name: "y"; type: "QVariant" } } Method { name: "addItem" type: "QVariant" Parameter { name: "text"; type: "QVariant" } } Method { name: "insertItem" type: "QVariant" Parameter { name: "before"; type: "QVariant" } Parameter { name: "text"; type: "QVariant" } } Method { name: "removeItem" type: "QVariant" Parameter { name: "item"; type: "QVariant" } } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickLoader" name: "QtQuick.Extras.Private/PieMenuIcon 1.0" exports: ["QtQuick.Extras.Private/PieMenuIcon 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "PieMenu_QMLTYPE_222"; isPointer: true } Property { name: "styleData"; type: "QObject"; isPointer: true } Property { name: "iconSource"; type: "string"; isReadonly: true } } Component { prototype: "QQuickPopup" name: "QtQuick.Controls/Popup 2.0" exports: ["QtQuick.Controls/Popup 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickProgressBar" name: "QtQuick.Controls/ProgressBar 2.0" exports: ["QtQuick.Controls/ProgressBar 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRadioButton" name: "QtQuick.Controls/RadioButton 2.0" exports: ["QtQuick.Controls/RadioButton 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRadioDelegate" name: "QtQuick.Controls/RadioDelegate 2.0" exports: ["QtQuick.Controls/RadioDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/RadioIndicator 2.3" exports: ["QtQuick.Controls.Fusion.impl/RadioIndicator 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "pressedColor"; type: "QColor"; isReadonly: true } Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Material.impl/RadioIndicator 2.0" exports: ["QtQuick.Controls.Material.impl/RadioIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Universal.impl/RadioIndicator 2.0" exports: ["QtQuick.Controls.Universal.impl/RadioIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QVariant" } } Component { prototype: "QQuickRangeSlider" name: "QtQuick.Controls/RangeSlider 2.0" exports: ["QtQuick.Controls/RangeSlider 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Material.impl/RectangularGlow 2.0" exports: ["QtQuick.Controls.Material.impl/RectangularGlow 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "glowRadius"; type: "double" } Property { name: "spread"; type: "double" } Property { name: "color"; type: "QColor" } Property { name: "cornerRadius"; type: "double" } Property { name: "cached"; type: "bool" } } Component { prototype: "QQuickRoundButton" name: "QtQuick.Controls/RoundButton 2.1" exports: ["QtQuick.Controls/RoundButton 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickScrollBar" name: "QtQuick.Controls/ScrollBar 2.0" exports: ["QtQuick.Controls/ScrollBar 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickScrollIndicator" name: "QtQuick.Controls/ScrollIndicator 2.0" exports: ["QtQuick.Controls/ScrollIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickScrollView" name: "QtQuick.Controls/ScrollView 2.2" exports: ["QtQuick.Controls/ScrollView 2.2"] exportMetaObjectRevisions: [2] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickPage" name: "org.kde.kirigami/ScrollablePage 2.0" exports: ["org.kde.kirigami/ScrollablePage 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "mainItem" Property { name: "mainItem"; type: "QObject"; isPointer: true } Property { name: "keyboardNavigationEnabled"; type: "bool" } Property { name: "refreshing"; type: "bool" } Property { name: "supportsRefreshing"; type: "bool" } Property { name: "flickable"; type: "QQuickFlickable"; isPointer: true } Property { name: "verticalScrollBarPolicy"; type: "int" } Property { name: "horizontalScrollBarPolicy"; type: "int" } Property { name: "isCurrentPage"; type: "bool"; isReadonly: true } Property { name: "contextualActions"; type: "QObject"; isList: true; isReadonly: true } Property { name: "mainAction"; type: "QObject"; isPointer: true } Property { name: "leftAction"; type: "QObject"; isPointer: true } Property { name: "rightAction"; type: "QObject"; isPointer: true } Property { name: "actions" type: "PageActionPropertyGroup_QMLTYPE_3" isReadonly: true isPointer: true } Signal { name: "backRequested" Parameter { name: "event"; type: "QVariant" } } } Component { prototype: "QQuickRectangle" name: "org.kde.kirigami/Separator 2.0" exports: ["org.kde.kirigami/Separator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickSlider" name: "QtQuick.Controls/Slider 2.0" exports: ["QtQuick.Controls/Slider 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/SliderGroove 2.3" exports: ["QtQuick.Controls.Fusion.impl/SliderGroove 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "offset"; type: "double" } Property { name: "progress"; type: "double" } Property { name: "visualProgress"; type: "double" } } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Material.impl/SliderHandle 2.0" exports: ["QtQuick.Controls.Material.impl/SliderHandle 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "value"; type: "double" } Property { name: "handleHasFocus"; type: "bool" } Property { name: "handlePressed"; type: "bool" } Property { name: "handleHovered"; type: "bool" } Property { name: "initialSize"; type: "int"; isReadonly: true } Property { name: "control"; type: "QVariant"; isReadonly: true } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/SliderHandle 2.3" exports: ["QtQuick.Controls.Fusion.impl/SliderHandle 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "palette"; type: "QVariant" } Property { name: "pressed"; type: "bool" } Property { name: "hovered"; type: "bool" } Property { name: "vertical"; type: "bool" } Property { name: "visualFocus"; type: "bool" } } Component { prototype: "QQuickSpinBox" name: "QtQuick.Controls/SpinBox 2.0" exports: ["QtQuick.Controls/SpinBox 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickStackView" name: "QtQuick.Controls/StackView 2.0" exports: ["QtQuick.Controls/StackView 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/StatusIndicator 1.0" exports: ["QtQuick.Extras/StatusIndicator 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "active"; type: "bool" } Property { name: "color"; type: "QColor" } Property { name: "on"; type: "bool" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/StatusIndicator 1.1" exports: ["QtQuick.Extras/StatusIndicator 1.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" Property { name: "active"; type: "bool" } Property { name: "color"; type: "QColor" } Property { name: "on"; type: "bool" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickSwipeDelegate" name: "QtQuick.Controls/SwipeDelegate 2.0" exports: ["QtQuick.Controls/SwipeDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickItemDelegate" name: "org.kde.kirigami/SwipeListItem 2.0" exports: ["org.kde.kirigami/SwipeListItem 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "_default" Property { name: "sectionDelegate"; type: "bool" } Property { name: "separatorVisible"; type: "bool" } Property { name: "actions"; type: "Action_QMLTYPE_53"; isList: true; isReadonly: true } Property { name: "textColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } Property { name: "activeBackgroundColor"; type: "QColor" } Property { name: "supportsMouseEvents"; type: "bool" } Property { name: "containsMouse"; type: "bool"; isReadonly: true } Property { name: "actionsVisible"; type: "bool" } Property { name: "_default"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QQuickSwipeView" name: "QtQuick.Controls/SwipeView 2.0" exports: ["QtQuick.Controls/SwipeView 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickSwitch" name: "QtQuick.Controls/Switch 2.0" exports: ["QtQuick.Controls/Switch 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickSwitchDelegate" name: "QtQuick.Controls/SwitchDelegate 2.0" exports: ["QtQuick.Controls/SwitchDelegate 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Universal.impl/SwitchIndicator 2.0" exports: ["QtQuick.Controls.Universal.impl/SwitchIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } } Component { prototype: "QQuickRectangle" name: "QtQuick.Controls.Fusion.impl/SwitchIndicator 2.3" exports: ["QtQuick.Controls.Fusion.impl/SwitchIndicator 2.3"] exportMetaObjectRevisions: [3] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "pressedColor"; type: "QColor"; isReadonly: true } Property { name: "checkMarkColor"; type: "QColor"; isReadonly: true } } Component { prototype: "QQuickItem" name: "QtQuick.Controls.Material.impl/SwitchIndicator 2.0" exports: ["QtQuick.Controls.Material.impl/SwitchIndicator 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "control"; type: "QQuickItem"; isPointer: true } Property { name: "handle"; type: "QQuickRectangle"; isReadonly: true; isPointer: true } } Component { prototype: "QQuickTabBar" name: "QtQuick.Controls/TabBar 2.0" exports: ["QtQuick.Controls/TabBar 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickTabButton" name: "QtQuick.Controls/TabButton 2.0" exports: ["QtQuick.Controls/TabButton 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickTextArea" name: "QtQuick.Controls/TextArea 2.0" exports: ["QtQuick.Controls/TextArea 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickTextField" name: "QtQuick.Controls/TextField 2.0" exports: ["QtQuick.Controls/TextField 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickText" name: "QtQuick.Extras.Private/TextSingleton 1.0" exports: ["QtQuick.Extras.Private/TextSingleton 1.0"] exportMetaObjectRevisions: [0] isComposite: true isCreatable: false isSingleton: true defaultProperty: "data" } Component { prototype: "QObject" name: "org.kde.kirigami/Theme 2.0" exports: ["org.kde.kirigami/Theme 2.0"] exportMetaObjectRevisions: [0] isComposite: true isCreatable: false isSingleton: true Property { name: "textColor"; type: "QColor" } Property { name: "disabledTextColor"; type: "QColor" } Property { name: "highlightColor"; type: "QColor" } Property { name: "highlightedTextColor"; type: "QColor" } Property { name: "backgroundColor"; type: "QColor" } Property { name: "activeTextColor"; type: "QColor" } + Property { name: "activeBackgroundColor"; type: "QColor" } Property { name: "linkColor"; type: "QColor" } + Property { name: "linkBackgroundColor"; type: "QColor" } Property { name: "visitedLinkColor"; type: "QColor" } + Property { name: "visitedLinkBackgroundColor"; type: "QColor" } Property { name: "hoverColor"; type: "QColor" } Property { name: "focusColor"; type: "QColor" } Property { name: "negativeTextColor"; type: "QColor" } + Property { name: "negativeBackgroundColor"; type: "QColor" } Property { name: "neutralTextColor"; type: "QColor" } + Property { name: "neutralBackgroundColor"; type: "QColor" } Property { name: "positiveTextColor"; type: "QColor" } + Property { name: "positiveBackgroundColor"; type: "QColor" } Property { name: "buttonTextColor"; type: "QColor" } Property { name: "buttonBackgroundColor"; type: "QColor" } Property { name: "buttonHoverColor"; type: "QColor" } Property { name: "buttonFocusColor"; type: "QColor" } Property { name: "viewTextColor"; type: "QColor" } Property { name: "viewBackgroundColor"; type: "QColor" } Property { name: "viewHoverColor"; type: "QColor" } Property { name: "viewFocusColor"; type: "QColor" } Property { name: "selectionTextColor"; type: "QColor" } Property { name: "selectionBackgroundColor"; type: "QColor" } Property { name: "selectionHoverColor"; type: "QColor" } Property { name: "selectionFocusColor"; type: "QColor" } Property { name: "tooltipTextColor"; type: "QColor" } Property { name: "tooltipBackgroundColor"; type: "QColor" } Property { name: "tooltipHoverColor"; type: "QColor" } Property { name: "tooltipFocusColor"; type: "QColor" } Property { name: "complementaryTextColor"; type: "QColor" } Property { name: "complementaryBackgroundColor"; type: "QColor" } Property { name: "complementaryHoverColor"; type: "QColor" } Property { name: "complementaryFocusColor"; type: "QColor" } Property { name: "defaultFont"; type: "QFont" } Property { name: "children"; type: "QObject"; isList: true; isReadonly: true } Method { name: "__propagateColorSet" type: "QVariant" Parameter { name: "object"; type: "QVariant" } Parameter { name: "context"; type: "QVariant" } } Method { name: "__propagateTextColor" type: "QVariant" Parameter { name: "object"; type: "QVariant" } Parameter { name: "color"; type: "QVariant" } } Method { name: "__propagateBackgroundColor" type: "QVariant" Parameter { name: "object"; type: "QVariant" } Parameter { name: "color"; type: "QVariant" } } Method { name: "__propagatePrimaryColor" type: "QVariant" Parameter { name: "object"; type: "QVariant" } Parameter { name: "color"; type: "QVariant" } } Method { name: "__propagateAccentColor" type: "QVariant" Parameter { name: "object"; type: "QVariant" } Parameter { name: "color"; type: "QVariant" } } } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/ToggleButton 1.0" exports: ["QtQuick.Extras/ToggleButton 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" Property { name: "isDefault"; type: "bool" } Property { name: "menu"; type: "Menu_QMLTYPE_126"; isPointer: true } Property { name: "checkable"; type: "bool" } Property { name: "checked"; type: "bool" } Property { name: "exclusiveGroup"; type: "QQuickExclusiveGroup1"; isPointer: true } Property { name: "action"; type: "QQuickAction1"; isPointer: true } Property { name: "activeFocusOnPress"; type: "bool" } Property { name: "text"; type: "string" } Property { name: "tooltip"; type: "string" } Property { name: "iconSource"; type: "QUrl" } Property { name: "iconName"; type: "string" } Property { name: "__position"; type: "string" } Property { name: "__iconOverriden"; type: "bool"; isReadonly: true } Property { name: "__action"; type: "QQuickAction1"; isPointer: true } Property { name: "__iconAction"; type: "QQuickAction1"; isReadonly: true; isPointer: true } Property { name: "__behavior"; type: "QVariant" } Property { name: "__effectivePressed"; type: "bool" } Property { name: "pressed"; type: "bool"; isReadonly: true } Property { name: "hovered"; type: "bool"; isReadonly: true } Signal { name: "clicked" } Method { name: "accessiblePressAction"; type: "QVariant" } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickToolBar" name: "QtQuick.Controls/ToolBar 2.0" exports: ["QtQuick.Controls/ToolBar 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickItem" name: "org.kde.kirigami/ToolBarApplicationHeader 2.0" exports: ["org.kde.kirigami/ToolBarApplicationHeader 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentItem" Property { name: "_internal"; type: "string" } Property { name: "headerStyle"; type: "int" } Property { name: "backButtonEnabled"; type: "bool" } Property { name: "pageDelegate"; type: "QQmlComponent"; isPointer: true } Property { name: "minimumHeight"; type: "int" } Property { name: "preferredHeight"; type: "int" } Property { name: "maximumHeight"; type: "int" } Property { name: "pageRow"; type: "PageRow_QMLTYPE_5"; isPointer: true } Property { name: "page"; type: "Page_QMLTYPE_14"; isPointer: true } Property { name: "paintedHeight"; type: "int"; isReadonly: true } Property { name: "leftPadding"; type: "int" } Property { name: "topPadding"; type: "int" } Property { name: "rightPadding"; type: "int" } Property { name: "bottomPadding"; type: "int" } Property { name: "separatorVisible"; type: "bool" } Property { name: "__appWindow"; type: "QObject"; isPointer: true } Property { name: "background"; type: "QQuickItem"; isPointer: true } Property { name: "contentItem"; type: "QObject"; isList: true; isReadonly: true } } Component { prototype: "QQuickToolButton" name: "QtQuick.Controls/ToolButton 2.0" exports: ["QtQuick.Controls/ToolButton 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickToolSeparator" name: "QtQuick.Controls/ToolSeparator 2.1" exports: ["QtQuick.Controls/ToolSeparator 2.1"] exportMetaObjectRevisions: [1] isComposite: true defaultProperty: "data" } Component { prototype: "QQuickToolTip" name: "QtQuick.Controls/ToolTip 2.0" exports: ["QtQuick.Controls/ToolTip 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "contentData" } Component { prototype: "QQuickFocusScope" name: "QtQuick.Extras/Tumbler 1.2" exports: ["QtQuick.Extras/Tumbler 1.2"] exportMetaObjectRevisions: [2] isComposite: true defaultProperty: "data" Property { name: "__highlightMoveDuration"; type: "int" } Property { name: "columnCount"; type: "int"; isReadonly: true } Property { name: "__columnRow"; type: "QQuickRow"; isReadonly: true; isPointer: true } Property { name: "__movementDelayTimer"; type: "QQmlTimer"; isReadonly: true; isPointer: true } Method { name: "__isValidColumnIndex" type: "QVariant" Parameter { name: "index"; type: "QVariant" } } Method { name: "__isValidColumnAndItemIndex" type: "QVariant" Parameter { name: "columnIndex"; type: "QVariant" } Parameter { name: "itemIndex"; type: "QVariant" } } Method { name: "currentIndexAt" type: "QVariant" Parameter { name: "columnIndex"; type: "QVariant" } } Method { name: "setCurrentIndexAt" type: "QVariant" Parameter { name: "columnIndex"; type: "QVariant" } Parameter { name: "itemIndex"; type: "QVariant" } Parameter { name: "interval"; type: "QVariant" } } Method { name: "getColumn" type: "QVariant" Parameter { name: "columnIndex"; type: "QVariant" } } Method { name: "addColumn" type: "QVariant" Parameter { name: "column"; type: "QVariant" } } Method { name: "insertColumn" type: "QVariant" Parameter { name: "index"; type: "QVariant" } Parameter { name: "column"; type: "QVariant" } } Method { name: "__viewAt" type: "QVariant" Parameter { name: "index"; type: "QVariant" } } Property { name: "style"; type: "QQmlComponent"; isPointer: true } Property { name: "__style"; type: "QObject"; isPointer: true } Property { name: "__panel"; type: "QQuickItem"; isPointer: true } Property { name: "styleHints"; type: "QVariant" } Property { name: "__styleData"; type: "QObject"; isPointer: true } } Component { prototype: "QQuickTumbler" name: "QtQuick.Controls/Tumbler 2.0" exports: ["QtQuick.Controls/Tumbler 2.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" } Component { prototype: "QObject" name: "QtQuick.Extras/TumblerColumn 1.2" exports: ["QtQuick.Extras/TumblerColumn 1.2"] exportMetaObjectRevisions: [2] isComposite: true Property { name: "__tumbler"; type: "QQuickItem"; isPointer: true } Property { name: "__index"; type: "int" } Property { name: "__currentIndex"; type: "int" } Property { name: "model"; type: "QVariant" } Property { name: "role"; type: "string" } Property { name: "delegate"; type: "QQmlComponent"; isPointer: true } Property { name: "highlight"; type: "QQmlComponent"; isPointer: true } Property { name: "columnForeground"; type: "QQmlComponent"; isPointer: true } Property { name: "visible"; type: "bool" } Property { name: "activeFocus"; type: "bool"; isReadonly: true } Property { name: "width"; type: "double" } Property { name: "currentIndex"; type: "int"; isReadonly: true } } Component { prototype: "QObject" name: "org.kde.kirigami/Units 2.0" exports: ["org.kde.kirigami/Units 2.0"] exportMetaObjectRevisions: [0] isComposite: true isCreatable: false isSingleton: true Property { name: "gridUnit"; type: "int" } Property { name: "iconSizes"; type: "QObject"; isPointer: true } Property { name: "smallSpacing"; type: "int" } Property { name: "largeSpacing"; type: "int" } Property { name: "devicePixelRatio"; type: "double" } Property { name: "longDuration"; type: "int" } Property { name: "shortDuration"; type: "int" } Property { name: "toolTipDelay"; type: "int" } Property { name: "wheelScrollLines"; type: "int"; isReadonly: true } Property { name: "fontMetrics"; type: "QVariant" } } } diff --git a/src/libkirigami/basictheme.cpp b/src/libkirigami/basictheme.cpp index e7ab164a..34d0d6b1 100644 --- a/src/libkirigami/basictheme.cpp +++ b/src/libkirigami/basictheme.cpp @@ -1,336 +1,348 @@ /* * Copyright (C) 2017 by Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "basictheme_p.h" #include #include #include #include #include #include #include namespace Kirigami { class BasicThemeDeclarativeSingleton { public: BasicThemeDeclarativeSingleton() {} BasicThemeDeclarative self; }; Q_GLOBAL_STATIC(BasicThemeDeclarativeSingleton, privateBasicThemeDeclarativeSelf) BasicThemeDeclarative::BasicThemeDeclarative() { m_colorSyncTimer = new QTimer; m_colorSyncTimer->setInterval(0); m_colorSyncTimer->setSingleShot(true); } BasicThemeDeclarative::~BasicThemeDeclarative() { delete m_colorSyncTimer; } QObject *BasicThemeDeclarative::instance(const BasicTheme *theme) { if (m_declarativeBasicTheme) { return m_declarativeBasicTheme; } QQmlEngine *engine = qmlEngine(theme->parent()); Q_ASSERT(engine); QQmlComponent c(engine); //NOTE: for now is important this import stays at 2.0 c.setData("import QtQuick 2.6\n\ import org.kde.kirigami 2.0 as Kirigami\n\ QtObject {\n\ property QtObject theme: Kirigami.Theme\n\ }", QUrl(QStringLiteral("basictheme.cpp"))); QObject *obj = c.create(); m_declarativeBasicTheme = obj->property("theme").value(); return m_declarativeBasicTheme; } BasicTheme::BasicTheme(QObject *parent) : PlatformTheme(parent) { //TODO: correct? connect(qApp, &QGuiApplication::fontDatabaseChanged, this, [this]() {setDefaultFont(qApp->font());}); //connect all the declarative object signals to the timer start to compress, use the old syntax as they are all signals defined in QML connect(basicThemeDeclarative()->instance(this), SIGNAL(textColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(disabledTextColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(highlightColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(highlightedTextColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(backgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(alternateBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(linkColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(visitedLinkColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(buttonTextColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(buttonBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(buttonAlternateBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(buttonHoverColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(buttonFocusColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(viewTextColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(viewBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(viewAlternateBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(viewHoverColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(viewFocusColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(complementaryTextColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(complementaryBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(complementaryAlternateBackgroundColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(complementaryHoverColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); connect(basicThemeDeclarative()->instance(this), SIGNAL(complementaryFocusColorChanged()), basicThemeDeclarative()->m_colorSyncTimer, SLOT(start())); //finally connect the timer to the sync connect(basicThemeDeclarative()->m_colorSyncTimer, &QTimer::timeout, this, &BasicTheme::syncColors); connect(this, &BasicTheme::colorSetChanged, this, &BasicTheme::syncColors); connect(this, &BasicTheme::colorGroupChanged, this, &BasicTheme::syncColors); connect(this, &PlatformTheme::colorSetChanged, this, &BasicTheme::syncCustomColorsToQML); connect(this, &PlatformTheme::colorsChanged, this, &BasicTheme::syncCustomColorsToQML); syncColors(); } BasicTheme::~BasicTheme() { } static inline QColor colorGroupTint(const QColor &color, PlatformTheme::ColorGroup group) { switch (group) { case PlatformTheme::Inactive: return QColor::fromHsvF(color.hueF(), color.saturationF() * 0.5, color.valueF()); case PlatformTheme::Disabled: return QColor::fromHsvF(color.hueF(), color.saturationF() * 0.5, color.valueF()*0.8); default: return color; } } //TODO: tint for which we need to chain to m_parentBasicTheme's color #define RESOLVECOLOR(colorName, upperCaseColor) \ QColor color;\ switch (colorSet()) {\ case BasicTheme::Button:\ color = basicThemeDeclarative()->instance(this)->property("button"#upperCaseColor).value();\ break;\ case BasicTheme::View:\ color = basicThemeDeclarative()->instance(this)->property("view"#upperCaseColor).value();\ break;\ case BasicTheme::Selection:\ color = basicThemeDeclarative()->instance(this)->property("selection"#upperCaseColor).value();\ break;\ case BasicTheme::Tooltip:\ color = basicThemeDeclarative()->instance(this)->property("tooltip"#upperCaseColor).value();\ break;\ case BasicTheme::Complementary:\ color = basicThemeDeclarative()->instance(this)->property("complementary"#upperCaseColor).value();\ break;\ case BasicTheme::Window:\ default:\ color = basicThemeDeclarative()->instance(this)->property(#colorName).value();\ }\ color = colorGroupTint(color, colorGroup()); #define PROXYCOLOR(colorName, upperCaseColor) \ colorGroupTint(basicThemeDeclarative()->instance(this)->property(#colorName).value(), colorGroup()) void BasicTheme::syncColors() { { RESOLVECOLOR(textColor, TextColor); setTextColor(color); }{ setDisabledTextColor(PROXYCOLOR(disabledTextColor, DisabledTextColor)); }{ RESOLVECOLOR(backgroundColor, BackgroundColor) setBackgroundColor(color); }{ RESOLVECOLOR(alternateBackgroundColor, AlternateBackgroundColor) setAlternateBackgroundColor(color); }{ setHighlightColor(PROXYCOLOR(highlightColor, HighlightColor)); }{ setHighlightedTextColor(PROXYCOLOR(highlightedTextColor, HighlightedTextColor)); }{ setActiveTextColor(PROXYCOLOR(activeTextColor, ActiveTextColor)); + }{ + setActiveBackgroundColor(PROXYCOLOR(activeBackgroundColor, ActiveBackgroundColor)); }{ setLinkColor(PROXYCOLOR(linkColor, LinkColor)); + }{ + setLinkBackgroundColor(PROXYCOLOR(linkBackgroundColor, LinkBackgroundColor)); }{ setVisitedLinkColor(PROXYCOLOR(visitedLinkColor, VisitedLinkColor)); + }{ + setVisitedLinkBackgroundColor(PROXYCOLOR(visitedLinkBackgroundColor, VisitedLinkBackgroundColor)); }{ setNegativeTextColor(PROXYCOLOR(negativeTextColor, NegativeTextColor)); + }{ + setNegativeBackgroundColor(PROXYCOLOR(negativeBackgroundColor, NegativeBackgroundColor)); }{ setNeutralTextColor(PROXYCOLOR(neutralTextColor, NeutralTextColor)); + }{ + setNeutralBackgroundColor(PROXYCOLOR(neutralBackgroundColor, NeutralBackgroundColor)); }{ setPositiveTextColor(PROXYCOLOR(positiveTextColor, PositiveTextColor)); + }{ + setPositiveBackgroundColor(PROXYCOLOR(positiveBackgroundColor, PositiveBackgroundColor)); }{ RESOLVECOLOR(hoverColor, HoverColor); setHoverColor(color); }{ RESOLVECOLOR(focusColor, FocusColor); setFocusColor(color); } //legacy { m_buttonTextColor = PROXYCOLOR(buttonTextColor, ButtonTextColor); m_buttonBackgroundColor = PROXYCOLOR(buttonBackgroundColor, ButtonBackgroundColor); m_buttonHoverColor = PROXYCOLOR(buttonHoverColor, ButtonHoverColor); m_buttonFocusColor = PROXYCOLOR(buttonFocusColor, ButtonFocusColor); m_viewTextColor = PROXYCOLOR(viewTextColor, ViewTextColor); m_viewBackgroundColor = PROXYCOLOR(viewBackgroundColor, ViewBackgroundColor); m_viewHoverColor = PROXYCOLOR(viewHoverColor, ViewHoverColor); m_viewFocusColor = PROXYCOLOR(viewFocusColor, ViewFocusColor); } QPalette pal = qApp->palette(); pal.setColor(QPalette::WindowText, textColor()); pal.setColor(QPalette::Button, m_buttonBackgroundColor); pal.setColor(QPalette::Light, m_buttonBackgroundColor.lighter(120)); pal.setColor(QPalette::Dark, m_buttonBackgroundColor.darker(120)); pal.setColor(QPalette::Mid, m_buttonBackgroundColor.darker(110)); pal.setColor(QPalette::Base, m_viewBackgroundColor); pal.setColor(QPalette::HighlightedText, highlightedTextColor()); pal.setColor(QPalette::Text, m_viewTextColor); pal.setColor(QPalette::Window, backgroundColor()); setPalette(pal); if (this->parent()) { //this will work on Qt 5.10+ but is a safe noop on older releases this->parent()->setProperty("palette", QVariant::fromValue(pal)); if (basicThemeDeclarative()->instance(this)) { QMetaObject::invokeMethod(basicThemeDeclarative()->instance(this), "__propagateColorSet", Q_ARG(QVariant, QVariant::fromValue(this->parent())), Q_ARG(QVariant, colorSet())); } } emit colorsChanged(); } void BasicTheme::syncCustomColorsToQML() { if (basicThemeDeclarative()->instance(this)) { QMetaObject::invokeMethod(basicThemeDeclarative()->instance(this), "__propagateTextColor", Q_ARG(QVariant, QVariant::fromValue(this->parent())), Q_ARG(QVariant, textColor())); QMetaObject::invokeMethod(basicThemeDeclarative()->instance(this), "__propagateBackgroundColor", Q_ARG(QVariant, QVariant::fromValue(this->parent())), Q_ARG(QVariant, backgroundColor())); QMetaObject::invokeMethod(basicThemeDeclarative()->instance(this), "__propagatePrimaryColor", Q_ARG(QVariant, QVariant::fromValue(this->parent())), Q_ARG(QVariant, highlightColor())); QMetaObject::invokeMethod(basicThemeDeclarative()->instance(this), "__propagateAccentColor", Q_ARG(QVariant, QVariant::fromValue(this->parent())), Q_ARG(QVariant, highlightColor())); } } QColor BasicTheme::buttonTextColor() const { qWarning()<<"WARNING: buttonTextColor is deprecated, use textColor with colorSet: Theme.Button instead"; return m_buttonTextColor; } QColor BasicTheme::buttonBackgroundColor() const { qWarning()<<"WARNING: buttonBackgroundColor is deprecated, use backgroundColor with colorSet: Theme.Button instead"; return m_buttonBackgroundColor; } QColor BasicTheme::buttonHoverColor() const { qWarning()<<"WARNING: buttonHoverColor is deprecated, use backgroundColor with colorSet: Theme.Button instead"; return m_buttonHoverColor; } QColor BasicTheme::buttonFocusColor() const { qWarning()<<"WARNING: buttonFocusColor is deprecated, use backgroundColor with colorSet: Theme.Button instead"; return m_buttonFocusColor; } QColor BasicTheme::viewTextColor() const { qWarning()<<"WARNING: viewTextColor is deprecated, use backgroundColor with colorSet: Theme.View instead"; return m_viewTextColor; } QColor BasicTheme::viewBackgroundColor() const { qWarning()<<"WARNING: viewBackgroundColor is deprecated, use backgroundColor with colorSet: Theme.View instead"; return m_viewBackgroundColor; } QColor BasicTheme::viewHoverColor() const { qWarning()<<"WARNING: viewHoverColor is deprecated, use backgroundColor with colorSet: Theme.View instead"; return m_viewHoverColor; } QColor BasicTheme::viewFocusColor() const { qWarning()<<"WARNING: viewFocusColor is deprecated, use backgroundColor with colorSet: Theme.View instead"; return m_viewFocusColor; } BasicThemeDeclarative *BasicTheme::basicThemeDeclarative() { return &privateBasicThemeDeclarativeSelf->self; } } #include "moc_basictheme_p.cpp" diff --git a/src/libkirigami/platformtheme.cpp b/src/libkirigami/platformtheme.cpp index 8a9d2728..76e069d5 100644 --- a/src/libkirigami/platformtheme.cpp +++ b/src/libkirigami/platformtheme.cpp @@ -1,755 +1,929 @@ /* * Copyright (C) 2017 by Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "platformtheme.h" #include "kirigamipluginfactory.h" #include "basictheme_p.h" #include #include #include #include #include #include #include #include #include namespace Kirigami { class PlatformThemePrivate { public: PlatformThemePrivate(PlatformTheme *q); ~PlatformThemePrivate(); inline void syncCustomPalette(); void emitCompressedColorChanged(); void findParentStyle(); static QColor tint(const QColor &c1, const QColor &c2, qreal ratio); PlatformTheme *q; PlatformTheme::ColorSet m_colorSet = PlatformTheme::Window; PlatformTheme::ColorGroup m_colorGroup = PlatformTheme::Active; QSet m_childThemes; QPointer m_parentTheme; //ordinary colors QColor textColor; QColor disabledTextColor; QColor highlightedTextColor; QColor activeTextColor; QColor linkColor; QColor visitedLinkColor; QColor negativeTextColor; QColor neutralTextColor; QColor positiveTextColor; QColor backgroundColor; QColor alternateBackgroundColor; QColor highlightColor; + QColor activeBackgroundColor; + QColor linkBackgroundColor; + QColor visitedLinkBackgroundColor; + QColor negativeBackgroundColor; + QColor neutralBackgroundColor; + QColor positiveBackgroundColor; QColor focusColor; QColor hoverColor; QPalette palette; //custom colors QColor customTextColor; QColor customDisabledTextColor; QColor customHighlightedTextColor; QColor customActiveTextColor; QColor customLinkColor; QColor customVisitedLinkColor; QColor customNegativeTextColor; QColor customNeutralTextColor; QColor customPositiveTextColor; QColor customBackgroundColor; QColor customAlternateBackgroundColor; QColor customHighlightColor; + QColor customActiveBackgroundColor; + QColor customLinkBackgroundColor; + QColor customVisitedLinkBackgroundColor; + QColor customNegativeBackgroundColor; + QColor customNeutralBackgroundColor; + QColor customPositiveBackgroundColor; QColor customFocusColor; QColor customHoverColor; QPalette customPalette; QFont font; bool m_inherit = true; bool m_init = true; bool m_supportsIconColoring = false; bool m_pendingColorChange = false; static KirigamiPluginFactory *s_pluginFactory; }; KirigamiPluginFactory *PlatformThemePrivate::s_pluginFactory = nullptr; PlatformThemePrivate::PlatformThemePrivate(PlatformTheme *q) : q(q) { } PlatformThemePrivate::~PlatformThemePrivate() {} void setPaletteColor(QPalette& customPalette, QPalette::ColorGroup cg, QPalette::ColorRole cr, const QColor &color) { if (customPalette.color(cg, cr) != color) { customPalette.setColor(cg, cr, color); } } void PlatformThemePrivate::syncCustomPalette() { for (auto state : { QPalette::Active, QPalette::Inactive, QPalette::Disabled }) { setPaletteColor(customPalette, state, QPalette::WindowText, q->textColor()); setPaletteColor(customPalette, state, QPalette::Window, q->backgroundColor()); setPaletteColor(customPalette, state, QPalette::Base, q->backgroundColor()); setPaletteColor(customPalette, state, QPalette::Text, q->textColor()); setPaletteColor(customPalette, state, QPalette::Button, q->backgroundColor()); setPaletteColor(customPalette, state, QPalette::ButtonText, q->textColor()); setPaletteColor(customPalette, state, QPalette::Highlight, q->highlightColor()); setPaletteColor(customPalette, state, QPalette::HighlightedText, q->highlightedTextColor()); setPaletteColor(customPalette, state, QPalette::ToolTipBase, q->backgroundColor()); setPaletteColor(customPalette, state, QPalette::ToolTipText, q->textColor()); setPaletteColor(customPalette, state, QPalette::Link, q->linkColor()); setPaletteColor(customPalette, state, QPalette::LinkVisited, q->visitedLinkColor()); } emit q->paletteChanged(customPalette); } void PlatformThemePrivate::findParentStyle() { if (m_parentTheme) { m_parentTheme->d->m_childThemes.remove(q); } QQuickItem *candidate = qobject_cast(q->parent()); while (candidate) { candidate = candidate->parentItem(); PlatformTheme *t = static_cast(qmlAttachedPropertiesObject(candidate, false)); if (t) { t->d->m_childThemes.insert(q); m_parentTheme = t; if (m_inherit) { q->setColorSet(t->colorSet()); q->setCustomTextColor(t->d->customTextColor); q->setCustomDisabledTextColor(t->d->customDisabledTextColor); q->setCustomHighlightedTextColor(t->d->customHighlightedTextColor); q->setCustomActiveTextColor(t->d->customActiveTextColor); q->setCustomLinkColor(t->d->customLinkColor); q->setCustomVisitedLinkColor(t->d->customVisitedLinkColor); q->setCustomNegativeTextColor(t->d->customNegativeTextColor); q->setCustomNeutralTextColor(t->d->customNeutralTextColor); q->setCustomPositiveTextColor(t->d->customPositiveTextColor); q->setCustomBackgroundColor(t->d->customBackgroundColor); q->setCustomAlternateBackgroundColor(t->d->customAlternateBackgroundColor); q->setCustomHighlightColor(t->d->customHighlightColor); + q->setCustomActiveBackgroundColor(t->d->customActiveBackgroundColor); + q->setCustomLinkBackgroundColor(t->d->customLinkBackgroundColor); + q->setCustomVisitedLinkBackgroundColor(t->d->customVisitedLinkBackgroundColor); + q->setCustomNegativeBackgroundColor(t->d->customNegativeBackgroundColor); + q->setCustomNeutralBackgroundColor(t->d->customNeutralBackgroundColor); + q->setCustomPositiveBackgroundColor(t->d->customPositiveBackgroundColor); q->setCustomFocusColor(t->d->customFocusColor); q->setCustomHoverColor(t->d->customHoverColor); } break; } } } QColor PlatformThemePrivate::tint(const QColor &c1, const QColor &c2, qreal ratio) { qreal r = c1.redF() + (c2.redF() - c1.redF()) * ratio; qreal g = c1.greenF() + (c2.greenF() - c1.greenF()) * ratio; qreal b = c1.blueF() + (c2.blueF() - c1.blueF()) * ratio; return QColor::fromRgbF(r, g, b, 1); } void PlatformThemePrivate::emitCompressedColorChanged() { if (m_pendingColorChange) { return; } m_pendingColorChange = true; QMetaObject::invokeMethod(q, [this]() { syncCustomPalette(); emit q->colorsChanged(); m_pendingColorChange = false; }, Qt::QueuedConnection); } PlatformTheme::PlatformTheme(QObject *parent) : QObject(parent), d(new PlatformThemePrivate(this)) { d->findParentStyle(); if (QQuickItem *item = qobject_cast(parent)) { connect(item, &QQuickItem::windowChanged, this, [this]() { d->findParentStyle(); }); connect(item, &QQuickItem::parentChanged, this, [this]() { d->findParentStyle(); }); } d->m_init = false; //TODO: needs https://codereview.qt-project.org/#/c/206889/ for font changes } PlatformTheme::~PlatformTheme() { if (d->m_parentTheme) { d->m_parentTheme->d->m_childThemes.remove(this); } delete d; } void PlatformTheme::setColorSet(PlatformTheme::ColorSet colorSet) { if (d->m_colorSet == colorSet) { return; } d->m_colorSet = colorSet; for (PlatformTheme *t : qAsConst(d->m_childThemes)) { if (t->inherit()) { t->setColorSet(colorSet); } } if (!d->m_init) { emit colorSetChanged(colorSet); d->emitCompressedColorChanged(); } } PlatformTheme::ColorSet PlatformTheme::colorSet() const { return d->m_colorSet; } void PlatformTheme::setColorGroup(PlatformTheme::ColorGroup colorGroup) { if (d->m_colorGroup == colorGroup) { return; } d->m_colorGroup = colorGroup; for (PlatformTheme *t : qAsConst(d->m_childThemes)) { if (t->inherit()) { t->setColorGroup(colorGroup); } } if (!d->m_init) { emit colorGroupChanged(colorGroup); d->emitCompressedColorChanged(); } } PlatformTheme::ColorGroup PlatformTheme::colorGroup() const { return d->m_colorGroup; } bool PlatformTheme::inherit() const { return d->m_inherit; } void PlatformTheme::setInherit(bool inherit) { if (d->m_inherit == inherit) { return; } d->m_inherit = inherit; if (inherit && d->m_parentTheme) { setColorSet(d->m_parentTheme->colorSet()); } emit inheritChanged(inherit); } QColor PlatformTheme::textColor() const { return d->customTextColor.isValid() ? d->customTextColor : d->textColor; } QColor PlatformTheme::disabledTextColor() const { return d->customDisabledTextColor.isValid() ? d->customDisabledTextColor : d->disabledTextColor; } QColor PlatformTheme::highlightColor() const { return d->customHighlightColor.isValid() ? d->customHighlightColor : d->highlightColor; } QColor PlatformTheme::highlightedTextColor() const { return d->customHighlightedTextColor.isValid() ? d->customHighlightedTextColor : d->highlightedTextColor; } QColor PlatformTheme::backgroundColor() const { return d->customBackgroundColor.isValid() ? d->customBackgroundColor : d->backgroundColor; } QColor PlatformTheme::alternateBackgroundColor() const { return d->customAlternateBackgroundColor.isValid() ? d->customAlternateBackgroundColor : d->alternateBackgroundColor; } QColor PlatformTheme::activeTextColor() const { return d->customActiveTextColor.isValid() ? d->customActiveTextColor : d->activeTextColor; } +QColor PlatformTheme::activeBackgroundColor() const +{ + return d->customActiveBackgroundColor.isValid() ? d->customActiveBackgroundColor : d->activeBackgroundColor; +} + QColor PlatformTheme::linkColor() const { return d->customLinkColor.isValid() ? d->customLinkColor : d->linkColor; } +QColor PlatformTheme::linkBackgroundColor() const +{ + return d->customLinkBackgroundColor.isValid() ? d->customLinkBackgroundColor : d->linkBackgroundColor; +} + QColor PlatformTheme::visitedLinkColor() const { return d->customVisitedLinkColor.isValid() ? d->customVisitedLinkColor : d->visitedLinkColor; } +QColor PlatformTheme::visitedLinkBackgroundColor() const +{ + return d->customVisitedLinkBackgroundColor.isValid() ? d->customVisitedLinkBackgroundColor : d->visitedLinkBackgroundColor; +} + QColor PlatformTheme::negativeTextColor() const { return d->customNegativeTextColor.isValid() ? d->customNegativeTextColor : d->negativeTextColor; } +QColor PlatformTheme::negativeBackgroundColor() const +{ + return d->customNegativeBackgroundColor.isValid() ? d->customNegativeBackgroundColor : d->negativeBackgroundColor; +} + QColor PlatformTheme::neutralTextColor() const { return d->customNeutralTextColor.isValid() ? d->customNeutralTextColor : d->neutralTextColor; } +QColor PlatformTheme::neutralBackgroundColor() const +{ + return d->customNeutralBackgroundColor.isValid() ? d->customNeutralBackgroundColor : d->neutralBackgroundColor; +} + QColor PlatformTheme::positiveTextColor() const { return d->customPositiveTextColor.isValid() ? d->customPositiveTextColor : d->positiveTextColor; } +QColor PlatformTheme::positiveBackgroundColor() const +{ + return d->customPositiveBackgroundColor.isValid() ? d->customPositiveBackgroundColor : d->positiveBackgroundColor; +} + QColor PlatformTheme::focusColor() const { return d->customFocusColor.isValid() ? d->customFocusColor : d->focusColor; } QColor PlatformTheme::hoverColor() const { return d->customHoverColor.isValid() ? d->customHoverColor : d->hoverColor; } //setters for theme implementations void PlatformTheme::setTextColor(const QColor &color) { if (d->textColor == color) { return; } d->textColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setDisabledTextColor(const QColor &color) { if (d->disabledTextColor == color) { return; } d->disabledTextColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setBackgroundColor(const QColor &color) { if (d->backgroundColor == color) { return; } d->backgroundColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setAlternateBackgroundColor(const QColor &color) { if (d->alternateBackgroundColor == color) { return; } d->alternateBackgroundColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setHighlightColor(const QColor &color) { if (d->highlightColor == color) { return; } d->highlightColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setHighlightedTextColor(const QColor &color) { if (d->highlightedTextColor == color) { return; } d->highlightedTextColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setActiveTextColor(const QColor &color) { if (d->activeTextColor == color) { return; } d->activeTextColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setActiveBackgroundColor(const QColor &color) +{ + if (d->activeBackgroundColor == color) { + return; + } + + d->activeBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setLinkColor(const QColor &color) { if (d->linkColor == color) { return; } d->linkColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setLinkBackgroundColor(const QColor &color) +{ + if (d->linkBackgroundColor == color) { + return; + } + + d->linkBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setVisitedLinkColor(const QColor &color) { if (d->visitedLinkColor == color) { return; } d->visitedLinkColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setVisitedLinkBackgroundColor(const QColor &color) +{ + if (d->visitedLinkBackgroundColor == color) { + return; + } + + d->visitedLinkBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setNegativeTextColor(const QColor &color) { if (d->negativeTextColor == color) { return; } d->negativeTextColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setNegativeBackgroundColor(const QColor &color) +{ + if (d->negativeBackgroundColor == color) { + return; + } + + d->negativeBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setNeutralTextColor(const QColor &color) { if (d->neutralTextColor == color) { return; } d->neutralTextColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setNeutralBackgroundColor(const QColor &color) +{ + if (d->neutralBackgroundColor == color) { + return; + } + + d->neutralBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setPositiveTextColor(const QColor &color) { if (d->positiveTextColor == color) { return; } d->positiveTextColor = color; d->emitCompressedColorChanged(); } +void PlatformTheme::setPositiveBackgroundColor(const QColor &color) +{ + if (d->positiveBackgroundColor == color) { + return; + } + + d->positiveBackgroundColor = color; + d->emitCompressedColorChanged(); +} + void PlatformTheme::setHoverColor(const QColor &color) { if (d->hoverColor == color) { return; } d->hoverColor = color; d->emitCompressedColorChanged(); } void PlatformTheme::setFocusColor(const QColor &color) { if (d->focusColor == color) { return; } d->focusColor = color; d->emitCompressedColorChanged(); } QFont PlatformTheme::defaultFont() const { return d->font; } void PlatformTheme::setDefaultFont(const QFont &font) { if (d->font == font) { return; } d->font = font; emit defaultFontChanged(font); } #define PROPAGATECUSTOMCOLOR(colorName, color)\ for (PlatformTheme *t : qAsConst(d->m_childThemes)) {\ if (t->inherit()) {\ t->set##colorName(color);\ }\ } //setters for QML clients void PlatformTheme::setCustomTextColor(const QColor &color) { if (d->customTextColor == color) { return; } d->customTextColor = color; PROPAGATECUSTOMCOLOR(CustomTextColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomDisabledTextColor(const QColor &color) { if (d->customDisabledTextColor == color) { return; } d->customDisabledTextColor = color; PROPAGATECUSTOMCOLOR(CustomDisabledTextColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomBackgroundColor(const QColor &color) { if (d->customBackgroundColor == color) { return; } d->customBackgroundColor = color; PROPAGATECUSTOMCOLOR(CustomBackgroundColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomAlternateBackgroundColor(const QColor &color) { if (d->customAlternateBackgroundColor == color) { return; } d->customAlternateBackgroundColor = color; PROPAGATECUSTOMCOLOR(CustomAlternateBackgroundColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomHighlightColor(const QColor &color) { if (d->customHighlightColor == color) { return; } d->customHighlightColor = color; PROPAGATECUSTOMCOLOR(CustomHighlightColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomHighlightedTextColor(const QColor &color) { if (d->customHighlightedTextColor == color) { return; } d->customHighlightedTextColor = color; PROPAGATECUSTOMCOLOR(CustomHighlightedTextColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomActiveTextColor(const QColor &color) { if (d->customActiveTextColor == color) { return; } d->customActiveTextColor = color; PROPAGATECUSTOMCOLOR(CustomActiveTextColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomActiveBackgroundColor(const QColor &color) +{ + if (d->customActiveBackgroundColor == color) { + return; + } + + d->customActiveBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomActiveBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomLinkColor(const QColor &color) { if (d->customLinkColor == color) { return; } d->customLinkColor = color; PROPAGATECUSTOMCOLOR(CustomLinkColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomLinkBackgroundColor(const QColor &color) +{ + if (d->customLinkBackgroundColor == color) { + return; + } + + d->customLinkBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomLinkBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomVisitedLinkColor(const QColor &color) { if (d->customVisitedLinkColor == color) { return; } d->customVisitedLinkColor = color; PROPAGATECUSTOMCOLOR(CustomVisitedLinkColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomVisitedLinkBackgroundColor(const QColor &color) +{ + if (d->customVisitedLinkBackgroundColor == color) { + return; + } + + d->customVisitedLinkBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomVisitedLinkBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomNegativeTextColor(const QColor &color) { if (d->customNegativeTextColor == color) { return; } d->customNegativeTextColor = color; PROPAGATECUSTOMCOLOR(CustomNegativeTextColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomNegativeBackgroundColor(const QColor &color) +{ + if (d->customNegativeBackgroundColor == color) { + return; + } + + d->customNegativeBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomNegativeBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomNeutralTextColor(const QColor &color) { if (d->customNeutralTextColor == color) { return; } d->customNeutralTextColor = color; PROPAGATECUSTOMCOLOR(CustomNeutralTextColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomNeutralBackgroundColor(const QColor &color) +{ + if (d->customNeutralBackgroundColor == color) { + return; + } + + d->customNeutralBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomNeutralBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomPositiveTextColor(const QColor &color) { if (d->customPositiveTextColor == color) { return; } d->customPositiveTextColor = color; PROPAGATECUSTOMCOLOR(CustomPositiveTextColor, color) d->emitCompressedColorChanged(); } +void PlatformTheme::setCustomPositiveBackgroundColor(const QColor &color) +{ + if (d->customPositiveBackgroundColor == color) { + return; + } + + d->customPositiveBackgroundColor = color; + PROPAGATECUSTOMCOLOR(CustomPositiveBackgroundColor, color) + d->emitCompressedColorChanged(); +} + void PlatformTheme::setCustomHoverColor(const QColor &color) { if (d->customHoverColor == color) { return; } d->customHoverColor = color; PROPAGATECUSTOMCOLOR(CustomHoverColor, color) d->emitCompressedColorChanged(); } void PlatformTheme::setCustomFocusColor(const QColor &color) { if (d->customFocusColor == color) { return; } d->customFocusColor = color; PROPAGATECUSTOMCOLOR(CustomFocusColor, color) d->emitCompressedColorChanged(); } QPalette PlatformTheme::palette() const { //check the most important custom colors to decide to return a custom palette return d->customTextColor.isValid() || d->customBackgroundColor.isValid() || d->customHighlightColor.isValid() ? d->customPalette : d->palette; } void PlatformTheme::setPalette(const QPalette &palette) { if (d->palette == palette) { return; } d->palette = palette; PROPAGATECUSTOMCOLOR(Palette, palette) emit paletteChanged(palette); } QIcon PlatformTheme::iconFromTheme(const QString &name, const QColor &customColor) { Q_UNUSED(customColor); QIcon icon = QIcon::fromTheme(name); return icon; } bool PlatformTheme::supportsIconColoring() const { return d->m_supportsIconColoring; } void PlatformTheme::setSupportsIconColoring(bool support) { d->m_supportsIconColoring = support; } PlatformTheme *PlatformTheme::qmlAttachedProperties(QObject *object) { static bool s_factoryChecked = false; //check for the plugin only once: it's an heavy operation if (PlatformThemePrivate::s_pluginFactory) { return PlatformThemePrivate::s_pluginFactory->createPlatformTheme(object); } else if (!s_factoryChecked) { s_factoryChecked = true; #if QT_CONFIG(library) const auto libraryPaths = QCoreApplication::libraryPaths(); for (const QString &path : libraryPaths) { QDir dir(path + QStringLiteral("/kf5/kirigami")); const auto fileNames = dir.entryList(QDir::Files); for (const QString &fileName : fileNames) { //TODO: env variable? if (!QQuickStyle::name().isEmpty() && fileName.startsWith(QQuickStyle::name())) { QPluginLoader loader(dir.absoluteFilePath(fileName)); QObject *plugin = loader.instance(); //TODO: load actually a factory as plugin KirigamiPluginFactory *factory = qobject_cast(plugin); if (factory) { PlatformThemePrivate::s_pluginFactory = factory; return factory->createPlatformTheme(object); } } } } #endif } return new BasicTheme(object); } } #include "moc_platformtheme.cpp" diff --git a/src/libkirigami/platformtheme.h b/src/libkirigami/platformtheme.h index fdf2a815..3ed3ecbb 100644 --- a/src/libkirigami/platformtheme.h +++ b/src/libkirigami/platformtheme.h @@ -1,284 +1,331 @@ /* * Copyright (C) 2017 by Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef PLATFORMTHEME_H #define PLATFORMTHEME_H #include #include #include #include #ifndef KIRIGAMI_BUILD_TYPE_STATIC #include #endif namespace Kirigami { class PlatformThemePrivate; /** * @class PlatformTheme platformtheme.h PlatformTheme * * This class is the base for color management in Kirigami, * different platforms can reimplement this class to integrate with * system platform colors of a given platform */ #ifdef KIRIGAMI_BUILD_TYPE_STATIC class PlatformTheme : public QObject #else class KIRIGAMI2_EXPORT PlatformTheme : public QObject #endif { Q_OBJECT /** * This enumeration describes the color set for which a color is being selected. * * Color sets define a color "environment", suitable for drawing all parts of a * given region. Colors from different sets should not be combined. */ Q_PROPERTY(ColorSet colorSet READ colorSet WRITE setColorSet NOTIFY colorSetChanged) /** * This enumeration describes the color group used to generate the colors. * The enum value is based upon QPalette::CpolorGroup and has the same values. * It's redefined here in order to make it work with QML * @since 4.43 */ Q_PROPERTY(ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY colorGroupChanged) /** * If true, the colorSet will be inherited from the colorset of a theme of one * of the ancestor items * default: true */ Q_PROPERTY(bool inherit READ inherit WRITE setInherit NOTIFY inheritChanged) // foreground colors /** * Color for normal foregrounds, usually text, but not limited to it, * anything that should be painted with a clear contrast should use this color */ Q_PROPERTY(QColor textColor READ textColor WRITE setCustomTextColor RESET setCustomTextColor NOTIFY colorsChanged) /** * Foreground color for disabled areas, usually a mid-gray */ Q_PROPERTY(QColor disabledTextColor READ disabledTextColor WRITE setCustomDisabledTextColor RESET setCustomDisabledTextColor NOTIFY colorsChanged) /** * Color for text that has been highlighted, often is a light color while normal text is dark */ Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor WRITE setCustomHighlightedTextColor RESET setCustomHighlightedTextColor NOTIFY colorsChanged) /** * Foreground for areas that are active or requesting attention */ Q_PROPERTY(QColor activeTextColor READ activeTextColor WRITE setCustomActiveTextColor RESET setCustomActiveTextColor NOTIFY colorsChanged) /** * Color for links */ Q_PROPERTY(QColor linkColor READ linkColor WRITE setCustomLinkColor RESET setCustomLinkColor NOTIFY colorsChanged) /** * Color for visited links, usually a bit darker than linkColor */ Q_PROPERTY(QColor visitedLinkColor READ visitedLinkColor WRITE setCustomVisitedLinkColor RESET setCustomVisitedLinkColor NOTIFY colorsChanged) /** * Foreground color for negative areas, such as critical error text */ Q_PROPERTY(QColor negativeTextColor READ negativeTextColor WRITE setCustomNegativeTextColor RESET setCustomNegativeTextColor NOTIFY colorsChanged) /** * Foreground color for neutral areas, such as warning texts (but not critical) */ Q_PROPERTY(QColor neutralTextColor READ neutralTextColor WRITE setCustomNeutralTextColor RESET setCustomNeutralTextColor NOTIFY colorsChanged) /** * Success messages, trusted content */ Q_PROPERTY(QColor positiveTextColor READ positiveTextColor WRITE setCustomPositiveTextColor RESET setCustomPositiveTextColor NOTIFY colorsChanged) //background colors /** * The generic background color */ Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setCustomBackgroundColor RESET setCustomBackgroundColor NOTIFY colorsChanged) /** * The generic background color * Alternate background; for example, for use in lists. * This color may be the same as BackgroundNormal, * especially in sets other than View and Window. */ Q_PROPERTY(QColor alternateBackgroundColor READ alternateBackgroundColor WRITE setCustomAlternateBackgroundColor RESET setCustomAlternateBackgroundColor NOTIFY colorsChanged) /** * The background color for selected areas */ Q_PROPERTY(QColor highlightColor READ highlightColor WRITE setCustomHighlightColor RESET setCustomHighlightColor NOTIFY colorsChanged) + /** + * Background for areas that are active or requesting attention + */ + Q_PROPERTY(QColor activeBackgroundColor READ activeBackgroundColor WRITE setCustomActiveBackgroundColor RESET setCustomActiveBackgroundColor NOTIFY colorsChanged) + + /** + * Background color for links + */ + Q_PROPERTY(QColor linkBackgroundColor READ linkBackgroundColor WRITE setCustomLinkBackgroundColor RESET setCustomLinkBackgroundColor NOTIFY colorsChanged) + + /** + * Background color for visited links, usually a bit darker than linkBackgroundColor + */ + Q_PROPERTY(QColor visitedLinkBackgroundColor READ visitedLinkBackgroundColor WRITE setCustomVisitedLinkBackgroundColor RESET setCustomVisitedLinkBackgroundColor NOTIFY colorsChanged) + + /** + * Background color for negative areas, such as critical errors and destructive actions + */ + Q_PROPERTY(QColor negativeBackgroundColor READ negativeBackgroundColor WRITE setCustomNegativeBackgroundColor RESET setCustomNegativeBackgroundColor NOTIFY colorsChanged) + + /** + * Background color for neutral areas, such as warnings (but not critical) + */ + Q_PROPERTY(QColor neutralBackgroundColor READ neutralBackgroundColor WRITE setCustomNeutralBackgroundColor RESET setCustomNeutralBackgroundColor NOTIFY colorsChanged) + + /** + * Background color for positive areas, such as success messages and trusted content + */ + Q_PROPERTY(QColor positiveBackgroundColor READ positiveBackgroundColor WRITE setCustomPositiveBackgroundColor RESET setCustomPositiveBackgroundColor NOTIFY colorsChanged) + //decoration colors /** * A decoration color that indicates active focus */ Q_PROPERTY(QColor focusColor READ focusColor WRITE setCustomFocusColor RESET setCustomFocusColor NOTIFY colorsChanged) /** * A decoration color that indicates mouse hovering */ Q_PROPERTY(QColor hoverColor READ hoverColor WRITE setCustomHoverColor RESET setCustomHoverColor NOTIFY colorsChanged) // font and palette Q_PROPERTY(QFont defaultFont READ defaultFont NOTIFY defaultFontChanged) //Active palette Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) public: enum ColorSet { View = 0, /** Color set for item views, usually the lightest of all */ Window, /** Default Color set for windows and "chrome" areas */ Button, /** Color set used by buttons */ Selection, /** Color set used by selectged areas */ Tooltip, /** Color set used by tooltips */ Complementary /** Color set meant to be complementary to Window: usually is a dark theme for light themes */ }; Q_ENUM(ColorSet) enum ColorGroup { Disabled = QPalette::Disabled, Active = QPalette::Active, Inactive = QPalette::Inactive, Normal = QPalette::Normal }; Q_ENUM(ColorGroup) explicit PlatformTheme(QObject *parent = nullptr); ~PlatformTheme(); void setColorSet(PlatformTheme::ColorSet); PlatformTheme::ColorSet colorSet() const; void setColorGroup(PlatformTheme::ColorGroup); PlatformTheme::ColorGroup colorGroup() const; bool inherit() const; void setInherit(bool inherit); //foreground colors QColor textColor() const; QColor disabledTextColor() const; QColor highlightedTextColor() const; QColor activeTextColor() const; QColor linkColor() const; QColor visitedLinkColor() const; QColor negativeTextColor() const; QColor neutralTextColor() const; QColor positiveTextColor() const; //background colors QColor backgroundColor() const; QColor alternateBackgroundColor() const; QColor highlightColor() const; - //TODO: add active/positive/neutral/negative backgrounds? + QColor activeBackgroundColor() const; + QColor linkBackgroundColor() const; + QColor visitedLinkBackgroundColor() const; + QColor negativeBackgroundColor() const; + QColor neutralBackgroundColor() const; + QColor positiveBackgroundColor() const; //decoration colors QColor focusColor() const; QColor hoverColor() const; QFont defaultFont() const; //this may is used by the desktop QQC2 to set the styleoption palettes QPalette palette() const; //this will be used by desktopicon to fetch icons with KIconLoader virtual Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent); bool supportsIconColoring() const; //foreground colors void setCustomTextColor(const QColor &color = QColor()); void setCustomDisabledTextColor(const QColor &color = QColor()); void setCustomHighlightedTextColor(const QColor &color = QColor()); void setCustomActiveTextColor(const QColor &color = QColor()); void setCustomLinkColor(const QColor &color = QColor()); void setCustomVisitedLinkColor(const QColor &color = QColor()); void setCustomNegativeTextColor(const QColor &color = QColor()); void setCustomNeutralTextColor(const QColor &color = QColor()); void setCustomPositiveTextColor(const QColor &color = QColor()); //background colors void setCustomBackgroundColor(const QColor &color = QColor()); void setCustomAlternateBackgroundColor(const QColor &color = QColor()); void setCustomHighlightColor(const QColor &color = QColor()); + void setCustomActiveBackgroundColor(const QColor &color = QColor()); + void setCustomLinkBackgroundColor(const QColor &color = QColor()); + void setCustomVisitedLinkBackgroundColor(const QColor &color = QColor()); + void setCustomNegativeBackgroundColor(const QColor &color = QColor()); + void setCustomNeutralBackgroundColor(const QColor &color = QColor()); + void setCustomPositiveBackgroundColor(const QColor &color = QColor()); //decoration colors void setCustomFocusColor(const QColor &color = QColor()); void setCustomHoverColor(const QColor &color = QColor()); //QML attached property static PlatformTheme *qmlAttachedProperties(QObject *object); Q_SIGNALS: //TODO: parameters to signals as this is also a c++ api void colorsChanged(); void defaultFontChanged(const QFont &font); void colorSetChanged(Kirigami::PlatformTheme::ColorSet colorSet); void colorGroupChanged(Kirigami::PlatformTheme::ColorGroup colorGroup); void paletteChanged(const QPalette &pal); void inheritChanged(bool inherit); protected: //Setters, not accessible from QML but from implementations void setSupportsIconColoring(bool support); //foreground colors void setTextColor(const QColor &color); void setDisabledTextColor(const QColor &color); void setHighlightedTextColor(const QColor &color); void setActiveTextColor(const QColor &color); void setLinkColor(const QColor &color); void setVisitedLinkColor(const QColor &color); void setNegativeTextColor(const QColor &color); void setNeutralTextColor(const QColor &color); void setPositiveTextColor(const QColor &color); //background colors void setBackgroundColor(const QColor &color); void setAlternateBackgroundColor(const QColor &color); void setHighlightColor(const QColor &color); + void setActiveBackgroundColor(const QColor &color); + void setLinkBackgroundColor(const QColor &color); + void setVisitedLinkBackgroundColor(const QColor &color); + void setNegativeBackgroundColor(const QColor &color); + void setNeutralBackgroundColor(const QColor &color); + void setPositiveBackgroundColor(const QColor &color); //decoration colors void setFocusColor(const QColor &color); void setHoverColor(const QColor &color); void setDefaultFont(const QFont &defaultFont); void setPalette(const QPalette &palette); private: PlatformThemePrivate *d; friend class PlatformThemePrivate; }; } QML_DECLARE_TYPEINFO(Kirigami::PlatformTheme, QML_HAS_ATTACHED_PROPERTIES) #endif // PLATFORMTHEME_H diff --git a/src/styles/Material/Theme.qml b/src/styles/Material/Theme.qml index 04d472a5..b5293544 100644 --- a/src/styles/Material/Theme.qml +++ b/src/styles/Material/Theme.qml @@ -1,111 +1,117 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.7 import QtQuick.Controls.Material 2.0 import org.kde.kirigami 2.4 as Kirigami pragma Singleton QtObject { id: theme //NOTE: this is useless per se, but it forces the Material attached property to be created Material.elevation:2 property color textColor: theme.Material.foreground onTextColorChanged: theme.Material.foreground = textColor property color disabledTextColor: "#9931363b" property color highlightColor: theme.Material.accent onHighlightColorChanged: theme.Material.accent = highlightColor //FIXME: something better? property color highlightedTextColor: theme.Material.background property color backgroundColor: theme.Material.background property color alternateBackgroundColor: Qt.darker(theme.Material.background, 1.05) property color activeTextColor: theme.Material.primary + property color activeBackgroundColor: theme.Material.primary property color linkColor: "#2980B9" + property color linkBackgroundColor: "#2980B9" property color visitedLinkColor: "#7F8C8D" + property color visitedLinkBackgroundColor: "#7F8C8D" property color hoverColor: theme.Material.highlightedButtonColor property color focusColor: theme.Material.highlightedButtonColor property color negativeTextColor: "#DA4453" + property color negativeBackgroundColor: "#DA4453" property color neutralTextColor: "#F67400" + property color neutralBackgroundColor: "#F67400" property color positiveTextColor: "#27AE60" + property color positiveBackgroundColor: "#27AE60" property color buttonTextColor: theme.Material.foreground property color buttonBackgroundColor: theme.Material.buttonColor property color buttonAlternateBackgroundColor: Qt.darker(theme.Material.buttonColor, 1.05) property color buttonHoverColor: theme.Material.highlightedButtonColor property color buttonFocusColor: theme.Material.highlightedButtonColor property color viewTextColor: theme.Material.foreground property color viewBackgroundColor: theme.Material.dialogColor property color viewAlternateBackgroundColor: Qt.darker(theme.Material.dialogColor, 1.05) property color viewHoverColor: theme.Material.listHighlightColor property color viewFocusColor: theme.Material.listHighlightColor property color selectionTextColor: theme.Material.primaryHighlightedTextColor property color selectionBackgroundColor: theme.Material.textSelectionColor property color selectionAlternateBackgroundColor: Qt.darker(theme.Material.textSelectionColor, 1.05) property color selectionHoverColor: theme.Material.highlightedButtonColor property color selectionFocusColor: theme.Material.highlightedButtonColor property color tooltipTextColor: fontMetrics.Material.foreground property color tooltipBackgroundColor: fontMetrics.Material.tooltipColor property color tooltipAlternateBackgroundColor: Qt.darker(theme.Material.tooltipColor, 1.05) property color tooltipHoverColor: fontMetrics.Material.highlightedButtonColor property color tooltipFocusColor: fontMetrics.Material.highlightedButtonColor property color complementaryTextColor: fontMetrics.Material.foreground property color complementaryBackgroundColor: fontMetrics.Material.background property color complementaryAlternateBackgroundColor: Qt.lighter(fontMetrics.Material.background, 1.05) property color complementaryHoverColor: theme.Material.highlightedButtonColor property color complementaryFocusColor: theme.Material.highlightedButtonColor property font defaultFont: fontMetrics.font property list children: [ TextMetrics { id: fontMetrics //this is to get a source of dark colors Material.theme: Material.Dark } ] //for internal use function __propagateColorSet(object, context) { //TODO: actually check if it's a dark or light color if (context === Kirigami.Theme.Complementary) { object.Material.theme = Material.Dark; } else { object.Material.theme = Material.Light; } } function __propagateTextColor(object, color) { object.Material.foreground = color; } function __propagateBackgroundColor(object, color) { object.Material.background = color; } function __propagatePrimaryColor(object, color) { object.Material.primary = color; } function __propagateAccentColor(object, color) { object.Material.accent = color; } } diff --git a/src/styles/org.kde.desktop/Theme.qml b/src/styles/org.kde.desktop/Theme.qml index 3a102992..3eb54fdf 100644 --- a/src/styles/org.kde.desktop/Theme.qml +++ b/src/styles/org.kde.desktop/Theme.qml @@ -1,96 +1,102 @@ /* * Copyright 2015 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.4 pragma Singleton QtObject { id: theme property color textColor: palette.windowText property color disabledTextColor: disabledPalette.windowText property color highlightColor: palette.highlight property color highlightedTextColor: palette.highlightedText property color backgroundColor: palette.window property color alternateBackgroundColor: Qt.darker(palette.window, 1.05) property color activeTextColor: palette.highlight + property color activeBackgroundColor: palette.highlight property color linkColor: "#2980B9" + property color linkBackgroundColor: "#2980B9" property color visitedLinkColor: "#7F8C8D" + property color visitedLinkBackgroundColor: "#7F8C8D" property color hoverColor: palette.highlight property color focusColor: palette.highlight property color negativeTextColor: "#DA4453" + property color negativeBackgroundColor: "#DA4453" property color neutralTextColor: "#F67400" + property color neutralBackgroundColor: "#F67400" property color positiveTextColor: "#27AE60" + property color positiveBackgroundColor: "#27AE60" property color buttonTextColor: palette.buttonText property color buttonBackgroundColor: palette.button property color buttonAlternateBackgroundColor: Qt.darker(palette.button, 1.05) property color buttonHoverColor: palette.highlight property color buttonFocusColor: palette.highlight property color viewTextColor: palette.text property color viewBackgroundColor: palette.base property color viewAlternateBackgroundColor: palette.alternateBase property color viewHoverColor: palette.highlight property color viewFocusColor: palette.highlight property color selectionTextColor: palette.highlightedText property color selectionBackgroundColor: palette.highlight property color selectionAlternateBackgroundColor: Qt.darker(palette.highlight, 1.05) property color selectionHoverColor: palette.highlight property color selectionFocusColor: palette.highlight property color tooltipTextColor: palette.base property color tooltipBackgroundColor: palette.text property color tooltipAlternateBackgroundColor: Qt.darker(palette.text, 1.05) property color tooltipHoverColor: palette.highlight property color tooltipFocusColor: palette.highlight property color complementaryTextColor: palette.base property color complementaryBackgroundColor: palette.text property color complementaryAlternateBackgroundColor: Qt.darker(palette.text, 1.05) property color complementaryHoverColor: palette.highlight property color complementaryFocusColor: palette.highlight property font defaultFont: fontMetrics.font property list children: [ TextMetrics { id: fontMetrics }, SystemPalette { id: palette colorGroup: SystemPalette.Active }, SystemPalette { id: disabledPalette colorGroup: SystemPalette.Disabled } ] function __propagateColorSet(object, context) {} function __propagateTextColor(object, color) {} function __propagateBackgroundColor(object, color) {} function __propagatePrimaryColor(object, color) {} function __propagateAccentColor(object, color) {} }