diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,6 @@ add_subdirectory(libbreezecommon) add_subdirectory(kstyle) add_subdirectory(misc) - add_subdirectory(qtquickcontrols) option(WITH_WALLPAPERS "Install Breeze default wallpapers" ON) if (WITH_WALLPAPERS) diff --git a/qtquickcontrols/ApplicationWindowStyle.qml b/qtquickcontrols/ApplicationWindowStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ApplicationWindowStyle.qml +++ /dev/null @@ -1,5 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.3 - -ApplicationWindowStyle { -} diff --git a/qtquickcontrols/Breeze.qml b/qtquickcontrols/Breeze.qml deleted file mode 100644 --- a/qtquickcontrols/Breeze.qml +++ /dev/null @@ -1,59 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 - -ApplicationWindow { - width: 640 - height: 300 - title: "Breeze Style Demo" - style: ApplicationWindowStyle{} //Commented out to see if works when QT_QUICK_CONTROLS_STYLE=Breeze is set - - TabView { - id: tabView - anchors.fill: parent - anchors.leftMargin: 8 - anchors.topMargin: 12 - anchors.rightMargin: 8 - anchors.bottomMargin: 52 - style: TabViewStyle{} //Commented out to see if works when QT_QUICK_CONTROLS_STYLE=Breeze is set - frameVisible: true - Component.onCompleted: { - addTab("Tab 1", page1) - addTab("Tab 2", page2) - addTab("Tab 3", page3) - addTab("Tab 4", page4) - } - Component { - id: page1 - DemoPage1 {} - } - Component { - id: page2 - DemoPage2 {} - } - Component { - id: page3 - DemoPage3 {} - } - Component { - id: page4 - DemoPage4 {} - } - } - Item { - anchors.top: tabView.bottom - anchors.left:parent.left - anchors.bottom: parent.bottom - anchors.right: parent.right - anchors.margins: 8 - Button { - focus: true - anchors.right: parent.right - anchors.bottom: parent.bottom - style: ButtonStyle{} //Commented out to see if works when QT_QUICK_CONTROLS_STYLE=Breeze is set - text: "Close" - onClicked: Qt.quit() - } - } -} - diff --git a/qtquickcontrols/Breeze.qmlproject b/qtquickcontrols/Breeze.qmlproject deleted file mode 100644 --- a/qtquickcontrols/Breeze.qmlproject +++ /dev/null @@ -1,20 +0,0 @@ -/* File generated by Qt Creator */ - -import QmlProject 1.1 - -Project { - mainFile: "Breeze.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - importPaths: [ "/home/jamboarder/Projects/Qt5/Qt5.2.1/5.2.1/gcc/qml/QtQuick.2/" ] -} diff --git a/qtquickcontrols/BusyIndicatorStyle.qml b/qtquickcontrols/BusyIndicatorStyle.qml deleted file mode 100644 --- a/qtquickcontrols/BusyIndicatorStyle.qml +++ /dev/null @@ -1,47 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -BusyIndicatorStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - indicator: Item { - implicitHeight: 32 - implicitWidth: 32 - Rectangle { - anchors.centerIn: parent - height: 24 - width: 24 - radius: 12 - border.width: 2 - border.color: sysPalette.highlight - color: "transparent" - transform: Rotation { - origin.x: 12 - origin.y: 12 - axis { x: 1; y: 0; z: 0 } - NumberAnimation on angle { - running: control.running - loops: Animation.Infinite - duration: 1000 - from: 0 ; to: 360 - } - } - } - Rectangle { - anchors.centerIn: parent - height: 12 - width: 12 - radius: 6 - border.width: 2 - border.color: sysPalette.highlight - color: sysPalette.highlight - } - NumberAnimation on rotation { - running: control.running - loops: Animation.Infinite - duration: 3000 - from: 0 ; to: 360 - } - } -} diff --git a/qtquickcontrols/ButtonStyle.qml b/qtquickcontrols/ButtonStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ButtonStyle.qml +++ /dev/null @@ -1,58 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -ButtonStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - background: Item { - property color borderColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.75) - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 32 - implicitWidth: 96 - Rectangle { - anchors.centerIn: parent - implicitHeight: parent.height - 2 - implicitWidth: parent.width - 2 - radius: 2.5 - color: ColorUtils.adjustAlpha(sysPalette.shadow, 0.2) - transform: Translate {x: 1; y: 1} - } - Rectangle { - anchors.centerIn: parent - implicitWidth: parent.width - 2 - implicitHeight: parent.height - 2 - border.width: control.activeFocus ? 0: 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : borderColor - radius: 2.5 - color: control.pressed || control.activeFocus ? sysPalette.highlight : sysPalette.button - gradient: Gradient { - GradientStop { - position: 0.0 - color: control.activeFocus ? Qt.lighter(sysPalette.highlight, 1.03) : - Qt.lighter(sysPalette.button, 1.01) - } - GradientStop { - position: 1.0 - color: control.activeFocus ? Qt.darker(sysPalette.highlight, 1.10) : - Qt.darker(sysPalette.button, 1.03) - } - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - } - - label: Item { - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: __buttonText.implicitWidth + 16 - implicitHeight: __buttonText.implicitHeight + 8 - Text { - id:__buttonText - anchors.centerIn: parent - text: control.text - color: control.activeFocus ? sysPalette.highlightedText : sysPalette.buttonText - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } -} - diff --git a/qtquickcontrols/CMakeLists.txt b/qtquickcontrols/CMakeLists.txt deleted file mode 100644 --- a/qtquickcontrols/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -FILE(GLOB themeFiles *.qml) -INSTALL(FILES ${themeFiles} DESTINATION ${QML_INSTALL_DIR}/QtQuick/Controls/Styles/Breeze) -INSTALL(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/QtQuick/Controls/Styles/Breeze) -INSTALL(FILES ColorUtils.js DESTINATION ${QML_INSTALL_DIR}/QtQuick/Controls/Styles/Breeze) diff --git a/qtquickcontrols/CheckBoxIndicator.qml b/qtquickcontrols/CheckBoxIndicator.qml deleted file mode 100644 --- a/qtquickcontrols/CheckBoxIndicator.qml +++ /dev/null @@ -1,105 +0,0 @@ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Private 1.0 -import "ColorUtils.js" as ColorUtils - -Item { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - property color enabledCheckedColor: sysPalette.highlight - property color enabledNotCheckedColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.5) - property color hoveredColor: ColorUtils.blendColors(sysPalette.highlight, sysPalette.window, 0.5) - property color disabledColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.6) - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 28 - implicitWidth: 28 - Rectangle { - visible: control.enabled - anchors.centerIn: parent - implicitHeight: parent.height - 10 - implicitWidth: parent.width - 10 - radius: 2 - color: ColorUtils.adjustAlpha(sysPalette.shadow, 0.15) - transform: Translate {x: 1; y: 1} - } - Rectangle { - anchors.centerIn: parent - implicitWidth: parent.width - 10 - implicitHeight: parent.height - 10 - border.width: 1 - border.color: control.enabled ? ((control.checked || control.checkedState === Qt.PartiallyChecked) ? enabledCheckedColor : enabledNotCheckedColor) : disabledColor - radius: 2 - color: sysPalette.window - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - Rectangle { - visible: control.hovered - anchors.centerIn: parent - implicitWidth: parent.width - 10 - implicitHeight: parent.height - 10 - border.width: 1 - border.color: hoveredColor - radius: 2 - color: sysPalette.window - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - Rectangle { - id: __checkMark - anchors.centerIn: parent - color: control.enabled ? enabledCheckedColor : disabledColor - height: 12 - width: 12 - Rectangle { - visible: (control.checked || control.checkedState === Qt.PartiallyChecked) & control.hovered - anchors.centerIn: parent - color: hoveredColor - height: 12 - width: 12 - } - Triangle { - visible: control.checkedState === Qt.PartiallyChecked - sideLength: 8 - color: sysPalette.window - anchors.centerIn: parent - anchors.horizontalCenterOffset: 2 - anchors.verticalCenterOffset: -1 - } - transform: [ - Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0}, - Rotation { - id: __checkRotator - origin.x: 6 - origin.y: 6 - axis { x: 1; y: -1; z: 0 } - angle: (control.checked || control.checkedState === Qt.PartiallyChecked) ? 0 : 270 - } - ] - PropertyAnimation { - id: __checkFlipAnimation - target: __checkRotator - property: "angle" - duration: 100 - from: 270 ; to: 360 - onStarted: __checkMark.visible = true - } - PropertyAnimation { - id: __unCheckFlipAnimation - target: __checkRotator - property: "angle" - duration: 100 - from: 360; to: 270 - onStopped: __checkMark.visible = false - } - Component.onCompleted: { - control.checkedStateChanged.connect(flipChecked) - } - function flipChecked() { - if (control.checked || control.checkedState === Qt.PartiallyChecked) { - __checkFlipAnimation.running = true; - } else { - __unCheckFlipAnimation.running = true; - } - } - - } -} diff --git a/qtquickcontrols/CheckBoxStyle.qml b/qtquickcontrols/CheckBoxStyle.qml deleted file mode 100644 --- a/qtquickcontrols/CheckBoxStyle.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -CheckBoxStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - indicator: CheckBoxIndicator{} - - label: Item { - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: __checkBoxtext.implicitWidth + 4 - implicitHeight: __checkBoxtext.implicitHeight + 4 - Rectangle { - anchors { - left: parent.left - right: parent.right - bottom: parent.bottom - } - height: 1 - color: control.activeFocus ? sysPalette.highlight : "transparent" - } - Text { - id: __checkBoxtext - anchors.centerIn: parent - text: control.text - color: sysPalette.windowText - } - } -} diff --git a/qtquickcontrols/ColorUtils.js b/qtquickcontrols/ColorUtils.js deleted file mode 100644 --- a/qtquickcontrols/ColorUtils.js +++ /dev/null @@ -1,9 +0,0 @@ -// Color manipulation utilities - -function blendColors(clr0, clr1, p) { - return Qt.tint(clr0, adjustAlpha(clr1, p)); -} - -function adjustAlpha(clr, a) { - return Qt.rgba(clr.r, clr.g, clr.b, a); -} diff --git a/qtquickcontrols/ComboBoxStyle.qml b/qtquickcontrols/ComboBoxStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ComboBoxStyle.qml +++ /dev/null @@ -1,76 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -ComboBoxStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - background: Item { - property color borderColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.75) - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 32 - implicitWidth: 148 - Rectangle { - visible: !control.editable - anchors.centerIn: parent - implicitHeight: parent.height - 2 - implicitWidth: parent.width - 2 - radius: 2.5 - color: ColorUtils.adjustAlpha(sysPalette.shadow, 0.2) - transform: Translate {x: 1; y: 1} - } - Rectangle { - visible: !control.editable - anchors.centerIn: parent - implicitWidth: parent.width - 2 - implicitHeight: parent.height - 2 - border.width: control.activeFocus ? 0: 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : borderColor - radius: 2.5 - color: control.pressed || control.activeFocus ? sysPalette.highlight : sysPalette.button - gradient: Gradient { - GradientStop { - position: 0.0 - color: control.activeFocus ? Qt.lighter(sysPalette.highlight, 1.03) : - Qt.lighter(sysPalette.button, 1.01) - } - GradientStop { - position: 1.0 - color: control.activeFocus ? Qt.darker(sysPalette.highlight, 1.10) : - Qt.darker(sysPalette.button, 1.03) - } - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - TextFieldBackground { - visible: control.editable - } - ScrollArrow { - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 6 - implicitWidth: 12 - implicitHeight: 6 - rotation: control.pressed ? 0 : 180 - arrowColor: (control.activeFocus && !control.editable) ? sysPalette.highlightedText : sysPalette.buttonText - } - } - drowDownButtonWidth: 22 - label: Item { - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: __comboButtonText.implicitWidth + 8 - implicitHeight: __comboButtonText.implicitHeight + 8 - Text { - id:__comboButtonText - width: 148 - 20 - 4 - anchors.left: parent.left - anchors.leftMargin: 4 - anchors.verticalCenter: parent.verticalCenter - text: control.currentText - elide: Text.ElideRight - color: control.activeFocus ? sysPalette.highlightedText : sysPalette.buttonText - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - __editor: Item { visible: false} -} diff --git a/qtquickcontrols/DemoPage1.qml b/qtquickcontrols/DemoPage1.qml deleted file mode 100644 --- a/qtquickcontrols/DemoPage1.qml +++ /dev/null @@ -1,126 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 - -GridLayout { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - anchors { - fill: parent - leftMargin: 16 - topMargin: 16 - rightMargin: 16 - bottomMargin: 70 - } - columns: 3 - rows: 4 - rowSpacing: 8 - columnSpacing: 8 - - ExclusiveGroup { id: group } - RadioButton { - Layout.column: 0 - Layout.row: 0 - Layout.minimumWidth: parent.width/3 - exclusiveGroup: group - checked: true - style: RadioButtonStyle{} - text: "Radio Button" - } - RadioButton { - Layout.column: 0 - Layout.row: 1 - exclusiveGroup: group - checked: false - style: RadioButtonStyle{} - text: "Radio Button" - } - RadioButton { - enabled: false - Layout.column: 0 - Layout.row: 2 - checked: true - style: RadioButtonStyle{} - text: "Disabled Radio Button" - } - RadioButton { - enabled: false - Layout.column: 0 - Layout.row: 3 - checked: false - style: RadioButtonStyle{} - text: "Disabled Radio Button" - } - CheckBox { - Layout.column: 1 - Layout.row: 0 - Layout.minimumWidth: parent.width/3 - checked: true - style: CheckBoxStyle{} - text: "Checkbox" - } - CheckBox { - Layout.column: 1 - Layout.row: 1 - partiallyCheckedEnabled: true - checked: false - style: CheckBoxStyle{} - text: "Checkbox" - } - CheckBox { - enabled: false - Layout.column: 1 - Layout.row: 2 - checked: true - style: CheckBoxStyle{} - text: "Disabled Checkbox" - } - CheckBox { - enabled: false - Layout.column: 1 - Layout.row: 3 - checked: false - style: CheckBoxStyle{} - text: "Disabled Checkbox" - } - ProgressBar { - Layout.fillWidth: true - Layout.column: 2 - Layout.row: 0 - Layout.alignment: Qt.AlignCenter - anchors.margins: 16 - value: 75 - minimumValue: 0 - maximumValue: 100 - style: ProgressBarStyle{} - } - - ProgressBar { - Layout.fillWidth: true - Layout.column: 2 - Layout.row: 1 - Layout.alignment: Qt.AlignCenter - anchors.margins: 16 - indeterminate: true - style: ProgressBarStyle{} - } - - Slider { - Layout.fillWidth: true - Layout.column: 2 - Layout.row: 2 - anchors.margins: 8 - value: 55 - minimumValue: 0 - maximumValue: 100 - style: SliderStyle{} - } - Button { - anchors.margins: 8 - Layout.column: 2 - Layout.row: 3 - Layout.fillWidth: true - style: ButtonStyle{} - text: activeFocus ? "Focused button" : "Button" - } -} diff --git a/qtquickcontrols/DemoPage2.qml b/qtquickcontrols/DemoPage2.qml deleted file mode 100644 --- a/qtquickcontrols/DemoPage2.qml +++ /dev/null @@ -1,118 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 - -GridLayout { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - anchors.fill: parent - anchors.margins: 16 - Layout.minimumWidth: 400 - Layout.minimumHeight: 300 - columns: 3 - rows: 3 - rowSpacing: 16 - columnSpacing: 8 - - - ComboBox { - Layout.column: 0 - Layout.row: 0 - Layout.alignment: Qt.AlignHCenter - style: ComboBoxStyle{} - currentIndex: 0 - model: [ "ComboBox", "Apple", "Coconut" ] - } - - ComboBox { - enabled: false - Layout.column: 0 - Layout.row: 1 - Layout.alignment: Qt.AlignHCenter - style: ComboBoxStyle{} - currentIndex: 0 - model: [ "ComboBox", "Apple", "Coconut" ] - } - - ComboBox { - Layout.column: 1 - Layout.row: 0 - Layout.alignment: Qt.AlignHCenter - style: ComboBoxStyle{} - currentIndex: 0 - editable: true - model: [ "Editable ComboBox", "Apple", "Coconut" ] - } - - SpinBox { - Layout.column: 1 - Layout.row: 1 - Layout.alignment: Qt.AlignHCenter - Layout.minimumWidth: 148 - style: SpinBoxStyle{} - minimumValue: 0 - maximumValue: 100 - value: 42 - } - - TextField { - Layout.column: 2 - Layout.row: 0 - Layout.alignment: Qt.AlignHCenter - Layout.minimumWidth: 148 - style: TextFieldStyle{} - text: "Text field" - } - - TextField { - enabled: false - Layout.column: 2 - Layout.row: 1 - Layout.alignment: Qt.AlignHCenter - Layout.minimumWidth: 148 - style: TextFieldStyle{} - text: "Disabled text field" - } - - ToolButton { - anchors.margins: 8 - Layout.column: 0 - Layout.row: 2 - Layout.alignment: Qt.AlignHCenter - style: ToolButtonStyle{} - text: "Tool Button" - iconName: "edit-cut" -// checked: true -// onClicked: checked = !checked; - } - - RowLayout { - Layout.column: 1 - Layout.row: 2 - Layout.alignment: Qt.AlignHCenter - Switch { - checked: true - style: SwitchStyle{} - } - - Label { - text: "Switch" - } - } - - RowLayout { - Layout.column: 2 - Layout.row: 2 - Layout.alignment: Qt.AlignHCenter - - BusyIndicator { - anchors.margins: 8 - style:BusyIndicatorStyle{} - } - - Label { - text: "Busy Indicator" - } - } - - } diff --git a/qtquickcontrols/DemoPage3.qml b/qtquickcontrols/DemoPage3.qml deleted file mode 100644 --- a/qtquickcontrols/DemoPage3.qml +++ /dev/null @@ -1,85 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 - -GridLayout { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - anchors.fill: parent - anchors.margins: 16 - Layout.minimumWidth: 400 - Layout.minimumHeight: 300 - columns: 2 - rows: 1 - rowSpacing: 16 - columnSpacing: 8 - - ScrollView { - Layout.column: 0 - Layout.row: 0 - Layout.alignment: Qt.AlignHCenter - style: ScrollViewStyle{} - - ListView { - model: contactModel - delegate: contactDelegate - Component { - id: contactDelegate - Item { - width: 180; height: 40 - Column { - Text { text: 'Name: ' + name } - Text { text: 'Number: ' + number } - } - } - } - - ListModel { - id: contactModel - ListElement { - name: "Bill Smith" - number: "555 3264" - } - ListElement { - name: "John Brown" - number: "555 8426" - } - ListElement { - name: "Sam Wise" - number: "555 0473" - } - ListElement { - name: "Sam Wise" - number: "555 0473" - } - ListElement { - name: "Bill Smith" - number: "555 3264" - } - ListElement { - name: "John Brown" - number: "555 8426" - } - ListElement { - name: "Sam Wise" - number: "555 0473" - } - ListElement { - name: "Sam Wise" - number: "555 0473" - } - } - } - } - TextArea { - height: 50 - width: parent.width/2 - Layout.alignment: Qt.AlignHCenter - Layout.column: 1 - Layout.row: 0 - textMargin: 8 - style: TextAreaStyle{} - text: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." - } - -} diff --git a/qtquickcontrols/DemoPage4.qml b/qtquickcontrols/DemoPage4.qml deleted file mode 100644 --- a/qtquickcontrols/DemoPage4.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 - -GridLayout { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - anchors.fill: parent - anchors.margins: 16 - Layout.minimumWidth: 400 - Layout.minimumHeight: 300 - columns: 1 - rows: 1 - - TableView { - Layout.column: 0 - Layout.row: 0 - anchors.fill: parent - anchors.margins: 8 - style: TableViewStyle{} - ListModel { - id: libraryModel - ListElement{ title: "A Masterpiece" ; author: "Gabriel" } - ListElement{ title: "Brilliance" ; author: "Jens" } - ListElement{ title: "Outstanding" ; author: "Frederik" } - ListElement{ title: "Brilliance" ; author: "Jens" } - ListElement{ title: "Outstanding" ; author: "Frederik" } - ListElement{ title: "Brilliance" ; author: "Jens" } - ListElement{ title: "Outstanding" ; author: "Frederik" } - ListElement{ title: "Brilliance" ; author: "Jens" } - ListElement{ title: "Outstanding" ; author: "Frederik" } - } - TableViewColumn{ role: "title" ; title: "Title" ; width: 100 } - TableViewColumn{ role: "author" ; title: "Author" ; width: 200 } - model: libraryModel - } -} diff --git a/qtquickcontrols/FocusFrameStyle.qml b/qtquickcontrols/FocusFrameStyle.qml deleted file mode 100644 --- a/qtquickcontrols/FocusFrameStyle.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.1 - -Item { - property int margin: -3 - anchors.fill: parent -} diff --git a/qtquickcontrols/GroupBoxStyle.qml b/qtquickcontrols/GroupBoxStyle.qml deleted file mode 100644 --- a/qtquickcontrols/GroupBoxStyle.qml +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Quick Controls module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names -** of its contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Private 1.0 -import "ColorUtils.js" as ColorUtils - -/*! - \qmltype GroupBoxStyle - \internal - \inqmlmodule QtQuick.Controls.Styles - \ingroup controlsstyling - \since 5.1 -*/ -Style { - - /*! \internal */ - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } - /*! The \l GroupBox attached to this style. */ - readonly property GroupBox control: __control - - /*! The margin from the content item to the groupbox. */ - padding { - top: (control.title.length > 0 || control.checkable ? TextSingleton.implicitHeight : 0) + 10 - left: 8 - right: 8 - bottom: 6 - } - - /*! The title text color. */ - property color textColor: __syspal.text - - /*! The check box. */ - property Component checkbox: CheckBoxIndicator{} - - /*! The groupbox frame. */ - property Component panel: Item { - anchors.fill: parent - Loader { - id: checkboxloader - anchors.left: parent.left - sourceComponent: control.checkable ? checkbox : null - anchors.verticalCenter: label.verticalCenter - width: item ? item.implicitWidth : 0 - } - - Text { - id: label - anchors.top: parent.top - anchors.left: checkboxloader.right - anchors.margins: 4 - text: control.title - color: textColor - renderType: Text.NativeRendering - } - - Rectangle { - anchors.fill: parent - anchors.topMargin: padding.top - 7 - border.color: ColorUtils.blendColors(__syspal.window, __syspal.windowText, 0.2) - border.width: 1 - color: ColorUtils.blendColors(__syspal.window, __syspal.base, 0.5) - radius: 2.5 - visible: !control.flat - } - } - -} diff --git a/qtquickcontrols/MenuBarStyle.qml b/qtquickcontrols/MenuBarStyle.qml deleted file mode 100644 --- a/qtquickcontrols/MenuBarStyle.qml +++ /dev/null @@ -1,38 +0,0 @@ -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Private 1.0 -import "ColorUtils.js" as ColorUtils - - -/*! - \qmltype MenuBarStyle - \internal - \ingroup applicationwindowstyling - \inqmlmodule QtQuick.Controls.Styles -*/ - -Style { - SystemPalette { id: syspal } - - readonly property color __backgroundColor: syspal.window - - property Component frame: Rectangle { - width: control.__contentItem.width - height: contentHeight - color: __backgroundColor - } - - property Component menuItem: Rectangle { - width: text.width + 12 - height: text.height + 8 - color: sunken ? syspal.highlight :__backgroundColor - - Text { - id: text - text: StyleHelpers.stylizeMnemonics(menuItem.title) - anchors.centerIn: parent - renderType: Text.NativeRendering - color: sunken ? syspal.highlightedText : syspal.windowText - } - } -} diff --git a/qtquickcontrols/MenuStyle.qml b/qtquickcontrols/MenuStyle.qml deleted file mode 100644 --- a/qtquickcontrols/MenuStyle.qml +++ /dev/null @@ -1,165 +0,0 @@ -import QtQuick 2.1 -import QtQuick.Window 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Private 1.0 -import "ColorUtils.js" as ColorUtils - -Style { - id: styleRoot - - property var __syspal: SystemPalette { - colorGroup: control.enabled ? - SystemPalette.Active : SystemPalette.Disabled - } - property string __menuItemType: "menuitem" - property real maxPopupHeight: 600 // ### FIXME Screen.desktopAvailableHeight * 0.99 - - property Component frame: Rectangle { - width: (parent ? parent.contentWidth : 0) + 2 - height: (parent ? parent.contentHeight : 0) + 2 - - color: __syspal.window - border { width: 1; color: __syspal.highlight } - radius: 2 - - property int subMenuOverlap: -1 - property real maxHeight: maxPopupHeight - property int margin: 1 - } - - property Component menuItem: Rectangle { - x: 1 - y: 1 - implicitWidth: Math.max((parent ? parent.width : 0), - 18 + text.paintedWidth + (rightDecoration.visible ? rightDecoration.width + 40 : 12)) - implicitHeight: isSeparator ? text.font.pixelSize / 2 : !!scrollerDirection ? text.font.pixelSize * 0.75 : text.paintedHeight + 8 - color: selected && enabled ? syspal.highlight: backgroundColor - border.width: 1 - border.color: selected && enabled ? Qt.darker(selectedColor, 1) : color - readonly property int leftMargin: __menuItemType === "menuitem" ? 18 : 0 - - readonly property color backgroundColor: syspal.window - readonly property color selectedColor: syspal.highlight - antialiasing: true - - SystemPalette { - id: syspal - colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled - } - - readonly property string itemText: parent ? parent.text : "" - readonly property bool mirrored: Qt.application.layoutDirection === Qt.RightToLeft - - Loader { - id: checkMark - x: mirrored ? parent.width - width - 4 : 4 - y: 6 - active: __menuItemType === "menuitem" && !!menuItem && !!menuItem["checkable"] - sourceComponent: exclusive ? exclusiveCheckMark : nonExclusiveCheckMark - - readonly property bool checked: !!menuItem && !!menuItem.checked - readonly property bool exclusive: !!menuItem && !!menuItem["exclusiveGroup"] - - Component { - id: nonExclusiveCheckMark - Rectangle { - x: 1 - width: 12 - height: 12 - color: syspal.window - border.color: checkMark.checked ? syspal.highlight : syspal.windowText - antialiasing: true - - Rectangle { - antialiasing: true - visible: checkMark.checked - color: syspal.highlight - radius: 1 - anchors.margins: 4 - anchors.fill: parent - } - } - } - - Component { - id: exclusiveCheckMark - Rectangle { - x: 1 - width: 12 - height: 12 - color: syspal.window - border.color: checkMark.checked ? syspal.highlight : syspal.windowText - antialiasing: true - radius: height/2 - - Rectangle { - anchors.centerIn: parent - visible: checkMark.checked - anchors.margins: 4 - anchors.fill: parent - color: syspal.highlight - antialiasing: true - radius: 4 - } - } - } - } - - Text { - id: text - visible: !isSeparator - text: StyleHelpers.stylizeMnemonics(itemText) - readonly property real offset: __menuItemType === "menuitem" ? 24 : 6 - x: mirrored ? parent.width - width - offset : offset - anchors.verticalCenter: parent.verticalCenter - renderType: Text.NativeRendering - color: selected && enabled ? syspal.highlightedText : syspal.windowText - } - - Text { - id: rightDecoration - readonly property string shortcut: !!menuItem && menuItem["shortcut"] || "" - visible: isSubmenu || shortcut !== "" - text: isSubmenu ? mirrored ? "\u25c2" : "\u25b8" // BLACK LEFT/RIGHT-POINTING SMALL TRIANGLE - : shortcut - LayoutMirroring.enabled: mirrored - anchors { - right: parent.right - rightMargin: 6 - baseline: isSubmenu ? undefined : text.baseline - } - font.pixelSize: isSubmenu ? text.font.pixelSize : text.font.pixelSize * 0.9 - color: text.color - renderType: Text.NativeRendering - style: selected || !isSubmenu ? Text.Normal : Text.Raised; styleColor: Qt.lighter(color, 4) - } - - ScrollArrow { - id: scrollerDecoration - visible: !!scrollerDirection - anchors.centerIn: parent - implicitWidth: 10 - implicitHeight: 6 - rotation: scrollerDirection === "up" ? 180 : 0 - arrowColor: syspal.buttonText - } - - Rectangle { - visible: isSeparator - width: parent.width - 2 - height: 1 - x: 1 - anchors.verticalCenter: parent.verticalCenter - color: ColorUtils.adjustAlpha(syspal.windowText, 0.2) - } - } - - property Component scrollerStyle: Style { - padding { left: 0; right: 0; top: 0; bottom: 0 } - property bool scrollToClickedPosition: false - property Component frame: Item { visible: false } - property Component corner: Item { visible: false } - property Component __scrollbar: Item { visible: false } - property bool useScrollers: true - } -} diff --git a/qtquickcontrols/ProgressBarStyle.qml b/qtquickcontrols/ProgressBarStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ProgressBarStyle.qml +++ /dev/null @@ -1,70 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -ProgressBarStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - background: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - anchors.centerIn: parent - implicitWidth: 300 - implicitHeight: 16 - color: "transparent" - - Rectangle { - visible: !control.indeterminate - anchors.fill: parent - anchors.margins: 5 - color: ColorUtils.adjustAlpha(sysPalette.buttonText, 0.3) - radius: 3 - } - } - - progress: Rectangle { - id: __progressRoot - opacity: control.enabled ? 1.0 : 0.5 - anchors.fill: parent - color: "transparent" - Rectangle { - anchors.fill: parent - anchors.margins: 5 - color: sysPalette.highlight - radius: 3 - clip: true - Row { - visible: control.indeterminate - anchors.fill: parent - anchors.leftMargin: -28 - Repeater { - model: 100 - Item { - anchors.verticalCenter: parent.verticalCenter - width: 28 - height: 6 - Rectangle { - anchors.centerIn: parent - width: 6 - height: 14 - radius: 0 - color: ColorUtils.blendColors(sysPalette.highlight, sysPalette.window, 0.7) - transform: Rotation { - angle: 90 - origin.x: 3 - origin.y: 7 - } - } - } - } - NumberAnimation on anchors.leftMargin { - from: -28 - to: 1 - duration: 800 - loops: Animation.Infinite - running: control.indeterminate - } - } - } - } -} - diff --git a/qtquickcontrols/RadioButtonIndicator.qml b/qtquickcontrols/RadioButtonIndicator.qml deleted file mode 100644 --- a/qtquickcontrols/RadioButtonIndicator.qml +++ /dev/null @@ -1,103 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - - -Item { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - property color enabledCheckedColor: sysPalette.highlight - property color enabledNotCheckedColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.5) - property color hoveredColor: ColorUtils.blendColors(sysPalette.highlight, sysPalette.window, 0.5) - property color disabledColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.4) - opacity: control.enabled ? 1.0 : 0.5 - width: 28 - height: 28 - - Rectangle { - visible: control.enabled - anchors.centerIn: parent - height: 18 - width: 18 - radius: 11 - color: ColorUtils.adjustAlpha(sysPalette.shadow, 0.15) - transform: Translate { x: 1; y: 1 } - } - Rectangle { - anchors.centerIn: parent - height: 18 - width: 18 - radius: 10 - color: sysPalette.window - border { - width: 1 - color: control.checked ? (control.enabled ? enabledCheckedColor : disabledColor) : enabledNotCheckedColor - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - Rectangle { - visible: control.hovered - anchors.centerIn: parent - height: 18 - width: 18 - radius: 10 - color: sysPalette.window - border { - width: 2 - color: hoveredColor - } - transform: Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0} - } - Rectangle { - id: __rBMark - anchors.centerIn: parent - height: 12 - width: 12 - radius: 6 - color: control.enabled ? (control.checked ? enabledCheckedColor : enabledNotCheckedColor) : disabledColor - Rectangle { - visible: control.hovered - anchors.centerIn: parent - height: 12 - width: 12 - radius: 6 - color: hoveredColor - } - transform: [ - Translate {x: control.pressed ? 1 : 0; y: control.pressed ? 1 : 0}, - Rotation { - id: __rBRotator - origin.x: 6 - origin.y: 6 - axis { x: 1; y: -1; z: 0 } - angle: control.checked ? 0 : 270 - } - ] - PropertyAnimation { - id: __rBFlipChecked - target: __rBRotator - property: "angle" - duration: 100 - from: 270 ; to: 360 - onStarted: __rBMark.visible = true; - } - PropertyAnimation { - id: __rBFlipUnChecked - target: __rBRotator - property: "angle" - duration: 100 - from: 180 ; to: 270 - onStopped: __rBMark.visible = false; - } - Component.onCompleted: { - control.checkedChanged.connect(flipChecked) - } - function flipChecked() { - if (control.checked) { - __rBFlipChecked.running = true; - } else { - __rBFlipUnChecked.running = true; - } - } - } -} - diff --git a/qtquickcontrols/RadioButtonStyle.qml b/qtquickcontrols/RadioButtonStyle.qml deleted file mode 100644 --- a/qtquickcontrols/RadioButtonStyle.qml +++ /dev/null @@ -1,35 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -RadioButtonStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - indicator: RadioButtonIndicator{} - - label: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: rBText.implicitWidth + 4 - implicitHeight: rBText.implicitHeight + 4 - color: "transparent" - - Rectangle { - visible: control.activeFocus - anchors { - left: parent.left - right: parent.right - bottom: parent.bottom - } - height: 1 - color: sysPalette.highlight - } - - Text { - id:rBText - anchors.centerIn: parent - text: control.text - color: sysPalette.windowText - } - } - -} diff --git a/qtquickcontrols/ScrollArrow.qml b/qtquickcontrols/ScrollArrow.qml deleted file mode 100644 --- a/qtquickcontrols/ScrollArrow.qml +++ /dev/null @@ -1,44 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: arrowRoot - implicitWidth: 20 - implicitHeight: 20 - color: "transparent" - property color arrowColor - - Item { - width: upStroke.width * 2 - height: 6 - anchors.centerIn: parent - Rectangle { - id: upStroke - x: 0 - y: 0 - width: 6 - height: 2 - radius: 1 - smooth: true - transform: Rotation { - origin.x: upStroke.width - origin.y: upStroke.height / 2 - angle: -45 - } - color: arrowColor - } - Rectangle { - anchors.left: upStroke.right - anchors.top: upStroke.top - width: upStroke.width - height: upStroke.height - radius: upStroke.radius - smooth: true - transform: Rotation { - origin.x: 0 - origin.y: upStroke.height / 2 - angle: 45 - } - color: arrowColor - } - } -} diff --git a/qtquickcontrols/ScrollBar.qml b/qtquickcontrols/ScrollBar.qml deleted file mode 100644 --- a/qtquickcontrols/ScrollBar.qml +++ /dev/null @@ -1,58 +0,0 @@ -import QtQuick 2.0 -import "ColorUtils.js" as ColorUtils - -Rectangle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - opacity: control.enabled ? 1.0 : 0.5 - anchors.centerIn: parent - implicitWidth: styleData.horizontal ? 300 : 20 - implicitHeight: styleData.horizontal ? 20 : 300 - color: "transparent" - property alias barColor: __barFill.color - property alias barBorder: __barFill.border - property real percentWidth: 0.5 - property alias showShadow: __shadow.visible - property alias showHandle: __handle.visible - property alias handleColor: __handle.color - property alias handleBorder: __handle.border - - Rectangle { - id: __barFill - anchors.fill: parent - anchors.leftMargin: styleData.horizontal ? 0 : 0.5 * (1 - percentWidth) * 20 - anchors.rightMargin: styleData.horizontal ? 0 : 0.5 * (1 - percentWidth) * 20 - anchors.topMargin: styleData.horizontal ? 0.5 * (1 - percentWidth) * 20 : 0 - anchors.bottomMargin: styleData.horizontal ? 0.5 * (1 - percentWidth) * 20 : 0 - color: "red" - radius: width/2 - } - - Rectangle { - id: __shadow - visible: false - anchors.centerIn: __barFill - width: 20 - height: 20 - color: ColorUtils.adjustAlpha(sysPalette.windowText, 0.15) - radius: width/2 - transform: Translate { - x: 0 - y: 0 - } - } - - Rectangle { - id: __handle - visible: false - anchors.centerIn: __barFill - width: 20 - height: 20 - color: "red" - radius: width/2 - transform: Translate { - x: __shadow.visible ? (styleData.pressed ? 0 : -1) : 0 - y: __shadow.visible ? (styleData.pressed ? 0 : -1) : 0 - } - } - -} diff --git a/qtquickcontrols/ScrollViewStyle.qml b/qtquickcontrols/ScrollViewStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ScrollViewStyle.qml +++ /dev/null @@ -1,33 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -ScrollViewStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - frame: Rectangle { - color:"transparent" - } - scrollBarBackground: ScrollBar { - anchors.centerIn: parent - barColor: ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - } - handle: ScrollBar { - barColor: styleData.hovered ? sysPalette.button : - control.activeFocus ? sysPalette.highlight : - ColorUtils.adjustAlpha(sysPalette.text, 0.5) - barBorder.color: sysPalette.highlight - barBorder.width: styleData.hovered ? 2 : 0 - } - minimumHandleLength: 32 - incrementControl: ScrollArrow { - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? 90 : 180 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } - decrementControl: ScrollArrow { - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? -90 : 0 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } -} diff --git a/qtquickcontrols/SliderStyle.qml b/qtquickcontrols/SliderStyle.qml deleted file mode 100644 --- a/qtquickcontrols/SliderStyle.qml +++ /dev/null @@ -1,61 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -SliderStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - groove: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - id: control - anchors.centerIn: parent - implicitWidth: 300 - implicitHeight: 16 - color: "transparent" - - Rectangle { - anchors.fill: parent - anchors.margins: 5 - color: ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - radius: 3 - } - - Rectangle { - id: grooveFill - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.margins: 5 - width: styleData.handlePosition - height:6 - color: sysPalette.highlight - radius: 3 - } - } - - handle: Item { - property color borderColor: ColorUtils.blendColors(sysPalette.windowText, sysPalette.window, 0.75) - implicitWidth: 20 - implicitHeight: 20 - Rectangle { - visible: control.enabled - anchors.centerIn: parent - height: 20 - width: 20 - radius: 10 - color: ColorUtils.adjustAlpha(sysPalette.shadow, 0.15) - transform: Translate { x: 0; y: 0 } - } - - Rectangle { - id: sHandle - anchors.centerIn: parent - height: 20 - width: 20 - radius: 10 - border.width: control.activeFocus ? 2 : 1 - border.color: (control.activeFocus || control.hovered || control.pressed) ? sysPalette.highlight : borderColor - color: sysPalette.button - transform: Translate {x: control.pressed ? 0 : -1; y: control.pressed ? 0 : -1} - } - } -} diff --git a/qtquickcontrols/SpinBoxStyle.qml b/qtquickcontrols/SpinBoxStyle.qml deleted file mode 100644 --- a/qtquickcontrols/SpinBoxStyle.qml +++ /dev/null @@ -1,21 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -SpinBoxStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - background: TextFieldBackground{} - - incrementControl: ScrollArrow { - arrowColor: (styleData.upHovered && styleData.upEnabled) ? sysPalette.highlight : sysPalette.text - opacity: control.enabled ? 1.0 : 0.5 - transform: Translate {x: styleData.upPressed ? 1 : 0; y: styleData.upPressed ? 2 : 1} - } - decrementControl: ScrollArrow { - arrowColor: (styleData.downHovered && styleData.downEnabled) ? sysPalette.highlight : sysPalette.text - rotation: 180 - opacity: control.enabled ? 1.0 : 0.5 - transform: Translate {x: styleData.downPressed ? 1 : 0; y: styleData.downPressed ? 0 : -1} - } -} diff --git a/qtquickcontrols/StatusBarStyle.qml b/qtquickcontrols/StatusBarStyle.qml deleted file mode 100644 --- a/qtquickcontrols/StatusBarStyle.qml +++ /dev/null @@ -1,19 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -StatusBarStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - padding { - left: 4 - right: 4 - top: 4 - bottom: 4 - } - background: Rectangle { - implicitHeight: 16 - implicitWidth: 200 - color: sysPalette.window - } -} diff --git a/qtquickcontrols/SwitchStyle.qml b/qtquickcontrols/SwitchStyle.qml deleted file mode 100644 --- a/qtquickcontrols/SwitchStyle.qml +++ /dev/null @@ -1,33 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -SwitchStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - groove: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: 48 - implicitHeight: 24 - radius: 12 - color: control.checked ? ColorUtils.adjustAlpha(sysPalette.highlight, 1) : ColorUtils.adjustAlpha(sysPalette.buttonText, 0.3) - } - - handle: Rectangle { - implicitWidth: 24 - implicitHeight: 24 - width: 24 - height: 24 - color: "transparent" - Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - anchors.centerIn: parent - width: 22 - height: 22 - radius: 11 - color: sysPalette.window - border.width: control.activeFocus ? 2 : 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : ColorUtils.adjustAlpha(sysPalette.buttonText, 0.1) - } - } -} diff --git a/qtquickcontrols/TabViewStyle.qml b/qtquickcontrols/TabViewStyle.qml deleted file mode 100644 --- a/qtquickcontrols/TabViewStyle.qml +++ /dev/null @@ -1,55 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -TabViewStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - frameOverlap: 1 - tabOverlap: 1 - tabsAlignment: Qt.AlignHCenter - tab: Rectangle { - scale: control.tabPosition === Qt.TopEdge ? 1 : -1 - color: styleData.selected ? ColorUtils.blendColors(sysPalette.window, sysPalette.base, 0.3) : - styleData.hovered ? ColorUtils.adjustAlpha(sysPalette.highlight, 0.2) : ColorUtils.adjustAlpha(sysPalette.windowText, 0.2) - implicitWidth: Math.max(text.implicitWidth + 8, 80) - implicitHeight: Math.max(text.implicitHeight + 8, 28) - border.color: ColorUtils.blendColors(sysPalette.window, sysPalette.windowText, 0.25) - border.width: styleData.selected ? 1 : 0 - radius: 2.5 - Text { - id: text - anchors.centerIn: parent - text: styleData.title - color: sysPalette.windowText - scale: control.tabPosition === Qt.TopEdge ? 1 : -1 - } - Rectangle { - anchors.bottom: text.bottom - anchors.horizontalCenter: parent.horizontalCenter - width: text.implicitWidth - height: 1 - color: sysPalette.highlight - visible: styleData.activeFocus && styleData.selected - } - Rectangle { - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - 2 - height: styleData.selected ? 2 : 1 - color: styleData.selected ? ColorUtils.blendColors(sysPalette.window, sysPalette.base, 0.3) : ColorUtils.blendColors(sysPalette.window, sysPalette.windowText, 0.25) - } - } - - frame: Item { - Rectangle { - implicitHeight: 300 - implicitWidth: parent.width - anchors.fill: parent - border.color: ColorUtils.blendColors(sysPalette.window, sysPalette.windowText, 0.25) - border.width: 1 - color: ColorUtils.blendColors(sysPalette.window, sysPalette.base, 0.3) - radius: 2.5 - } - } -} diff --git a/qtquickcontrols/TableViewStyle.qml b/qtquickcontrols/TableViewStyle.qml deleted file mode 100644 --- a/qtquickcontrols/TableViewStyle.qml +++ /dev/null @@ -1,93 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -TableViewStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - padding {left: 1; top: 1; right: 1; bottom: 1} - frame: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 300 - implicitWidth: 300 - border.width: control.activeFocus ? 2 : 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - radius: 2.5 - color: sysPalette.base - } - scrollBarBackground: ScrollBar { - color: sysPalette.base - anchors.centerIn: parent - barColor: ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - } - handle: ScrollBar { - barColor: styleData.hovered ? sysPalette.button : - control.activeFocus ? sysPalette.highlight : - ColorUtils.adjustAlpha(sysPalette.text, 0.5) - barBorder.color: sysPalette.highlight - barBorder.width: styleData.hovered ? 2 : 0 - } - incrementControl: Rectangle { - implicitWidth: __scrollDownArrow.implicitWidth - implicitHeight: __scrollDownArrow.implicitHeight - ScrollArrow { - id: __scrollDownArrow - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? 90 : 180 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } - } - - decrementControl: Rectangle { - implicitWidth: __scrollUpArrow.implicitWidth - implicitHeight: __scrollUpArrow.implicitHeight - ScrollArrow { - id: __scrollUpArrow - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? -90 : 0 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } - } - headerDelegate: Rectangle { - anchors.top: parent.top - anchors.topMargin: 0 - implicitHeight: 28 - implicitWidth: 60 - color: styleData.pressed ? ColorUtils.blendColors(sysPalette.window, sysPalette.highlight, 0.2) : - sysPalette.window - Text { - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 8 - anchors.verticalCenter: parent.verticalCenter - text: styleData.value - color: sysPalette.text - } - Rectangle { - width: parent.width - height: 1 - anchors.bottom: parent.bottom - anchors.bottomMargin: 0 - anchors.horizontalCenter: parent.horizontalCenter - color: ColorUtils.adjustAlpha(sysPalette.windowText, 0.1) - } - Rectangle { - width: 1 - height: parent.height - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - anchors.topMargin: 1 - anchors.bottomMargin: 1 - color: ColorUtils.adjustAlpha(sysPalette.windowText, 0.2) - } - } - rowDelegate: Rectangle { - implicitHeight: 28 - implicitWidth: 60 -// anchors.right: parent.right -// anchors.rightMargin: 2 - height: 28 - color: styleData.selected ? sysPalette.highlight: - styleData.alternate ? sysPalette.alternateBase : sysPalette.base - } -} diff --git a/qtquickcontrols/TextAreaStyle.qml b/qtquickcontrols/TextAreaStyle.qml deleted file mode 100644 --- a/qtquickcontrols/TextAreaStyle.qml +++ /dev/null @@ -1,52 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 -import "ColorUtils.js" as ColorUtils - -TextAreaStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - frame: Rectangle { - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 300 - implicitWidth: 300 - border.width: control.activeFocus ? 2 : 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - radius: 2.5 - color: sysPalette.base - } - scrollBarBackground: ScrollBar { - color: sysPalette.base - anchors.centerIn: parent - barColor: ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - } - handle: ScrollBar { - barColor: styleData.hovered ? sysPalette.button : - control.activeFocus ? sysPalette.highlight : - ColorUtils.adjustAlpha(sysPalette.text, 0.5) - barBorder.color: sysPalette.highlight - barBorder.width: styleData.hovered ? 2 : 0 - } - incrementControl: Rectangle { - implicitWidth: __scrollDownArrow.implicitWidth - implicitHeight: __scrollDownArrow.implicitHeight - color: sysPalette.base - ScrollArrow { - id: __scrollDownArrow - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? 90 : 180 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } - } - - decrementControl: Rectangle { - implicitWidth: __scrollUpArrow.implicitWidth - implicitHeight: __scrollUpArrow.implicitHeight - color: sysPalette.base - ScrollArrow { - id: __scrollUpArrow - arrowColor: styleData.hovered ? sysPalette.highlight : sysPalette.text - rotation: styleData.horizontal ? -90 : 0 - transform: Translate {x: styleData.pressed ? 1 : 0; y: styleData.pressed ? 1 : 0} - } - } -} diff --git a/qtquickcontrols/TextFieldBackground.qml b/qtquickcontrols/TextFieldBackground.qml deleted file mode 100644 --- a/qtquickcontrols/TextFieldBackground.qml +++ /dev/null @@ -1,13 +0,0 @@ -import QtQuick 2.1 -import "ColorUtils.js" as ColorUtils - -Rectangle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - opacity: control.enabled ? 1.0 : 0.5 - implicitHeight: 32 - implicitWidth: 148 - border.width: control.activeFocus ? 2 : 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : ColorUtils.adjustAlpha(sysPalette.windowText, 0.3) - radius: 2.5 - color: sysPalette.base -} diff --git a/qtquickcontrols/TextFieldStyle.qml b/qtquickcontrols/TextFieldStyle.qml deleted file mode 100644 --- a/qtquickcontrols/TextFieldStyle.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 - -TextFieldStyle { - background: TextFieldBackground{} -} - diff --git a/qtquickcontrols/ToolBarStyle.qml b/qtquickcontrols/ToolBarStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ToolBarStyle.qml +++ /dev/null @@ -1,18 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls.Styles 1.1 - -ToolBarStyle { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - padding { - left: 4 - right: 4 - top: 4 - bottom: 4 - } - background: Rectangle { - implicitHeight: 16 - implicitWidth: 200 - color: sysPalette.window - } -} diff --git a/qtquickcontrols/ToolButtonStyle.qml b/qtquickcontrols/ToolButtonStyle.qml deleted file mode 100644 --- a/qtquickcontrols/ToolButtonStyle.qml +++ /dev/null @@ -1,61 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Private 1.0 -import "ColorUtils.js" as ColorUtils - -Style { - SystemPalette { id: sysPalette; colorGroup: SystemPalette.Active } - - readonly property ToolButton control: __control - property Component panel: Item { - id: styleitem - opacity: control.enabled ? 1.0 : 0.5 - implicitWidth: (hasIcon ? 36 : Math.max(label.implicitWidth + 16, 36)) - + (arrow.visible ? 10 : 0) - implicitHeight: hasIcon ? 36 : Math.max(label.implicitHeight, 36) - - readonly property bool hasIcon: icon.status === Image.Ready || icon.status === Image.Loading - - Rectangle { - anchors.centerIn: parent - implicitWidth: parent.width - 2 - implicitHeight: parent.height - 2 - border.width: 1 - border.color: (control.activeFocus || control.hovered) ? sysPalette.highlight : ColorUtils.adjustAlpha(sysPalette.windowText, 0.25) - radius: 2.5 - color: control.pressed || control.checked ? sysPalette.highlight : sysPalette.button - visible: control.hovered || control.activeFocus || control.checked - } - Item { - anchors.left: parent.left - anchors.right: arrow.left - anchors.top: parent.top - anchors.bottom: parent.bottom - clip: true - Text { - id: label - visible: !hasIcon - anchors.centerIn: parent - text: StyleHelpers.stylizeMnemonics(control.text) - color: control.pressed || control.checked ? sysPalette.highlightedText : sysPalette.buttonText - } - Image { - id: icon - anchors.centerIn: parent - source: control.iconSource - } - } - ScrollArrow { - id: arrow - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: visible ? 3 : 0 - implicitWidth: control.menu !== null ? 6: 0 - implicitHeight: 6 - visible: control.menu !== null - rotation: control.pressed ? 0 : 180 - arrowColor: (control.activeFocus && !control.editable) ? sysPalette.highlightedText : sysPalette.buttonText - } - } -} - diff --git a/qtquickcontrols/Triangle.qml b/qtquickcontrols/Triangle.qml deleted file mode 100644 --- a/qtquickcontrols/Triangle.qml +++ /dev/null @@ -1,38 +0,0 @@ -import QtQuick 2.0 - -Item { - width: 100 - height: 100 - clip: true - property real sideLength: 70.7 - property alias color: __triangleSubRect.color - function updateClipRect() { - width = sideLength/Math.cos(Math.PI/4); - height = sideLength/Math.cos(Math.PI/4); - } - - Rectangle { - id:__triangleSubRect - anchors.top: parent.top - anchors.left: parent.left - width: parent.sideLength - height: parent.sideLength - color: "red" - transform: Rotation { - origin.x: 0 - origin.y: 0 - angle: -45 - } - } - transform: [Rotation { - origin.x: 0 - origin.y: 0 - angle: -45 - }, - Translate { - y: width - } - ] - - onSideLengthChanged: updateClipRect() -} diff --git a/qtquickcontrols/qmldir b/qtquickcontrols/qmldir deleted file mode 100644 --- a/qtquickcontrols/qmldir +++ /dev/null @@ -1,21 +0,0 @@ -module QtQuick.Controls.Styles.Breeze - -ApplicationWindowStyle 1.0 ApplicationWindowStyle.qml -BusyIndicatorStyle 1.0 BusyIndicatorStyle.qml -ButtonStyle 1.0 ButtonStyle.qml -CheckBoxStyle 1.0 CheckBoxStyle.qml -ComboBoxStyle 1.0 ComboBoxStyle.qml -FocusFrameStyle 1.0 FocusFrameStyle.qml -ProgressBarStyle 1.0 ProgressBarStyle.qml -RadioButtonStyle 1.0 RadioButtonStyle.qml -ScrollViewStyle 1.0 ScrollViewStyle.qml -SliderStyle 1.0 SliderStyle.qml -SpinBoxStyle 1.0 SpinBoxStyle.qml -StatusBarStyle 1.0 StatusBarStyle.qml -SwitchStyle 1.0 SwitchStyle.qml -TableViewStyle 1.0 TableViewStyle.qml -TabViewStyle 1.0 TabViewStyle.qml -TextAreaStyle 1.0 TextAreaStyle.qml -TextFieldStyle 1.0 TextFieldStyle.qml -ToolBarStyle 1.0 ToolBarStyle.qml -ToolButtonStyle 1.0 ToolButtonStyle.qml