[aurorae] Change QML for themes to QtQuick 2
Needed for getting proper previews in the QtQuick 2 based kcm. Obviously this breaks Aurorae as Aurorae is not yet migrated to QtQuick 2. But there is no more broken than broken anyway.
This commit is contained in:
parent
97572f3dbb
commit
cd6fadc84c
13 changed files with 27 additions and 27 deletions
|
@ -30,11 +30,11 @@ set(decoration_plugin_SRCS
|
|||
|
||||
add_library(decorationplugin SHARED ${decoration_plugin_SRCS})
|
||||
target_link_libraries(decorationplugin
|
||||
Qt5::Declarative
|
||||
Qt5::Quick
|
||||
kdecorations
|
||||
KF5::KConfigWidgets
|
||||
)
|
||||
install(TARGETS decorationplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration)
|
||||
install(TARGETS decorationplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
|
@ -57,5 +57,5 @@ install( FILES
|
|||
qml/AppMenuButton.qml
|
||||
qml/ButtonGroup.qml
|
||||
qml/qmldir
|
||||
DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration )
|
||||
DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration )
|
||||
install( FILES kwindecoration.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
|
||||
|
|
|
@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "decorationplugin.h"
|
||||
#include "colorhelper.h"
|
||||
#include "decorationoptions.h"
|
||||
#include <qdeclarative.h>
|
||||
#include <QtQml>
|
||||
|
||||
void DecorationPlugin::registerTypes(const char *uri)
|
||||
{
|
||||
|
|
|
@ -16,9 +16,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*********************************************************************/
|
||||
#ifndef DECORATION_PLUGIN_H
|
||||
#define DECORATION_PLUGIN_H
|
||||
#include <QDeclarativeExtensionPlugin>
|
||||
#include <QQmlExtensionPlugin>
|
||||
|
||||
class DecorationPlugin : public QDeclarativeExtensionPlugin
|
||||
class DecorationPlugin : public QQmlExtensionPlugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "org.kde.kwin.decoration")
|
||||
Q_OBJECT
|
||||
|
|
|
@ -14,8 +14,8 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import org.kde.qtextracomponents 0.1 as QtExtra
|
||||
import QtQuick 2.0
|
||||
import org.kde.qtextracomponents 2.0 as QtExtra
|
||||
|
||||
DecorationButton {
|
||||
id: appMenuButton
|
||||
|
|
|
@ -14,8 +14,8 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
DecorationButton {
|
||||
function widthForButton() {
|
||||
|
|
|
@ -14,21 +14,21 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Item {
|
||||
function createButtons() {
|
||||
var component = Qt.createComponent("AuroraeButton.qml");
|
||||
for (var i=0; i<buttons.length; i++) {
|
||||
if (buttons.charAt(i) == "_") {
|
||||
Qt.createQmlObject("import QtQuick 1.1; Item { width: auroraeTheme.explicitButtonSpacer * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
Qt.createQmlObject("import QtQuick 2.0; Item { width: auroraeTheme.explicitButtonSpacer * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
groupRow, "explicitSpacer" + buttons + i);
|
||||
} else if (buttons.charAt(i) == "M") {
|
||||
Qt.createQmlObject("import QtQuick 1.1; MenuButton { width: auroraeTheme.buttonWidthMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
Qt.createQmlObject("import QtQuick 2.0; MenuButton { width: auroraeTheme.buttonWidthMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
groupRow, "menuButton" + buttons + i);
|
||||
} else if (buttons.charAt(i) == "N") {
|
||||
Qt.createQmlObject("import QtQuick 1.1; AppMenuButton { width: auroraeTheme.buttonWidthAppMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
Qt.createQmlObject("import QtQuick 2.0; AppMenuButton { width: auroraeTheme.buttonWidthAppMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
|
||||
groupRow, "appMenuButton" + buttons + i);
|
||||
} else if (buttons.charAt(i) == "A") {
|
||||
var maximizeComponent = Qt.createComponent("AuroraeMaximizeButton.qml");
|
||||
|
@ -47,7 +47,7 @@ Item {
|
|||
spacing: auroraeTheme.buttonSpacing * auroraeTheme.buttonSizeFactor
|
||||
}
|
||||
onButtonsChanged: {
|
||||
for (i = 0; i < groupRow.children.length; i++) {
|
||||
for (var i = 0; i < groupRow.children.length; i++) {
|
||||
groupRow.children[i].destroy();
|
||||
}
|
||||
createButtons();
|
||||
|
|
|
@ -14,7 +14,7 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
id: button
|
||||
|
|
|
@ -14,7 +14,7 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
function createButtons() {
|
||||
|
@ -58,7 +58,7 @@ Item {
|
|||
if (!component) {
|
||||
continue;
|
||||
}
|
||||
var button = Qt.createQmlObject("import QtQuick 1.1; Loader{}", groupRow, "dynamicGroup_" + buttons + i);
|
||||
var button = Qt.createQmlObject("import QtQuick 2.0; Loader{}", groupRow, "dynamicGroup_" + buttons + i);
|
||||
button.sourceComponent = component;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
import org.kde.kwin.decoration 0.1
|
||||
|
||||
Item {
|
||||
signal alphaChanged()
|
||||
property QtObject borders: Borders {
|
||||
objectName: "borders"
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ Item {
|
|||
objectName: "padding"
|
||||
}
|
||||
property bool alpha: true
|
||||
onAlphaChanged: alphaChanged()
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -14,7 +14,7 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
id: button
|
||||
|
|
|
@ -14,8 +14,8 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import org.kde.qtextracomponents 0.1 as QtExtra
|
||||
import QtQuick 2.0
|
||||
import org.kde.qtextracomponents 2.0 as QtExtra
|
||||
|
||||
DecorationButton {
|
||||
property bool closeOnDoubleClick: true
|
||||
|
|
|
@ -14,9 +14,9 @@ General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
import org.kde.kwin.decoration 0.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
Decoration {
|
||||
id: root
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
module org.kde.kwin.decoration
|
||||
plugin decorationplugin
|
||||
|
||||
Decoration 0.1 Decoration.qml
|
||||
|
|
Loading…
Reference in a new issue