diff --git a/kcmkwin/kwindecoration/kcm.cpp b/kcmkwin/kwindecoration/kcm.cpp --- a/kcmkwin/kwindecoration/kcm.cpp +++ b/kcmkwin/kwindecoration/kcm.cpp @@ -426,7 +426,7 @@ void ConfigurationModule::updateColors() { m_quickView->rootContext()->setContextProperty("backgroundColor", m_ui->palette().color(QPalette::Active, QPalette::Window)); - m_quickView->rootContext()->setContextProperty("highlightColor", m_ui->palette().color(QPalette::Active, QPalette::Highlight)); + m_quickView->rootContext()->setContextProperty("highlightColor", m_ui->palette().color(QPalette::Active, QPalette::Shadow)); m_quickView->rootContext()->setContextProperty("baseColor", m_ui->palette().color(QPalette::Active, QPalette::Base)); } diff --git a/kcmkwin/kwindecoration/qml/ButtonGroup.qml b/kcmkwin/kwindecoration/qml/ButtonGroup.qml --- a/kcmkwin/kwindecoration/qml/ButtonGroup.qml +++ b/kcmkwin/kwindecoration/qml/ButtonGroup.qml @@ -49,7 +49,7 @@ } MouseArea { id: dragArea - cursorShape: Qt.PointingHandCursor + cursorShape: Qt.DragMoveCursor anchors.fill: parent drag.target: button onReleased: { diff --git a/kcmkwin/kwindecoration/qml/Buttons.qml b/kcmkwin/kwindecoration/qml/Buttons.qml --- a/kcmkwin/kwindecoration/qml/Buttons.qml +++ b/kcmkwin/kwindecoration/qml/Buttons.qml @@ -37,21 +37,21 @@ } Rectangle { anchors.fill: parent - anchors.topMargin: units.gridUnit / 2 border.width: Math.ceil(units.gridUnit / 16.0) - color: backgroundColor; - border.color: highlightColor; + border.color: highlightColor + color: baseColor ColumnLayout { id: layout width: parent.width height: titlebarRect.height + availableGrid.height + dragHint.height + 5*layout.spacing Rectangle { id: titlebarRect height: buttonPreviewRow.height + units.smallSpacing - Layout.fillWidth: true border.width: Math.ceil(units.gridUnit / 16.0) border.color: highlightColor - color: backgroundColor; + color: backgroundColor + Layout.fillWidth: true + Layout.topMargin: -border.width RowLayout { id: buttonPreviewRow anchors.top: parent.top; @@ -81,7 +81,13 @@ } } DropArea { - anchors.fill: buttonPreviewRow + anchors { + fill: titlebarRect + leftMargin: -units.iconSizes.small + topMargin: -units.iconSizes.small + rightMargin: +units.iconSizes.small + bottomMargin: +units.iconSizes.small + } keys: [ "decoButtonAdd", "decoButtonRight", "decoButtonLeft" ] onEntered: { drag.accept(); @@ -123,26 +129,21 @@ drag.source.buttonsModel.move(drag.source.itemIndex, index); } } else { - // move to right view + // move to left view view.model.add(index, drag.source.type); drag.source.buttonsModel.remove(drag.source.itemIndex); } } } } } - Text { - id: iCannotBelieveIDoThis - text: "gnarf" - visible: false - } GridView { id: availableGrid Layout.fillWidth: true model: availableButtons interactive: false cellWidth: iconLabel.implicitWidth - cellHeight: units.iconSizes.small + iCannotBelieveIDoThis.implicitHeight + 4*units.smallSpacing + cellHeight: 2*units.iconSizes.small + dragHint.implicitHeight height: Math.ceil(cellHeight * 2.5) delegate: Item { id: availableDelegate @@ -174,7 +175,7 @@ id: dragArea anchors.fill: parent drag.target: availableButton - cursorShape: Qt.PointingHandCursor + cursorShape: Qt.DragMoveCursor onReleased: { if (availableButton.Drag.target) { availableButton.Drag.drop(); @@ -195,7 +196,7 @@ } ColumnLayout { anchors.centerIn: parent - visible: leftButtonsView.dragging || rightButtonsView.dragging + opacity: (leftButtonsView.dragging || rightButtonsView.dragging) ? 1.0 : 0.0 QQC2.Label { text: i18n("Drop here to remove button") font.weight: Font.Bold @@ -215,10 +216,8 @@ } Text { id: dragHint - visible: !(leftButtonsView.dragging || rightButtonsView.dragging || availableGrid.dragging) + opacity: (leftButtonsView.dragging || rightButtonsView.dragging || availableGrid.dragging) ? 0.0 : 0.50 Layout.fillWidth: true - color: backgroundColor; - opacity: 0.66 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignTop text: i18n("Drag buttons between here and the titlebar")