feat: add text field
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import QtQuick
|
||||
import DesignSystem
|
||||
import QtQuick.Controls.Basic
|
||||
import QtQuick.Controls.impl
|
||||
|
||||
TextField {
|
||||
id: control
|
||||
|
||||
background: Rectangle {
|
||||
implicitWidth: 200
|
||||
implicitHeight: 40
|
||||
border.width: control.activeFocus ? 2 : 1
|
||||
color: control.palette.base
|
||||
border.color: control.activeFocus ? control.palette.highlight : control.palette.mid
|
||||
|
||||
radius: Theme.radius
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ ApplicationWindow {
|
||||
light: Theme.secondaryText
|
||||
highlight: Theme.muted
|
||||
highlightedText: Theme.secondaryBackground
|
||||
placeholderText: Theme.muted
|
||||
}
|
||||
|
||||
title: qsTr("Flowy")
|
||||
|
||||
@@ -24,6 +24,7 @@ set(plain_qml_files
|
||||
AppLogo.qml
|
||||
AppWindow.qml
|
||||
AppComboBox.qml
|
||||
AppTextField.qml
|
||||
)
|
||||
set(qml_singletons
|
||||
Fonts.qml
|
||||
|
||||
@@ -93,5 +93,9 @@ AppWindow {
|
||||
model.append({text: editText})
|
||||
}
|
||||
}
|
||||
|
||||
AppTextField {
|
||||
placeholderText: qsTr("Enter name")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user