forked from cwtch.im/ui
layout improvements
This commit is contained in:
parent
e86686f2f7
commit
ecb182197b
|
@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
|
||||||
import QtQuick.Controls.Material 2.0
|
import QtQuick.Controls.Material 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.11
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
import "../widgets"
|
import "../widgets"
|
||||||
|
import "../styles"
|
||||||
|
|
||||||
ColumnLayout { // settingsPane
|
ColumnLayout { // settingsPane
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -16,13 +18,17 @@ ColumnLayout { // settingsPane
|
||||||
aux.visible: false
|
aux.visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
leftPadding: 10
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
text: "Server:"
|
text: "Server:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtServer
|
id: txtServer
|
||||||
width: 100
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
text: "6xnl4rlc5gq5crnyki6wp6qy2dy2brsjtfixwhgujfycsu7jly7pmxad"
|
text: "6xnl4rlc5gq5crnyki6wp6qy2dy2brsjtfixwhgujfycsu7jly7pmxad"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,9 +36,9 @@ ColumnLayout { // settingsPane
|
||||||
text: "Group name:"
|
text: "Group name:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtGroupName
|
id: txtGroupName
|
||||||
width: 100
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
text: "my awesome group"
|
text: "my awesome group"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +50,7 @@ ColumnLayout { // settingsPane
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}//end of column with padding
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
zoomSlider.value = Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
|
zoomSlider.value = Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
|
||||||
|
|
|
@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
|
||||||
import QtQuick.Controls.Material 2.0
|
import QtQuick.Controls.Material 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.11
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
import "../widgets"
|
import "../widgets"
|
||||||
|
import "../styles"
|
||||||
|
|
||||||
ColumnLayout { // groupSettingsPane
|
ColumnLayout { // groupSettingsPane
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -17,23 +19,38 @@ ColumnLayout { // groupSettingsPane
|
||||||
aux.visible: false
|
aux.visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
leftPadding: 10
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
text: "Server:"
|
text: "Server:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtServer
|
id: txtServer
|
||||||
width: 100
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SimpleButton {
|
||||||
|
icon: "regular/clipboard"
|
||||||
|
text: "copy"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
gcd.popup("copied to clipboard!")
|
||||||
|
txtServer.selectAll()
|
||||||
|
txtServer.copy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
text: "Invitation:"
|
text: "Invitation:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtInvitation
|
id: txtInvitation
|
||||||
width: 200
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,9 +69,9 @@ ColumnLayout { // groupSettingsPane
|
||||||
text: "Group name:"
|
text: "Group name:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtGroupName
|
id: txtGroupName
|
||||||
width: 100
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleButton {
|
SimpleButton {
|
||||||
|
@ -71,9 +88,9 @@ ColumnLayout { // groupSettingsPane
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: cbInvite
|
id: cbInvite
|
||||||
popup.font.pixelSize: 12
|
//popup.font.pixelSize: 12
|
||||||
width: 200
|
width: 200
|
||||||
font.pixelSize: 20
|
//font.pixelSize: 20
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleButton {
|
SimpleButton {
|
||||||
|
@ -84,6 +101,7 @@ ColumnLayout { // groupSettingsPane
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}//end of column with padding
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: gcd
|
target: gcd
|
||||||
|
|
|
@ -4,8 +4,10 @@ import QtQuick.Controls 2.4
|
||||||
import QtQuick.Controls.Material 2.0
|
import QtQuick.Controls.Material 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.11
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
import "../widgets"
|
import "../widgets"
|
||||||
|
import "../styles"
|
||||||
|
|
||||||
ColumnLayout { // peerSettingsPane
|
ColumnLayout { // peerSettingsPane
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -19,23 +21,38 @@ ColumnLayout { // peerSettingsPane
|
||||||
back.onClicked: theStack.pane = theStack.messagePane
|
back.onClicked: theStack.pane = theStack.messagePane
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
leftPadding: 10
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
text: "Address:"
|
text: "Address:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtOnion
|
id: txtOnion
|
||||||
width: 100
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
readOnly: true
|
readOnly: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SimpleButton {
|
||||||
|
icon: "regular/clipboard"
|
||||||
|
text: "copy"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
gcd.popup("copied to clipboard!")
|
||||||
|
txtOnion.selectAll()
|
||||||
|
txtOnion.copy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ScalingLabel{
|
ScalingLabel{
|
||||||
text: "Display name:"
|
text: "Display name:"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEdit {
|
TextField {
|
||||||
id: txtDisplayName
|
id: txtDisplayName
|
||||||
width: 200
|
style: CwtchTextFieldStyle{ width: 400 }
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleButton {
|
SimpleButton {
|
||||||
|
@ -48,6 +65,8 @@ ColumnLayout { // peerSettingsPane
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}//end of column with padding
|
||||||
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: gcd
|
target: gcd
|
||||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Controls 2.4
|
||||||
import QtQuick.Controls.Material 2.0
|
import QtQuick.Controls.Material 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.11
|
import QtQuick.Window 2.11
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
import "../widgets"
|
import "../widgets"
|
||||||
|
|
||||||
|
@ -16,16 +17,21 @@ ColumnLayout { // settingsPane
|
||||||
aux.visible: false
|
aux.visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Column {
|
||||||
|
leftPadding: 10
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
text: "welcome to the global app settings page!"
|
text: "Interface zoom (mostly affects text and button sizes):"
|
||||||
}
|
}
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: zoomSlider
|
id: zoomSlider
|
||||||
from: 0.5
|
minimumValue: 0.5
|
||||||
to: 2.4
|
maximumValue: 2.4
|
||||||
value: 1
|
value: 1
|
||||||
|
updateValueWhileDragging: false
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
gcd.themeScale = zoomSlider.value
|
gcd.themeScale = zoomSlider.value
|
||||||
}
|
}
|
||||||
|
@ -37,7 +43,7 @@ ColumnLayout { // settingsPane
|
||||||
}
|
}
|
||||||
|
|
||||||
ScalingLabel{
|
ScalingLabel{
|
||||||
text: "Default size text, scale factor: " + zoomSlider.value
|
text: "Default size text (scale factor: " + zoomSlider.value + ")"
|
||||||
}
|
}
|
||||||
|
|
||||||
ScalingLabel {
|
ScalingLabel {
|
||||||
|
@ -45,6 +51,7 @@ ColumnLayout { // settingsPane
|
||||||
size: 8
|
size: 8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}//end of column with padding
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
zoomSlider.value = 1 //Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
|
zoomSlider.value = 1 //Screen.pixelDensity / 3.2 // artistic license. set by erinn. fight me before changing
|
||||||
|
|
|
@ -3,10 +3,14 @@ import QtQuick 2.7
|
||||||
|
|
||||||
|
|
||||||
TextFieldStyle {
|
TextFieldStyle {
|
||||||
|
id: root
|
||||||
textColor: "black"
|
textColor: "black"
|
||||||
|
font.pointSize: 10
|
||||||
|
property int width: 100
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: 2
|
radius: 2
|
||||||
implicitWidth: 100
|
implicitWidth: root.width
|
||||||
implicitHeight: 24
|
implicitHeight: 24
|
||||||
color: windowItem.cwtch_background_color
|
color: windowItem.cwtch_background_color
|
||||||
border.color: windowItem.cwtch_color
|
border.color: windowItem.cwtch_color
|
||||||
|
|
Loading…
Reference in New Issue