diff options
Diffstat (limited to 'src/controls/Styles')
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 11 | ||||
-rw-r--r-- | src/controls/Styles/Base/ScrollViewStyle.qml | 8 | ||||
-rw-r--r-- | src/controls/Styles/Base/SpinBoxStyle.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Base/TabViewStyle.qml | 1 | ||||
-rw-r--r-- | src/controls/Styles/Base/TextAreaStyle.qml | 34 | ||||
-rw-r--r-- | src/controls/Styles/Base/TextFieldStyle.qml | 34 | ||||
-rw-r--r-- | src/controls/Styles/Desktop/CheckBoxStyle.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Desktop/RadioButtonStyle.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Desktop/SpinBoxStyle.qml | 2 |
9 files changed, 90 insertions, 6 deletions
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index 56978ded..26ca2048 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -148,6 +148,12 @@ Style { */ property real __gridLineWidth: 1 + /*! \internal */ + property color __horizontalSeparatorColor: gridColor + + /*! \internal */ + property color __verticalSeparatorColor: gridColor + function __cellRectAt(index) { return CalendarUtils.cellRectAt(index, control.__panel.columns, control.__panel.rows, control.__panel.availableWidth, control.__panel.availableHeight, gridVisible ? __gridLineWidth : 0); @@ -388,6 +394,7 @@ Style { anchors.right: parent.right anchors.top: parent.top sourceComponent: navigationBar + active: control.navigationBarVisible property QtObject styleData: QtObject { readonly property string title: control.__locale.standaloneMonthName(control.visibleMonth) @@ -426,7 +433,7 @@ Style { Rectangle { id: topGridLine - color: gridColor + color: __horizontalSeparatorColor width: parent.width height: __gridLineWidth visible: gridVisible @@ -482,7 +489,7 @@ Style { anchors.bottom: weekNumbersItem.bottom width: __gridLineWidth - color: gridColor + color: __verticalSeparatorColor visible: control.weekNumbersVisible } diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml index 8c17e35a..20fc5a19 100644 --- a/src/controls/Styles/Base/ScrollViewStyle.qml +++ b/src/controls/Styles/Base/ScrollViewStyle.qml @@ -266,8 +266,8 @@ Style { transitions: Transition { to: "out" SequentialAnimation { - PauseAnimation { duration: 450 } - NumberAnimation { properties: "opacity"; duration: 200 } + PauseAnimation { duration: root.__scrollBarFadeDelay } + NumberAnimation { properties: "opacity"; duration: root.__scrollBarFadeDuration } PropertyAction { target: panel; property: "visible"; value: false } } } @@ -392,4 +392,8 @@ Style { property bool __externalScrollBars: false /*! \internal */ property int __scrollBarSpacing: 4 + /*! \internal */ + property int __scrollBarFadeDelay: 450 + /*! \internal */ + property int __scrollBarFadeDuration: 200 } diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml index ffd30a58..6c76386f 100644 --- a/src/controls/Styles/Base/SpinBoxStyle.qml +++ b/src/controls/Styles/Base/SpinBoxStyle.qml @@ -163,6 +163,8 @@ Style { implicitHeight: backgroundLoader.implicitHeight baselineOffset: backgroundLoader.item ? backgroundLoader.item.baselineOffset : 0 + property font font + property color foregroundColor: spinboxStyle.textColor property color selectionColor: spinboxStyle.selectionColor property color selectedTextColor: spinboxStyle.selectedTextColor diff --git a/src/controls/Styles/Base/TabViewStyle.qml b/src/controls/Styles/Base/TabViewStyle.qml index ad1d3856..44c6ca72 100644 --- a/src/controls/Styles/Base/TabViewStyle.qml +++ b/src/controls/Styles/Base/TabViewStyle.qml @@ -128,6 +128,7 @@ Style { \row \li readonly property string \b styleData.title \li Tab title text. \row \li readonly property bool \b styleData.nextSelected \li The next tab is selected. \row \li readonly property bool \b styleData.previousSelected \li The previous tab is selected. + \row \li readonly property bool \b styleData.pressed \li The tab is being pressed. (since QtQuick.Controls.Styles 1.3) \row \li readonly property bool \b styleData.hovered \li The tab is being hovered. \row \li readonly property bool \b styleData.enabled \li The tab is enabled. (since QtQuick.Controls.Styles 1.2) \row \li readonly property bool \b styleData.activeFocus \li The tab button has keyboard focus. diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml index 774f5cc6..301ac165 100644 --- a/src/controls/Styles/Base/TextAreaStyle.qml +++ b/src/controls/Styles/Base/TextAreaStyle.qml @@ -96,4 +96,38 @@ ScrollViewStyle { \sa Text::renderType */ property int renderType: Text.NativeRendering + + /*! The cursor handle. + \since QtQuick.Controls.Styles 1.3 + + The parent of the handle is positioned to the top left corner of + the cursor position. The interactive area is determined by the + geometry of the handle delegate. + + The following read-only properties are available within the scope + of the handle delegate: + \table + \row \li \b {styleData.pressed} : bool \li Whether the handle is pressed. + \row \li \b {styleData.position} : int \li The character position of the handle. + \row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on. + \endtable + */ + property Component cursorHandle + + /*! The selection handle. + \since QtQuick.Controls.Styles 1.3 + + The parent of the handle is positioned to the top left corner of + the first selected character. The interactive area is determined + by the geometry of the handle delegate. + + The following read-only properties are available within the scope + of the handle delegate: + \table + \row \li \b {styleData.pressed} : bool \li Whether the handle is pressed. + \row \li \b {styleData.position} : int \li The character position of the handle. + \row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on. + \endtable + */ + property Component selectionHandle } diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml index 4fe0d0a9..f33d4876 100644 --- a/src/controls/Styles/Base/TextFieldStyle.qml +++ b/src/controls/Styles/Base/TextFieldStyle.qml @@ -154,4 +154,38 @@ Style { anchors.fill: parent } } + + /*! The cursor handle. + \since QtQuick.Controls.Styles 1.3 + + The parent of the handle is positioned to the top left corner of + the cursor position. The interactive area is determined by the + geometry of the handle delegate. + + The following read-only properties are available within the scope + of the handle delegate: + \table + \row \li \b {styleData.pressed} : bool \li Whether the handle is pressed. + \row \li \b {styleData.position} : int \li The character position of the handle. + \row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on. + \endtable + */ + property Component cursorHandle + + /*! The selection handle. + \since QtQuick.Controls.Styles 1.3 + + The parent of the handle is positioned to the top left corner of + the first selected character. The interactive area is determined + by the geometry of the handle delegate. + + The following read-only properties are available within the scope + of the handle delegate: + \table + \row \li \b {styleData.pressed} : bool \li Whether the handle is pressed. + \row \li \b {styleData.position} : int \li The character position of the handle. + \row \li \b {styleData.lineHeight} : real \li The height of the line the handle is on. + \endtable + */ + property Component selectionHandle } diff --git a/src/controls/Styles/Desktop/CheckBoxStyle.qml b/src/controls/Styles/Desktop/CheckBoxStyle.qml index 456e7e4b..4fb7d47a 100644 --- a/src/controls/Styles/Desktop/CheckBoxStyle.qml +++ b/src/controls/Styles/Desktop/CheckBoxStyle.qml @@ -59,7 +59,7 @@ Style { hints: control.styleHints properties: {"partiallyChecked": (control.checkedState === Qt.PartiallyChecked) } contentHeight: textitem.implicitHeight - contentWidth: textitem.implicitWidth + indicatorWidth + contentWidth: Math.ceil(textitem.implicitWidth) + 4 property int indicatorWidth: pixelMetric("indicatorwidth") + (macStyle ? 2 : 4) property bool macStyle: (style === "mac") diff --git a/src/controls/Styles/Desktop/RadioButtonStyle.qml b/src/controls/Styles/Desktop/RadioButtonStyle.qml index cf1d4091..a1809ad2 100644 --- a/src/controls/Styles/Desktop/RadioButtonStyle.qml +++ b/src/controls/Styles/Desktop/RadioButtonStyle.qml @@ -62,7 +62,7 @@ Style { hasFocus: control.activeFocus && styleitem.style == "mac" hints: control.styleHints contentHeight: textitem.implicitHeight - contentWidth: textitem.implicitWidth + indicatorWidth + contentWidth: Math.ceil(textitem.implicitWidth) + 4 property int indicatorWidth: pixelMetric("indicatorwidth") + (macStyle ? 2 : 4) property bool macStyle: (style === "mac") diff --git a/src/controls/Styles/Desktop/SpinBoxStyle.qml b/src/controls/Styles/Desktop/SpinBoxStyle.qml index 36e84cd4..d7d32916 100644 --- a/src/controls/Styles/Desktop/SpinBoxStyle.qml +++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml @@ -63,6 +63,8 @@ Style { property int horizontalAlignment: Qt.platform.os === "osx" ? Qt.AlignRight : Qt.AlignLeft property int verticalAlignment: Qt.AlignVCenter + property alias font: styleitem.font + property color foregroundColor: SystemPaletteSingleton.text(control.enabled) property color backgroundColor: SystemPaletteSingleton.base(control.enabled) property color selectionColor: SystemPaletteSingleton.highlight(control.enabled) |