Hard code colors.

Fix indentation.
Created custom components.
Italic text on placeholder text.
This commit is contained in:
armored-dragon 2024-10-27 03:52:19 -05:00
parent 5918f95f99
commit d3bf9a5cb7
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 25 additions and 13 deletions

View file

@ -205,6 +205,8 @@ Rectangle {
height: parent.height height: parent.height
placeholderText: pageVal.charAt(0).toUpperCase() + pageVal.slice(1) + " chat message..." placeholderText: pageVal.charAt(0).toUpperCase() + pageVal.slice(1) + " chat message..."
clip: false clip: false
font.italic: text == ""
Keys.onPressed: { Keys.onPressed: {
if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) { if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) {
event.accepted = true; event.accepted = true;

View file

@ -1,7 +1,7 @@
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4
Rectangle { Item {
id: root id: root
property var window property var window
@ -21,15 +21,22 @@ Rectangle {
z: 99 z: 99
visible: false visible: false
TextArea { Rectangle {
id: textArea
x: 0
width: parent.width width: parent.width
height: parent.height height: parent.height
text:"" color: Qt.rgba(0.95,0.95,0.95,1)
textColor: "#ffffff" }
TextInput {
id: textArea
x: 5
width: parent.width
height: parent.height
text: ""
color: "#000"
clip: false clip: false
font.pointSize: 18 font.pointSize: 18
verticalAlignment: Text.AlignVCenter
Keys.onReturnPressed: { _onEnterPressed(); } Keys.onReturnPressed: { _onEnterPressed(); }
Keys.onEnterPressed: { _onEnterPressed(); } Keys.onEnterPressed: { _onEnterPressed(); }
@ -52,33 +59,36 @@ Rectangle {
text: "Local message..." text: "Local message..."
font.pointSize: 16 font.pointSize: 16
color: "gray" color: "gray"
x: 0 x: 5
width: parent.width width: parent.width
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: textArea.text == "" visible: textArea.text == ""
font.italic: true
} }
Button { Rectangle {
id: button id: button
x: parent.width - width x: parent.width - width
y: 0 y: 0
width: 64 width: 64
height: parent.height height: parent.height
clip: false clip: false
visible: true color: "#262626"
Image { Image {
id: image id: image
width: 30 width: 30
height: 30 height: 30
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
visible: true
anchors.centerIn: parent anchors.centerIn: parent
source: "./img/ui/send_white.png" source: "./img/ui/send_white.png"
} }
onClicked: { MouseArea {
_onEnterPressed(); anchors.fill: parent
onClicked: {
_onEnterPressed();
}
} }
} }