layout improvements

This commit is contained in:
erinn 2019-02-12 14:47:23 -08:00
parent e86686f2f7
commit ecb182197b
5 changed files with 76 additions and 21 deletions

View File

@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import "../widgets"
import "../styles"
ColumnLayout { // settingsPane
anchors.fill: parent
@ -16,13 +18,17 @@ ColumnLayout { // settingsPane
aux.visible: false
}
Column {
leftPadding: 10
spacing: 5
ScalingLabel {
text: "Server:"
}
TextEdit {
TextField {
id: txtServer
width: 100
style: CwtchTextFieldStyle{ width: 400 }
text: "6xnl4rlc5gq5crnyki6wp6qy2dy2brsjtfixwhgujfycsu7jly7pmxad"
}
@ -30,9 +36,9 @@ ColumnLayout { // settingsPane
text: "Group name:"
}
TextEdit {
TextField {
id: txtGroupName
width: 100
style: CwtchTextFieldStyle{ width: 400 }
text: "my awesome group"
}
@ -44,6 +50,7 @@ ColumnLayout { // settingsPane
}
}
}//end of column with padding
Component.onCompleted: {
zoomSlider.value = Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing

View File

@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import "../widgets"
import "../styles"
ColumnLayout { // groupSettingsPane
anchors.fill: parent
@ -17,23 +19,38 @@ ColumnLayout { // groupSettingsPane
aux.visible: false
}
Column {
leftPadding: 10
spacing: 5
ScalingLabel {
text: "Server:"
}
TextEdit {
TextField {
id: txtServer
width: 100
style: CwtchTextFieldStyle{ width: 400 }
readOnly: true
}
SimpleButton {
icon: "regular/clipboard"
text: "copy"
onClicked: {
gcd.popup("copied to clipboard!")
txtServer.selectAll()
txtServer.copy()
}
}
ScalingLabel {
text: "Invitation:"
}
TextEdit {
TextField {
id: txtInvitation
width: 200
style: CwtchTextFieldStyle{ width: 400 }
readOnly: true
}
@ -52,9 +69,9 @@ ColumnLayout { // groupSettingsPane
text: "Group name:"
}
TextEdit {
TextField {
id: txtGroupName
width: 100
style: CwtchTextFieldStyle{ width: 400 }
}
SimpleButton {
@ -71,9 +88,9 @@ ColumnLayout { // groupSettingsPane
ComboBox {
id: cbInvite
popup.font.pixelSize: 12
//popup.font.pixelSize: 12
width: 200
font.pixelSize: 20
//font.pixelSize: 20
}
SimpleButton {
@ -84,6 +101,7 @@ ColumnLayout { // groupSettingsPane
}
}
}//end of column with padding
Connections {
target: gcd

View File

@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import "../widgets"
import "../styles"
ColumnLayout { // peerSettingsPane
anchors.fill: parent
@ -19,23 +21,38 @@ ColumnLayout { // peerSettingsPane
back.onClicked: theStack.pane = theStack.messagePane
}
Column {
leftPadding: 10
spacing: 5
ScalingLabel {
text: "Address:"
}
TextEdit {
TextField {
id: txtOnion
width: 100
style: CwtchTextFieldStyle{ width: 400 }
readOnly: true
}
SimpleButton {
icon: "regular/clipboard"
text: "copy"
onClicked: {
gcd.popup("copied to clipboard!")
txtOnion.selectAll()
txtOnion.copy()
}
}
ScalingLabel{
text: "Display name:"
}
TextEdit {
TextField {
id: txtDisplayName
width: 200
style: CwtchTextFieldStyle{ width: 400 }
}
SimpleButton {
@ -48,6 +65,8 @@ ColumnLayout { // peerSettingsPane
}
}
}//end of column with padding
Connections {
target: gcd

View File

@ -4,6 +4,7 @@ import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls 1.4
import "../widgets"
@ -16,16 +17,21 @@ ColumnLayout { // settingsPane
aux.visible: false
}
Column {
leftPadding: 10
spacing: 5
ScalingLabel {
Layout.maximumWidth: parent.width
text: "welcome to the global app settings page!"
text: "Interface zoom (mostly affects text and button sizes):"
}
Slider {
id: zoomSlider
from: 0.5
to: 2.4
minimumValue: 0.5
maximumValue: 2.4
value: 1
updateValueWhileDragging: false
onValueChanged: {
gcd.themeScale = zoomSlider.value
}
@ -37,7 +43,7 @@ ColumnLayout { // settingsPane
}
ScalingLabel{
text: "Default size text, scale factor: " + zoomSlider.value
text: "Default size text (scale factor: " + zoomSlider.value + ")"
}
ScalingLabel {
@ -45,6 +51,7 @@ ColumnLayout { // settingsPane
size: 8
}
}//end of column with padding
Component.onCompleted: {
zoomSlider.value = 1 //Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing

View File

@ -3,10 +3,14 @@ import QtQuick 2.7
TextFieldStyle {
id: root
textColor: "black"
font.pointSize: 10
property int width: 100
background: Rectangle {
radius: 2
implicitWidth: 100
implicitWidth: root.width
implicitHeight: 24
color: windowItem.cwtch_background_color
border.color: windowItem.cwtch_color