Changeset View
Changeset View
Standalone View
Standalone View
src/styles/Material/Theme.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2015 Marco Martin <mart@kde.org> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU Library General Public License as | ||||
6 | * published by the Free Software Foundation; either version 2, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU Library General Public License for more details | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU Library General Public | ||||
15 | * License along with this program; if not, write to the | ||||
16 | * Free Software Foundation, Inc., | ||||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | import QtQuick 2.7 | ||||
21 | import QtQuick.Controls.Material 2.0 | ||||
22 | | ||||
23 | pragma Singleton | ||||
24 | | ||||
25 | | ||||
26 | QtObject { | ||||
27 | id: theme | ||||
28 | | ||||
29 | property color textColor: theme.Material.foreground | ||||
30 | onTextColorChanged: theme.Material.foreground = textColor | ||||
31 | property color disabledTextColor: "#9931363b" | ||||
32 | | ||||
33 | property color highlightColor: theme.Material.accent | ||||
34 | onHighlightColorChanged: theme.Material.accent = highlightColor | ||||
35 | //FIXME: something better? | ||||
36 | property color highlightedTextColor: theme.Material.background | ||||
37 | property color backgroundColor: theme.Material.background | ||||
38 | property color linkColor: "#2196F3" | ||||
39 | property color visitedLinkColor: "#2196F3" | ||||
40 | | ||||
41 | property color buttonTextColor: theme.Material.foreground | ||||
42 | property color buttonBackgroundColor: theme.Material.buttonColor | ||||
43 | property color buttonHoverColor: theme.Material.highlightedButtonColor | ||||
44 | property color buttonFocusColor: theme.Material.highlightedButtonColor | ||||
45 | | ||||
46 | property color viewTextColor: theme.Material.foreground | ||||
47 | property color viewBackgroundColor: theme.Material.dialogColor | ||||
48 | property color viewHoverColor: theme.Material.listHighlightColor | ||||
49 | property color viewFocusColor: theme.Material.listHighlightColor | ||||
50 | | ||||
51 | property font defaultFont: fontMetrics.font | ||||
52 | | ||||
53 | property list<QtObject> children: [ | ||||
54 | TextMetrics { | ||||
55 | id: fontMetrics | ||||
56 | } | ||||
57 | ] | ||||
58 | } |