NInputAction simplification

This commit is contained in:
LemmyCook 2025-09-05 14:19:08 -04:00
parent f04ac180f0
commit 125d844e3b
2 changed files with 27 additions and 32 deletions

View file

@ -81,7 +81,7 @@ ScrollView {
// Info section // Info section
ColumnLayout { ColumnLayout {
spacing: Style.marginS * scaling spacing: Style.marginM * scaling
Layout.fillWidth: true Layout.fillWidth: true
NLabel { NLabel {

View file

@ -3,7 +3,8 @@ import QtQuick.Layouts
import qs.Commons import qs.Commons
import qs.Widgets import qs.Widgets
ColumnLayout { // Input and button row
RowLayout {
id: root id: root
// Public properties // Public properties
@ -21,11 +22,7 @@ ColumnLayout {
// Internal properties // Internal properties
property real scaling: 1.0 property real scaling: 1.0
// Input and button row
RowLayout {
spacing: Style.marginM * scaling spacing: Style.marginM * scaling
Layout.fillWidth: true
NTextInput { NTextInput {
id: textInput id: textInput
@ -40,11 +37,10 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
} }
Item {
Layout.fillWidth: true
}
NButton { NButton {
Layout.fillWidth: false
Layout.alignment: Qt.AlignBottom
text: root.actionButtonText text: root.actionButtonText
icon: root.actionButtonIcon icon: root.actionButtonIcon
backgroundColor: Color.mSecondary backgroundColor: Color.mSecondary
@ -52,10 +48,9 @@ ColumnLayout {
hoverColor: Color.mTertiary hoverColor: Color.mTertiary
pressColor: Color.mPrimary pressColor: Color.mPrimary
enabled: root.actionButtonEnabled enabled: root.actionButtonEnabled
Layout.fillWidth: false
onClicked: { onClicked: {
root.actionClicked() root.actionClicked()
} }
} }
}
} }