Skip to content

Commit 21c9139

Browse files
authored
Merge pull request #46 from nemomobile-ux/tests
Add missing test
2 parents 91f4923 + f92fcf8 commit 21c9139

File tree

110 files changed

+1402
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1402
-140
lines changed

src/controls/qml/GlacierRollerItem.qml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
2+
* Copyright (C) 2018-2025 Chupligin Sergey <neochapay@gmail.com>
33
*
44
* This library is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU Library General Public
@@ -17,7 +17,7 @@
1717
* Boston, MA 02110-1301, USA.
1818
*/
1919

20-
import QtQuick 2.6
20+
import QtQuick
2121

2222
Rectangle{
2323
id: glacierRollerItem
@@ -38,12 +38,12 @@ Rectangle{
3838

3939
Image{
4040
id: arrowDown
41-
source: "images/glacierroller-icon-arrow-down.svg"
41+
source: "qrc://images/glacierroller-icon-arrow-down.svg"
4242
height: parent.height / 3
4343
sourceSize.width: width
4444
sourceSize.height: height
4545

46-
visible: glacierRollerItem.parent.showRow
46+
visible: glacierRollerItem.parent.showRow == undefined ? false : glacierRollerItem.parent.showRow
4747
fillMode: Image.PreserveAspectFit
4848
anchors{
4949
verticalCenter: glacierRollerItem.verticalCenter

src/controls/qml/Header.qml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2023 Chupligin Sergey <neochapay@gmail.com>
2+
* Copyright (C) 2018-2025 Chupligin Sergey <neochapay@gmail.com>
33
*
44
* This library is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU Library General Public
@@ -77,7 +77,7 @@ Item {
7777
//having width/height as PropertyChanges avoids creating binding loops
7878
PropertyChanges {
7979
target: header
80-
width: parent.width
80+
width: parent ? parent.width : 0
8181
//the height of the drawer in portrait is limited by the size of the shorter edge of the screen
8282
height: toolBarRect.height + drawer.height
8383
}
@@ -112,7 +112,7 @@ Item {
112112
PropertyChanges {
113113
target: header
114114
width: toolBarRect.width + drawer.width
115-
height: parent.height
115+
height: parent ? parent.height : 0
116116
}
117117
PropertyChanges {
118118
target: toolBarRect
@@ -332,6 +332,13 @@ Item {
332332
anchors.top: parent.top
333333
visible: drawerContainer.height > 0 && -header.y == drawerContainer.height
334334
}
335+
336+
Connections{
337+
target: appWindow.pageStack
338+
function onDepthChanged() {
339+
toolsIndicator.started = false
340+
}
341+
}
335342
}
336343

337344
Item {

src/controls/qml/HeaderToolsIndicator.qml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2022 Chupligin Sergey <neochapay@gmail.com>
2+
* Copyright (C) 2018-2025 Chupligin Sergey <neochapay@gmail.com>
33
*
44
* This library is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU Library General Public
@@ -17,8 +17,8 @@
1717
* Boston, MA 02110-1301, USA.
1818
*/
1919

20-
import QtQuick 2.6
21-
import QtQuick.Window 2.0
20+
import QtQuick
21+
import QtQuick.Window
2222
import QtQuick.Controls
2323

2424
import Nemo
@@ -64,11 +64,4 @@ Rectangle{
6464
indicateToolsAnimation.start()
6565
}
6666
}
67-
68-
Connections{
69-
target: pageStack
70-
function onDepthChanged() {
71-
toolsIndicator.started = false
72-
}
73-
}
7467
}

src/controls/qml/HeaderToolsLayout.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Item {
7979
id: titleTxt
8080
FontLoader {
8181
id: localFont
82-
source: Theme.fontPath
82+
source: "file://"+Theme.fontPath
8383
}
8484
anchors{
8585
right: toolButtonsContainer.left

src/controls/qml/ListViewItemWithActions.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Item {
5252

5353
sourceSize.width: width
5454
sourceSize.height: height
55-
source: (icon != "") ? icon : iconVisible ? "images/listview-icon-template-s.svg" : ""
55+
source: (icon != "") ? icon : iconVisible ? "qrc://images/listview-icon-template-s.svg" : ""
5656
fillMode: Image.PreserveAspectFit
5757
}
5858

@@ -242,7 +242,7 @@ Item {
242242
sourceSize.width: width
243243
sourceSize.height: height
244244

245-
source: "images/listview-icon-arrow.svg?" + Theme.textColor
245+
source: "qrc://images/listview-icon-arrow.svg?" + Theme.textColor
246246
visible: showNext
247247
}
248248

src/controls/qml/ScrollDecorator.qml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
**
3030
****************************************************************************************/
3131

32-
import QtQuick 2.6
32+
import QtQuick
3333
import QtQuick.Controls
3434

3535
import Nemo
@@ -40,15 +40,15 @@ Rectangle{
4040

4141
property var flickable
4242

43-
visible: (flickable.contentHeight > flickable.height)
43+
visible: flickable ? (flickable.contentHeight > flickable.height) : false
4444
color: Theme.accentColor
4545

4646
width: Theme.itemSpacingExtraSmall
47-
height: flickable.height*flickable.height/flickable.contentHeight
48-
y: (flickable.height)/flickable.contentHeight*flickable.contentY
47+
height: visible ? flickable.height*flickable.height/flickable.contentHeight : 0
48+
y: visible ? (flickable.height)/flickable.contentHeight*flickable.contentY : 0
4949

5050
anchors{
51-
right: flickable.right
51+
right: visible ? flickable.right : undefined
5252
rightMargin: Theme.itemSpacingExtraSmall / 2
5353
}
5454
}

src/controls/qml/Slider.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Chupligin Sergey <neochapay@gmail.com>
2+
* Copyright (C) 2021-2025 Chupligin Sergey <neochapay@gmail.com>
33
*
44
* This library is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU Library General Public
@@ -52,7 +52,7 @@ Slider {
5252
id: disabledImg
5353
anchors.fill: parent
5454
visible: !control.enabled
55-
source: "images/disabled-overlay.png"
55+
source: "qrc://images/disabled-overlay.png"
5656
fillMode: Image.Tile
5757
}
5858
}

src/controls/qml/TabButton.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/****************************************************************************************
22
**
3-
** Copyright (C) 2023 Chupligin Sergey <neochapay@gmail.com>
3+
** Copyright (C) 2023-2025 Chupligin Sergey <neochapay@gmail.com>
44
** All rights reserved.
55
**
66
** You may use this file under the terms of BSD license as follows:
@@ -56,7 +56,7 @@ TabButton {
5656
contentItem: Text {
5757
FontLoader {
5858
id: localFont
59-
source: Theme.fontPath
59+
source: "file://"+Theme.fontPath
6060
}
6161
font.family: localFont.font.family
6262
font.styleName: localFont.font.styleName

src/controls/qml/TextField.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ TextField {
4747

4848
FontLoader {
4949
id: localFont
50-
source: Theme.fontPath
50+
source: "file://"+Theme.fontPath
5151
}
5252

5353
onActiveFocusChanged: {
@@ -70,7 +70,7 @@ TextField {
7070
Image {
7171
anchors.fill: parent
7272
visible: !control.enabled
73-
source: "images/disabled-overlay-inverse.png"
73+
source: "qrc://images/disabled-overlay-inverse.png"
7474
fillMode: Image.Tile
7575
}
7676
Rectangle {

src/controls/qml/ToolButton.qml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
**
3030
****************************************************************************************/
3131

32-
import QtQuick 2.6
32+
import QtQuick
3333
import QtQuick.Controls
3434

3535
import Nemo
3636
import Nemo.Controls
3737

3838
Item {
3939
id: toolButton
40-
property string iconSource
40+
property string iconSource: "images/no-icon.png"
4141
property bool showCounter: false
4242
property bool showZeroCounter: false
4343
property bool active: false
@@ -46,7 +46,7 @@ Item {
4646
signal clicked()
4747

4848
width: height
49-
height: parent.height
49+
height: parent ? parent.height : 0
5050

5151
Image {
5252
id: iconImage
@@ -55,7 +55,7 @@ Item {
5555
anchors.centerIn: parent
5656
fillMode: Image.PreserveAspectFit
5757
anchors.margins: Theme.itemSpacingExtraSmall
58-
source: toolButton.iconSource + "?" + ( active ? Theme.accentColor : Theme.textColor)
58+
source: "qrc://" + toolButton.iconSource + "?" + ( active ? Theme.accentColor : Theme.textColor)
5959
}
6060

6161
Rectangle{
@@ -80,7 +80,7 @@ Item {
8080
id: counterText
8181
FontLoader {
8282
id: localFont
83-
source: Theme.fontPath
83+
source: "file://"+Theme.fontPath
8484
}
8585
font.family: localFont.font.family
8686
font.styleName: localFont.font.styleName

0 commit comments

Comments
 (0)