Skip to content

Commit af1488f

Browse files
committed
Merge remote-tracking branch 'upsteam/develop' into develop
2 parents 492952a + 175375b commit af1488f

File tree

16 files changed

+62
-26
lines changed

16 files changed

+62
-26
lines changed

src/components/ThinDivider.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
import QtQuick 2.4
12+
import Material 0.3
1213

1314
/*!
1415
\qmltype ThinDivider
@@ -22,6 +23,8 @@ Rectangle {
2223
right: parent.right
2324
}
2425

25-
color: Qt.rgba(0,0,0,0.1)
26+
property bool darkBackground
27+
28+
color: darkBackground ? Theme.dark.hintColor : Theme.light.hintColor
2629
height: 1
2730
}

src/core/Icon.qml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ Item {
6363
} else if (icon.source.indexOf('icon://') === 0) {
6464
var name = icon.source.substring(7)
6565

66-
if (name)
67-
return "qrc:/icons/" + name + '.svg'
68-
else
66+
if (name) {
67+
if (Theme.iconsRoot.indexOf('qrc') != -1)
68+
return Theme.iconsRoot + '/' + name + '.svg'
69+
else
70+
return Theme.iconsRoot + '/' + name.replace('/', '_') + '.svg'
71+
} else {
6972
return ""
73+
}
7074
} else {
7175
return icon.source
7276
}

src/core/Theme.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ Object {
7979
light: false
8080
}
8181

82+
property string iconsRoot: "qrc:/icons"
83+
8284
/*!
8385
A utility method for changing the alpha on colors. Returns a new object, and does not modify
8486
the original color at all.

src/core/ThemePalette.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ QtObject {
2828
readonly property color textColor: light ? shade(0.7) : shade(1)
2929
readonly property color subTextColor: light ? shade(0.54) : shade(0.70)
3030
readonly property color iconColor: light ? subTextColor : textColor
31-
readonly property color hintColor: light ? shade(0.26) : shade(0.30)
31+
readonly property color disabledColor: light ? shade(0.38) : shade(0.50)
32+
readonly property color hintColor: disabledColor
3233
readonly property color dividerColor: shade(0.12)
3334

3435
/*!

src/core/device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ QString Device::iconName() const
8383
case TV:
8484
return "hardware/tv";
8585
case Unknown:
86+
default:
8687
return "hardware/computer";
8788
}
8889
}

src/core/units.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define DEFAULT_DPI 72
2121

2222
UnitsAttached::UnitsAttached(QObject *attachee)
23-
: QObject(attachee), m_screen(nullptr), m_window(nullptr), m_multiplier(1), m_dpi(0)
23+
: QObject(attachee), m_screen(nullptr), m_window(nullptr), m_dpi(0), m_multiplier(1)
2424
{
2525
m_attachee = qobject_cast<QQuickItem *>(attachee);
2626

src/extras/CircleImage.qml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,8 @@ Item {
3434
mipmap: true
3535
}
3636

37-
Extras.Image {
38-
id: mask
39-
source: Qt.resolvedUrl("images/circle.png")
40-
anchors.fill: image
41-
smooth: true
42-
visible: false
43-
mipmap: true
44-
}
45-
46-
OpacityMask {
37+
CircleMask {
4738
anchors.fill: image
4839
source: image
49-
maskSource: mask
5040
}
5141
}

src/extras/circle.png

-25.4 KB
Binary file not shown.

src/listitems/BaseListItem.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ View {
2626
right: parent ? parent.right : undefined
2727
}
2828

29+
property bool darkBackground
2930
property int margins: 16 * Units.dp
3031

3132
property bool selected
@@ -44,6 +45,7 @@ View {
4445
anchors.leftMargin: dividerInset
4546

4647
visible: showDivider
48+
darkBackground: listItem.darkBackground
4749
}
4850

4951
Ink {

src/listitems/Divider.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ Item {
2525
right: parent.right
2626
}
2727

28+
property bool darkBackground
29+
2830
height: 16 * Units.dp
2931

3032
ThinDivider {
3133
anchors.verticalCenter: parent.verticalCenter
34+
darkBackground: divider.darkBackground
3235
}
3336
}

0 commit comments

Comments
 (0)