Hide connections menu when only one connection is configured
* Make UI look cleaner for the common case of only one configuration * Save some width to help with https://github.com/Martchus/syncthingtray/issues/65 a little bit
This commit is contained in:
parent
a2695311d4
commit
65b3261320
|
@ -394,6 +394,7 @@ ColumnLayout {
|
|||
paddingEnabled: true
|
||||
enforceMenuArrow: true
|
||||
onClicked: connectionConfigsMenu.toggle(x, y + height)
|
||||
visible: plasmoid.nativeInterface.connectionConfigNames.length > 1
|
||||
Shortcut {
|
||||
sequence: "Ctrl+Shift+C"
|
||||
onActivated: connectionsButton.clicked()
|
||||
|
|
|
@ -433,6 +433,7 @@ void TrayWidget::applySettings(const QString &connectionConfig)
|
|||
m_connectionsMenu->actions().at(0)->setChecked(true);
|
||||
}
|
||||
m_ui->connectionsPushButton->setText(m_selectedConnection->label);
|
||||
m_ui->connectionsPushButton->setHidden(secondaryConnectionSettings.empty());
|
||||
const bool reconnectRequired = m_connection.applySettings(*m_selectedConnection);
|
||||
|
||||
// apply notification settings
|
||||
|
|
Loading…
Reference in New Issue