diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-02-03 13:35:53 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-02-03 13:36:35 +0100 |
commit | 38b808f830f9c0ef4ee4068d93379e14e39c1988 (patch) | |
tree | f2a36cbee801c516c590351e7d1f498c0a08023f /src | |
parent | 6d6cace9ee25fb96fed91321ddb0e99652676823 (diff) | |
parent | 31803eb51bb2dde55776317b678d48d76f0e27fe (diff) | |
download | qtquickcontrols-38b808f830f9c0ef4ee4068d93379e14e39c1988.tar.gz |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I8dbf36b760f72a60b745197367b812185ead8133
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/Private/CalendarHeaderModel.qml | 29 | ||||
-rw-r--r-- | src/controls/Private/EditMenu_base.qml | 6 | ||||
-rw-r--r-- | src/controls/Private/HoverButton.qml | 5 | ||||
-rw-r--r-- | src/controls/Styles/Base/ButtonStyle.qml | 4 | ||||
-rw-r--r-- | src/controls/Styles/Base/CheckBoxStyle.qml | 4 | ||||
-rw-r--r-- | src/controls/TabView.qml | 1 | ||||
-rw-r--r-- | src/controls/TableView.qml | 1 | ||||
-rw-r--r-- | src/controls/qmldir | 1 |
8 files changed, 39 insertions, 12 deletions
diff --git a/src/controls/Private/CalendarHeaderModel.qml b/src/controls/Private/CalendarHeaderModel.qml index ef57e65b..8adfcc1a 100644 --- a/src/controls/Private/CalendarHeaderModel.qml +++ b/src/controls/Private/CalendarHeaderModel.qml @@ -68,6 +68,28 @@ ListModel { */ property var locale + ListElement { + dayOfWeek: Locale.Sunday + } + ListElement { + dayOfWeek: Locale.Monday + } + ListElement { + dayOfWeek: Locale.Tuesday + } + ListElement { + dayOfWeek: Locale.Wednesday + } + ListElement { + dayOfWeek: Locale.Thursday + } + ListElement { + dayOfWeek: Locale.Friday + } + ListElement { + dayOfWeek: Locale.Saturday + } + Component.onCompleted: { var daysOfWeek = [Locale.Sunday, Locale.Monday, Locale.Tuesday, Locale.Wednesday, Locale.Thursday, Locale.Friday, Locale.Saturday]; @@ -76,9 +98,10 @@ ListModel { var shifted = daysOfWeek.splice(firstDayOfWeek, daysOfWeek.length - firstDayOfWeek); daysOfWeek = shifted.concat(daysOfWeek) - for (var i = 0; i < daysOfWeek.length; ++i) { - var element = { dayOfWeek: daysOfWeek[i] } - root.append(element); + if (firstDayOfWeek !== Locale.Sunday) { + for (var i = 0; i < daysOfWeek.length; ++i) { + root.setProperty(i, "dayOfWeek", daysOfWeek[i]); + } } } } diff --git a/src/controls/Private/EditMenu_base.qml b/src/controls/Private/EditMenu_base.qml index 354b9c66..0078c895 100644 --- a/src/controls/Private/EditMenu_base.qml +++ b/src/controls/Private/EditMenu_base.qml @@ -70,7 +70,7 @@ Item { Component { id: cutAction Action { - text: "Cu&t" + text: qsTr("Cu&t") shortcut: StandardKey.Cut iconName: "edit-cut" enabled: !input.readOnly && selectionStart !== selectionEnd @@ -84,7 +84,7 @@ Item { Component { id: copyAction Action { - text: "&Copy" + text: qsTr("&Copy") shortcut: StandardKey.Copy iconName: "edit-copy" enabled: input.selectionStart !== input.selectionEnd @@ -98,7 +98,7 @@ Item { Component { id: pasteAction Action { - text: "&Paste" + text: qsTr("&Paste") shortcut: StandardKey.Paste iconName: "edit-paste" enabled: input.canPaste diff --git a/src/controls/Private/HoverButton.qml b/src/controls/Private/HoverButton.qml index 1b79e087..964d30d3 100644 --- a/src/controls/Private/HoverButton.qml +++ b/src/controls/Private/HoverButton.qml @@ -62,9 +62,10 @@ Item { Image { id: image - width: implicitWidth/2 - height: implicitHeight/2 + width: Math.min(implicitWidth, parent.width * 0.4) + height: Math.min(implicitHeight, parent.height * 0.4) anchors.centerIn: parent + fillMode: Image.PreserveAspectFit opacity: 0.6 } diff --git a/src/controls/Styles/Base/ButtonStyle.qml b/src/controls/Styles/Base/ButtonStyle.qml index 9b55d26d..b9d34b46 100644 --- a/src/controls/Styles/Base/ButtonStyle.qml +++ b/src/controls/Styles/Base/ButtonStyle.qml @@ -83,7 +83,7 @@ Style { padding { top: 4 left: 4 - right: control.menu !== null ? Math.round(TextSingleton.implicitHeight * 0.5) : 4 + right: 4 + (control.menu !== null ? Math.round(TextSingleton.implicitHeight * 0.5) : 0) bottom: 4 } @@ -121,7 +121,7 @@ Style { source: "images/arrow-down.png" anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: padding.right + anchors.rightMargin: 4 opacity: control.enabled ? 0.6 : 0.5 } } diff --git a/src/controls/Styles/Base/CheckBoxStyle.qml b/src/controls/Styles/Base/CheckBoxStyle.qml index 6fbdaede..e89e862a 100644 --- a/src/controls/Styles/Base/CheckBoxStyle.qml +++ b/src/controls/Styles/Base/CheckBoxStyle.qml @@ -39,6 +39,7 @@ ****************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 1.2 +import QtQuick.Layouts 1.1 import QtQuick.Window 2.1 import QtQuick.Controls.Private 1.0 @@ -168,7 +169,7 @@ Style { sourceComponent: background anchors.fill: parent } - Row { + RowLayout { id: row anchors.fill: parent @@ -185,6 +186,7 @@ Style { } Loader { id: labelLoader + Layout.fillWidth: true sourceComponent: label anchors.verticalCenter: parent.verticalCenter } diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index 71dc9b26..f8cf78b8 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -277,7 +277,6 @@ FocusScope { if (completed) tab.Component.onDestruction.connect(stack.onDynamicTabDestroyed.bind(tab)) __tabs.append({tab: tab}) - __didInsertIndex(__tabs.count - 1) tabAdded = true } } diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index fb940c44..0d104b06 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -872,6 +872,7 @@ ScrollView { if (rowItem) { rowItem.visible = false; rowItem.parent = null; + rowItem.rowIndex = -1; listView.rowItemStack.push(rowItem); // return rowItem to cache } } diff --git a/src/controls/qmldir b/src/controls/qmldir index 6506b7f9..a07b4b99 100644 --- a/src/controls/qmldir +++ b/src/controls/qmldir @@ -3,3 +3,4 @@ plugin qtquickcontrolsplugin classname QtQuickControlsPlugin typeinfo plugins.qmltypes designersupported +depends QtQuick.Window 2.2 |