Merge pull request 'Add settings and settingsList; remove anchors from inside EllipsisLabel' (#1) from settings into master
This commit is contained in:
commit
e1edc24166
|
@ -13,6 +13,7 @@ TextField {
|
|||
color: Theme.mainTextColor
|
||||
font.pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
||||
width: parent.width - 20
|
||||
|
||||
property string icon
|
||||
property string button_text
|
||||
signal clicked
|
||||
|
@ -38,7 +39,7 @@ TextField {
|
|||
text: button_text
|
||||
anchors { top: parent.top; right: parent.right }
|
||||
override_radius: 10
|
||||
height: parent.height; width: parent.height * 4
|
||||
height: parent.height;
|
||||
|
||||
onClicked: {
|
||||
parent.focus = true;
|
||||
|
|
|
@ -9,13 +9,10 @@ import "theme"
|
|||
|
||||
// Needs the parent to have an onWidthChanged that calls .textResize()
|
||||
Item {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
|
||||
property string text
|
||||
|
||||
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 strikeout: label.font.strikeout
|
||||
property alias font: label.font
|
||||
|
|
|
@ -70,7 +70,9 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
|
|||
|
||||
EllipsisLabel { // CONTACT NAME
|
||||
id: cn
|
||||
pixelSize: Theme.usernameSize * gcd.themeScale
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
size: Theme.usernameSize * gcd.themeScale
|
||||
weight: Font.Bold
|
||||
strikeout: blocked
|
||||
text: displayName
|
||||
|
@ -79,7 +81,9 @@ Item { // LOTS OF NESTING TO DEAL WITH QT WEIRDNESS, SORRY
|
|||
EllipsisLabel { // Onion
|
||||
id: onion
|
||||
text: handle
|
||||
pixelSize: Theme.secondaryTextSize * gcd.themeScale
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
size: Theme.secondaryTextSize * gcd.themeScale
|
||||
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
|
||||
|
||||
visible: true
|
||||
anchors.left: undefined
|
||||
anchors.right: undefined
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
color: Theme.mainTextColor
|
||||
pixelSize: Theme.tabSize * gcd.themeScale
|
||||
size: Theme.tabSize * gcd.themeScale
|
||||
weight: Font.Bold
|
||||
text: "global toolbar"
|
||||
|
||||
|
|
Loading…
Reference in New Issue