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:
@@ -3,7 +3,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../../../Base"
|
||||
import "../../../../Base/ButtonLayout"
|
||||
import "../../../../Base/Buttons"
|
||||
|
||||
HFlickableColumnPage {
|
||||
id: page
|
||||
@@ -27,8 +27,8 @@ HFlickableColumnPage {
|
||||
}
|
||||
|
||||
|
||||
footer: ButtonLayout {
|
||||
ApplyButton {
|
||||
footer: AutoDirectionLayout {
|
||||
PositiveButton {
|
||||
text: qsTr("They're the same")
|
||||
icon.name: "device-verified"
|
||||
onClicked: {
|
||||
@@ -46,7 +46,7 @@ HFlickableColumnPage {
|
||||
}
|
||||
}
|
||||
|
||||
CancelButton {
|
||||
NegativeButton {
|
||||
text: qsTr("They differ")
|
||||
icon.name: "device-blacklisted"
|
||||
onClicked: {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../../../Base"
|
||||
import "../../../../Base/ButtonLayout"
|
||||
import "../../../../Base/Buttons"
|
||||
import "../../../../Base/HTile"
|
||||
|
||||
HTile {
|
||||
|
@@ -4,7 +4,7 @@ import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import "../../../Base"
|
||||
import "../../../Base/ButtonLayout"
|
||||
import "../../../Base/Buttons"
|
||||
|
||||
HFlickableColumnPage {
|
||||
id: settingsView
|
||||
@@ -63,7 +63,7 @@ HFlickableColumnPage {
|
||||
color: theme.chat.roomPane.roomSettings.background
|
||||
}
|
||||
|
||||
footer: ButtonLayout {
|
||||
footer: AutoDirectionLayout {
|
||||
ApplyButton {
|
||||
enabled: anyChange
|
||||
loading: saveFuture !== null
|
||||
|
Reference in New Issue
Block a user