Add settings and settingsList; remove anchors from inside EllipsisLabel
This commit is contained in:
parent
db305895e7
commit
69b08c5be3
|
@ -13,6 +13,7 @@ TextField {
|
||||||
color: Theme.mainTextColor
|
color: Theme.mainTextColor
|
||||||
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
||||||
width: parent.width - 20
|
width: parent.width - 20
|
||||||
|
|
||||||
property string icon
|
property string icon
|
||||||
property string button_text
|
property string button_text
|
||||||
signal clicked
|
signal clicked
|
||||||
|
@ -38,7 +39,7 @@ TextField {
|
||||||
text: button_text
|
text: button_text
|
||||||
anchors { top: parent.top; right: parent.right }
|
anchors { top: parent.top; right: parent.right }
|
||||||
override_radius: 10
|
override_radius: 10
|
||||||
height: parent.height; width: parent.height * 4
|
height: parent.height;
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.focus = true;
|
parent.focus = true;
|
||||||
|
|
|
@ -9,13 +9,10 @@ import "theme"
|
||||||
|
|
||||||
// Needs the parent to have an onWidthChanged that calls .textResize()
|
// Needs the parent to have an onWidthChanged that calls .textResize()
|
||||||
Item {
|
Item {
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
|
|
||||||
property string text
|
property string text
|
||||||
|
|
||||||
property alias color: label.color
|
property alias color: label.color
|
||||||
property alias pixelSize: label.font.pixelSize
|
property alias size: label.font.pixelSize
|
||||||
property alias weight: label.font.weight
|
property alias weight: label.font.weight
|
||||||
property alias strikeout: label.font.strikeout
|
property alias strikeout: label.font.strikeout
|
||||||
property alias font: label.font
|
property alias font: label.font
|
||||||
|
|
|
@ -70,7 +70,9 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
|
||||||
|
|
||||||
EllipsisLabel { // CONTACT NAME
|
EllipsisLabel { // CONTACT NAME
|
||||||
id: cn
|
id: cn
|
||||||
pixelSize: Theme.usernameSize * gcd.themeScale
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
size: Theme.usernameSize * gcd.themeScale
|
||||||
weight: Font.Bold
|
weight: Font.Bold
|
||||||
strikeout: blocked
|
strikeout: blocked
|
||||||
text: displayName
|
text: displayName
|
||||||
|
@ -79,7 +81,9 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
|
||||||
EllipsisLabel { // Onion
|
EllipsisLabel { // Onion
|
||||||
id: onion
|
id: onion
|
||||||
text: handle
|
text: handle
|
||||||
pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
size: Theme.secondaryTextSize * gcd.themeScale
|
||||||
strikeout: blocked
|
strikeout: blocked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick 2.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 QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
|
import "." as Opaque
|
||||||
|
import "../opaque/styles"
|
||||||
|
import "../opaque/theme"
|
||||||
|
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: tehcol
|
||||||
|
|
||||||
|
width: parent.width - 20
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
padding: 10
|
||||||
|
spacing: 10
|
||||||
|
property bool inline: true
|
||||||
|
property bool last: false
|
||||||
|
|
||||||
|
property alias label: settingLabel.text
|
||||||
|
property alias field: fieldContainer.children
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Grid {
|
||||||
|
id: container
|
||||||
|
columns: inline ? 2 : 1
|
||||||
|
spacing: 10
|
||||||
|
padding: 10
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
|
property int gridWidth: inline ? (parent.width / 2) - 20 : parent.width - 20
|
||||||
|
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
Opaque.EllipsisLabel {
|
||||||
|
id: settingLabel
|
||||||
|
width: container.gridWidth
|
||||||
|
color: Theme.mainTextColor
|
||||||
|
size: Theme.secondaryTextSize * gcd.themeScale
|
||||||
|
font.weight: Font.Bold
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: fieldContainer
|
||||||
|
width: container.gridWidth
|
||||||
|
// needs a height so !inline HLine "knows" how far down to be
|
||||||
|
height: fieldContainer.children[0].height
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Opaque.HLine { visible: !last }
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick 2.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 QtQuick.Controls.Styles 1.4
|
||||||
|
|
||||||
|
import "../opaque" as Opaque
|
||||||
|
import "../opaque/styles"
|
||||||
|
import "../opaque/theme"
|
||||||
|
|
||||||
|
|
||||||
|
ColumnLayout { // settingsList
|
||||||
|
id: root
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.topMargin: 20
|
||||||
|
|
||||||
|
property alias settings: flick.children
|
||||||
|
|
||||||
|
Flickable {
|
||||||
|
anchors.fill: parent
|
||||||
|
id: flick
|
||||||
|
|
||||||
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
|
clip:true
|
||||||
|
|
||||||
|
contentWidth: root.width
|
||||||
|
contentHeight: root.height
|
||||||
|
|
||||||
|
// Settings go here in a col
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,12 +69,10 @@ Rectangle { // Global Toolbar
|
||||||
id: paneTitle
|
id: paneTitle
|
||||||
|
|
||||||
visible: true
|
visible: true
|
||||||
anchors.left: undefined
|
|
||||||
anchors.right: undefined
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
color: Theme.mainTextColor
|
color: Theme.mainTextColor
|
||||||
pixelSize: Theme.tabSize * gcd.themeScale
|
size: Theme.tabSize * gcd.themeScale
|
||||||
weight: Font.Bold
|
weight: Font.Bold
|
||||||
text: "global toolbar"
|
text: "global toolbar"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue