diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index 863c9d61e091b4b101c2ed0cce42ee739bcb9105..a098c3d3b82c89f48eb608804ca6147ee9d59fd9 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -37,10 +37,10 @@ exampledirs += ../../../examples/quick/controls examplesinstallpath = quick/controls headerdirs += ../ -headerdirs += ../ ../../styles +headerdirs += ../ ../../styles/Base sourcedirs += ../ -sourcedirs += ../ ../../styles +sourcedirs += ../ ../../styles/Base sources += ../../private/qstyleitem.cpp \ ../../private/AbstractCheckable.qml \ @@ -51,19 +51,6 @@ sources += ../../private/qstyleitem.cpp \ ../../private/ScrollBar.qml \ ../../private/TabBar.qml \ ../../private/Control.qml \ - ../../styles/Style.qml \ - ../../styles/ButtonStyle.qml \ - ../../styles/CheckBoxStyle.qml \ - ../../styles/ComboBoxStyle.qml \ - ../../styles/GroupBoxStyle.qml \ - ../../styles/MenuBarStyle.qml \ - ../../styles/ProgressBarStyle.qml \ - ../../styles/RadioButtonStyle.qml \ - ../../styles/SliderStyle.qml \ - ../../styles/SpinBoxStyle.qml \ - ../../styles/TabViewStyle.qml \ - ../../styles/TextFieldStyle.qml \ - ../../styles/ToolBarStyle.qml \ - ../../styles/ToolButtonStyle.qml + ../../private/Style.qml imagedirs += images diff --git a/src/private/qquickcontrolsettings.cpp b/src/private/qquickcontrolsettings.cpp index 3b7d5506b536d36cd4c9b9a033d913161bf0081c..161398322ba2c2e0cfdc32396cb63feb770f06dc 100644 --- a/src/private/qquickcontrolsettings.cpp +++ b/src/private/qquickcontrolsettings.cpp @@ -54,7 +54,7 @@ QString QQuickControlSettings::theme() { static QString currentTheme; if (currentTheme.isEmpty()) { - currentTheme = QLatin1String("Styles"); + currentTheme = QLatin1String("Styles/Base"); #ifndef QT_NO_WIDGETS //Only enable QStyle support when we are using QApplication if (QCoreApplication::instance()->inherits("QApplication")) { diff --git a/src/styles/ButtonStyle.qml b/src/styles/Base/ButtonStyle.qml similarity index 100% rename from src/styles/ButtonStyle.qml rename to src/styles/Base/ButtonStyle.qml diff --git a/src/styles/CheckBoxStyle.qml b/src/styles/Base/CheckBoxStyle.qml similarity index 100% rename from src/styles/CheckBoxStyle.qml rename to src/styles/Base/CheckBoxStyle.qml diff --git a/src/styles/ComboBoxStyle.qml b/src/styles/Base/ComboBoxStyle.qml similarity index 100% rename from src/styles/ComboBoxStyle.qml rename to src/styles/Base/ComboBoxStyle.qml diff --git a/src/styles/FocusFrameStyle.qml b/src/styles/Base/FocusFrameStyle.qml similarity index 100% rename from src/styles/FocusFrameStyle.qml rename to src/styles/Base/FocusFrameStyle.qml diff --git a/src/styles/GroupBoxStyle.qml b/src/styles/Base/GroupBoxStyle.qml similarity index 100% rename from src/styles/GroupBoxStyle.qml rename to src/styles/Base/GroupBoxStyle.qml diff --git a/src/styles/MenuBarStyle.qml b/src/styles/Base/MenuBarStyle.qml similarity index 98% rename from src/styles/MenuBarStyle.qml rename to src/styles/Base/MenuBarStyle.qml index cf320fce6620533dadc28cf67f09809f2ee763bd..e5b91be61069c29002012430af0a46d33cfa51e4 100644 --- a/src/styles/MenuBarStyle.qml +++ b/src/styles/Base/MenuBarStyle.qml @@ -40,7 +40,7 @@ import QtQuick 2.1 import QtQuick.Controls.Private 1.0 -import "../Private/style.js" as StyleHelpers +import "../../Private/style.js" as StyleHelpers /*! \qmltype MenuBarStyle diff --git a/src/styles/MenuStyle.qml b/src/styles/Base/MenuStyle.qml similarity index 99% rename from src/styles/MenuStyle.qml rename to src/styles/Base/MenuStyle.qml index df31560582ed3794c10361101e56b3892b6e63c1..69dffc7325582af1e63c4609b0a5e325afea6852 100644 --- a/src/styles/MenuStyle.qml +++ b/src/styles/Base/MenuStyle.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "../Private/style.js" as StyleHelpers +import "../../Private/style.js" as StyleHelpers Style { id: styleRoot diff --git a/src/styles/ProgressBarStyle.qml b/src/styles/Base/ProgressBarStyle.qml similarity index 100% rename from src/styles/ProgressBarStyle.qml rename to src/styles/Base/ProgressBarStyle.qml diff --git a/src/styles/RadioButtonStyle.qml b/src/styles/Base/RadioButtonStyle.qml similarity index 100% rename from src/styles/RadioButtonStyle.qml rename to src/styles/Base/RadioButtonStyle.qml diff --git a/src/styles/ScrollViewStyle.qml b/src/styles/Base/ScrollViewStyle.qml similarity index 100% rename from src/styles/ScrollViewStyle.qml rename to src/styles/Base/ScrollViewStyle.qml diff --git a/src/styles/SliderStyle.qml b/src/styles/Base/SliderStyle.qml similarity index 100% rename from src/styles/SliderStyle.qml rename to src/styles/Base/SliderStyle.qml diff --git a/src/styles/SpinBoxStyle.qml b/src/styles/Base/SpinBoxStyle.qml similarity index 100% rename from src/styles/SpinBoxStyle.qml rename to src/styles/Base/SpinBoxStyle.qml diff --git a/src/styles/StatusBarStyle.qml b/src/styles/Base/StatusBarStyle.qml similarity index 100% rename from src/styles/StatusBarStyle.qml rename to src/styles/Base/StatusBarStyle.qml diff --git a/src/styles/TabViewStyle.qml b/src/styles/Base/TabViewStyle.qml similarity index 100% rename from src/styles/TabViewStyle.qml rename to src/styles/Base/TabViewStyle.qml diff --git a/src/styles/TableViewStyle.qml b/src/styles/Base/TableViewStyle.qml similarity index 100% rename from src/styles/TableViewStyle.qml rename to src/styles/Base/TableViewStyle.qml diff --git a/src/styles/TextFieldStyle.qml b/src/styles/Base/TextFieldStyle.qml similarity index 100% rename from src/styles/TextFieldStyle.qml rename to src/styles/Base/TextFieldStyle.qml diff --git a/src/styles/ToolBarStyle.qml b/src/styles/Base/ToolBarStyle.qml similarity index 100% rename from src/styles/ToolBarStyle.qml rename to src/styles/Base/ToolBarStyle.qml diff --git a/src/styles/ToolButtonStyle.qml b/src/styles/Base/ToolButtonStyle.qml similarity index 100% rename from src/styles/ToolButtonStyle.qml rename to src/styles/Base/ToolButtonStyle.qml diff --git a/src/styles/images/arrow-down.png b/src/styles/Base/images/arrow-down.png similarity index 100% rename from src/styles/images/arrow-down.png rename to src/styles/Base/images/arrow-down.png diff --git a/src/styles/images/arrow-down@2x.png b/src/styles/Base/images/arrow-down@2x.png similarity index 100% rename from src/styles/images/arrow-down@2x.png rename to src/styles/Base/images/arrow-down@2x.png diff --git a/src/styles/images/arrow-left.png b/src/styles/Base/images/arrow-left.png similarity index 100% rename from src/styles/images/arrow-left.png rename to src/styles/Base/images/arrow-left.png diff --git a/src/styles/images/arrow-left@2x.png b/src/styles/Base/images/arrow-left@2x.png similarity index 100% rename from src/styles/images/arrow-left@2x.png rename to src/styles/Base/images/arrow-left@2x.png diff --git a/src/styles/images/arrow-right.png b/src/styles/Base/images/arrow-right.png similarity index 100% rename from src/styles/images/arrow-right.png rename to src/styles/Base/images/arrow-right.png diff --git a/src/styles/images/arrow-right@2x.png b/src/styles/Base/images/arrow-right@2x.png similarity index 100% rename from src/styles/images/arrow-right@2x.png rename to src/styles/Base/images/arrow-right@2x.png diff --git a/src/styles/images/arrow-up.png b/src/styles/Base/images/arrow-up.png similarity index 100% rename from src/styles/images/arrow-up.png rename to src/styles/Base/images/arrow-up.png diff --git a/src/styles/images/arrow-up@2x.png b/src/styles/Base/images/arrow-up@2x.png similarity index 100% rename from src/styles/images/arrow-up@2x.png rename to src/styles/Base/images/arrow-up@2x.png diff --git a/src/styles/images/button.png b/src/styles/Base/images/button.png similarity index 100% rename from src/styles/images/button.png rename to src/styles/Base/images/button.png diff --git a/src/styles/images/button_down.png b/src/styles/Base/images/button_down.png similarity index 100% rename from src/styles/images/button_down.png rename to src/styles/Base/images/button_down.png diff --git a/src/styles/images/editbox.png b/src/styles/Base/images/editbox.png similarity index 100% rename from src/styles/images/editbox.png rename to src/styles/Base/images/editbox.png diff --git a/src/styles/images/focusframe.png b/src/styles/Base/images/focusframe.png similarity index 100% rename from src/styles/images/focusframe.png rename to src/styles/Base/images/focusframe.png diff --git a/src/styles/images/groupbox.png b/src/styles/Base/images/groupbox.png similarity index 100% rename from src/styles/images/groupbox.png rename to src/styles/Base/images/groupbox.png diff --git a/src/styles/images/header.png b/src/styles/Base/images/header.png similarity index 100% rename from src/styles/images/header.png rename to src/styles/Base/images/header.png diff --git a/src/styles/images/progress-indeterminate.png b/src/styles/Base/images/progress-indeterminate.png similarity index 100% rename from src/styles/images/progress-indeterminate.png rename to src/styles/Base/images/progress-indeterminate.png diff --git a/src/styles/images/scrollbar-handle-horizontal.png b/src/styles/Base/images/scrollbar-handle-horizontal.png similarity index 100% rename from src/styles/images/scrollbar-handle-horizontal.png rename to src/styles/Base/images/scrollbar-handle-horizontal.png diff --git a/src/styles/images/scrollbar-handle-vertical.png b/src/styles/Base/images/scrollbar-handle-vertical.png similarity index 100% rename from src/styles/images/scrollbar-handle-vertical.png rename to src/styles/Base/images/scrollbar-handle-vertical.png diff --git a/src/styles/images/tab.png b/src/styles/Base/images/tab.png similarity index 100% rename from src/styles/images/tab.png rename to src/styles/Base/images/tab.png diff --git a/src/styles/images/tab_selected.png b/src/styles/Base/images/tab_selected.png similarity index 100% rename from src/styles/images/tab_selected.png rename to src/styles/Base/images/tab_selected.png diff --git a/src/styles/qmldir b/src/styles/qmldir index d95952395052cc7f223038b8a20d704b07493c75..5077542a56a0798378916f269a0c98abb4fa99a6 100644 --- a/src/styles/qmldir +++ b/src/styles/qmldir @@ -1,11 +1,11 @@ module QtQuick.Controls.Styles -ButtonStyle 1.0 ButtonStyle.qml -CheckBoxStyle 1.0 CheckBoxStyle.qml -ComboBoxStyle 1.0 ComboBoxStyle.qml -ProgressBarStyle 1.0 ProgressBarStyle.qml -RadioButtonStyle 1.0 RadioButtonStyle.qml -ScrollViewStyle 1.0 ScrollViewStyle.qml -SliderStyle 1.0 SliderStyle.qml -TabViewStyle 1.0 TabViewStyle.qml -TableViewStyle 1.0 TableViewStyle.qml -TextFieldStyle 1.0 TextFieldStyle.qml +ButtonStyle 1.0 Base/ButtonStyle.qml +CheckBoxStyle 1.0 Base/CheckBoxStyle.qml +ComboBoxStyle 1.0 Base/ComboBoxStyle.qml +ProgressBarStyle 1.0 Base/ProgressBarStyle.qml +RadioButtonStyle 1.0 Base/RadioButtonStyle.qml +ScrollViewStyle 1.0 Base/ScrollViewStyle.qml +SliderStyle 1.0 Base/SliderStyle.qml +TabViewStyle 1.0 Base/TabViewStyle.qml +TableViewStyle 1.0 Base/TableViewStyle.qml +TextFieldStyle 1.0 Base/TextFieldStyle.qml diff --git a/src/styles/styles.pro b/src/styles/styles.pro index a335020ebe58f4ac1a50ef17871f3c129a39271d..4c0ee5d38434e5d4b4ddcc35975be16ddb071771 100644 --- a/src/styles/styles.pro +++ b/src/styles/styles.pro @@ -1,24 +1,25 @@ TARGETPATH = QtQuick/Controls/Styles +# Base QML_FILES = \ - ButtonStyle.qml \ - CheckBoxStyle.qml \ - ComboBoxStyle.qml \ - FocusFrameStyle.qml \ - GroupBoxStyle.qml \ - MenuBarStyle.qml \ - MenuStyle.qml \ - ProgressBarStyle.qml \ - RadioButtonStyle.qml \ - ScrollViewStyle.qml\ - SliderStyle.qml \ - SpinBoxStyle.qml \ - StatusBarStyle.qml \ - TableViewStyle.qml \ - TabViewStyle.qml \ - TextFieldStyle.qml \ - ToolBarStyle.qml \ - ToolButtonStyle.qml + Base/ButtonStyle.qml \ + Base/CheckBoxStyle.qml \ + Base/ComboBoxStyle.qml \ + Base/FocusFrameStyle.qml \ + Base/GroupBoxStyle.qml \ + Base/MenuBarStyle.qml \ + Base/MenuStyle.qml \ + Base/ProgressBarStyle.qml \ + Base/RadioButtonStyle.qml \ + Base/ScrollViewStyle.qml\ + Base/SliderStyle.qml \ + Base/SpinBoxStyle.qml \ + Base/StatusBarStyle.qml \ + Base/TableViewStyle.qml \ + Base/TabViewStyle.qml \ + Base/TextFieldStyle.qml \ + Base/ToolBarStyle.qml \ + Base/ToolButtonStyle.qml # Desktop QML_FILES += \ @@ -43,24 +44,24 @@ QML_FILES += \ # Images QML_FILES += \ - images/button.png \ - images/button_down.png \ - images/tab.png \ - images/header.png \ - images/groupbox.png \ - images/focusframe.png \ - images/tab_selected.png \ - images/scrollbar-handle-horizontal.png \ - images/scrollbar-handle-vertical.png \ - images/progress-indeterminate.png \ - images/editbox.png \ - images/arrow-up.png \ - images/arrow-up@2x.png \ - images/arrow-down.png \ - images/arrow-down@2x.png \ - images/arrow-left.png \ - images/arrow-left@2x.png \ - images/arrow-right.png \ - images/arrow-right@2x.png + Base/images/button.png \ + Base/images/button_down.png \ + Base/images/tab.png \ + Base/images/header.png \ + Base/images/groupbox.png \ + Base/images/focusframe.png \ + Base/images/tab_selected.png \ + Base/images/scrollbar-handle-horizontal.png \ + Base/images/scrollbar-handle-vertical.png \ + Base/images/progress-indeterminate.png \ + Base/images/editbox.png \ + Base/images/arrow-up.png \ + Base/images/arrow-up@2x.png \ + Base/images/arrow-down.png \ + Base/images/arrow-down@2x.png \ + Base/images/arrow-left.png \ + Base/images/arrow-left@2x.png \ + Base/images/arrow-right.png \ + Base/images/arrow-right@2x.png load(qml_module) diff --git a/src/stylesprivate/qmldir b/src/stylesprivate/qmldir index 866388ca65a1af0164503ef89537e718e638d09a..4d1885d5ee2422940bfd5023d639fb3930baab8e 100644 --- a/src/stylesprivate/qmldir +++ b/src/stylesprivate/qmldir @@ -1,7 +1,7 @@ module QtQuick.Controls.Styles.Private -GroupBoxStyle 1.0 ../GroupBoxStyle.qml -SpinBoxStyle 1.0 ../SpinBoxStyle.qml -ToolBarStyle 1.0 ../ToolBarStyle.qml -StatusBarStyle 1.0 ../StatusBarStyle.qml -ToolButtonStyle 1.0 ../ToolButtonStyle.qml +GroupBoxStyle 1.0 ../Base/GroupBoxStyle.qml +SpinBoxStyle 1.0 ../Base/SpinBoxStyle.qml +ToolBarStyle 1.0 ../Base/ToolBarStyle.qml +StatusBarStyle 1.0 ../Base/StatusBarStyle.qml +ToolButtonStyle 1.0 ../Base/ToolButtonStyle.qml