Merge PR #947: Drop connection tabs support
commit
bab87f7726
|
|
@ -79,7 +79,6 @@ ApplicationWindow {
|
|||
property string graphStyle: "bars"
|
||||
property bool showHiddenOptions: false
|
||||
property string cloudEnvironment: "Community"
|
||||
property bool showConnectionTabs: false
|
||||
// FIXME: This shouldn't be needed... we should probably only use the system locale and not even provide a setting
|
||||
// However, the topic is more complex, and in the long run we'd probably want to allow the user selecting the
|
||||
// desired unit for particular interfaces/things/views. See https://github.com/nymea/nymea/issues/386
|
||||
|
|
|
|||
|
|
@ -496,47 +496,5 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
visible: settings.showConnectionTabs
|
||||
spacing: 0
|
||||
|
||||
TabBar {
|
||||
id: tabbar
|
||||
Layout.fillWidth: true
|
||||
Material.elevation: 2
|
||||
position: TabBar.Footer
|
||||
currentIndex: configuredHostsModel.currentIndex
|
||||
|
||||
Repeater {
|
||||
model: configuredHostsModel
|
||||
|
||||
delegate: TabButton {
|
||||
id: hostTabButton
|
||||
readonly property ConfiguredHost configuredHost: configuredHostsModel.get(index)
|
||||
Material.elevation: index
|
||||
width: Math.max(150, tabbar.width / configuredHostsModel.count)
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Material.foreground
|
||||
opacity: 0.06
|
||||
}
|
||||
|
||||
contentItem: Label {
|
||||
Layout.fillWidth: true
|
||||
text: hostTabButton.configuredHost.name !== "" ? hostTabButton.configuredHost.name : qsTr("New connection")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
configuredHostsModel.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,13 +113,6 @@ SettingsPageBase {
|
|||
}
|
||||
}
|
||||
|
||||
CheckDelegate {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Show connection tabs")
|
||||
checked: settings.showConnectionTabs
|
||||
onClicked: settings.showConnectionTabs = checked
|
||||
}
|
||||
|
||||
SettingsPageSectionHeader {
|
||||
text: qsTr("Regional")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue