Refactor ButtonLayout module components
- Rename ButtonLayout module to just Buttons - Rename ButtonLayout into AutoDirectionLayout and move it to Base, it's useful not just for buttons - Rename OtherButton into GroupButton, which is now the base of all other Buttons buttons - Add generic (Positive|Middle|Negative)Button components, which are now the base for (Apply|Cancel)Button
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
||||
HGridLayout {
|
||||
readonly property real summedImplicitWidth: {
|
@@ -1,14 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
||||
HButton {
|
||||
text: qsTr("Apply")
|
||||
icon.name: "apply"
|
||||
icon.color: theme.colors.positiveBackground
|
||||
|
||||
Layout.preferredHeight: theme.baseElementsHeight
|
||||
Layout.fillWidth: true
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
||||
HButton {
|
||||
text: qsTr("Cancel")
|
||||
icon.name: "cancel"
|
||||
icon.color: theme.colors.negativeBackground
|
||||
|
||||
Layout.preferredHeight: theme.baseElementsHeight
|
||||
Layout.fillWidth: true
|
||||
}
|
6
src/gui/Base/Buttons/ApplyButton.qml
Normal file
6
src/gui/Base/Buttons/ApplyButton.qml
Normal file
@@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
PositiveButton {
|
||||
text: qsTr("Apply")
|
||||
icon.name: "apply"
|
||||
}
|
6
src/gui/Base/Buttons/CancelButton.qml
Normal file
6
src/gui/Base/Buttons/CancelButton.qml
Normal file
@@ -0,0 +1,6 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
NegativeButton {
|
||||
text: qsTr("Cancel")
|
||||
icon.name: "cancel"
|
||||
}
|
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import ".."
|
||||
|
5
src/gui/Base/Buttons/MiddleButton.qml
Normal file
5
src/gui/Base/Buttons/MiddleButton.qml
Normal file
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
GroupButton {
|
||||
icon.color: theme.colors.middleBackground
|
||||
}
|
5
src/gui/Base/Buttons/NegativeButton.qml
Normal file
5
src/gui/Base/Buttons/NegativeButton.qml
Normal file
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
GroupButton {
|
||||
icon.color: theme.colors.negativeBackground
|
||||
}
|
5
src/gui/Base/Buttons/PositiveButton.qml
Normal file
5
src/gui/Base/Buttons/PositiveButton.qml
Normal file
@@ -0,0 +1,5 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
GroupButton {
|
||||
icon.color: theme.colors.positiveBackground
|
||||
}
|
Reference in New Issue
Block a user