diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 16f35b82d..e053aca03 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -63,6 +63,10 @@ KdeConnectKcm::KdeConnectKcm(QWidget *parent, const QVariantList&) kcmUi->progressBar->setVisible(false); kcmUi->messages->setVisible(false); + //Workaround: If we set this directly (or if we set it in the .ui file), the layout breaks + kcmUi->noDeviceLinks->setWordWrap(false); + QTimer::singleShot(0, [this] { kcmUi->noDeviceLinks->setWordWrap(true); }); + kcmUi->rename_label->setText(daemon->announcedName()); kcmUi->rename_edit->setText(daemon->announcedName()); setRenameMode(false); @@ -133,6 +137,8 @@ void KdeConnectKcm::resetSelection() void KdeConnectKcm::deviceSelected(const QModelIndex& current) { + kcmUi->noDevicePlaceholder->setVisible(false); + if (currentDevice) { disconnect(currentDevice,SIGNAL(pairingSuccesful()), this, SLOT(pairingSuccesful())); @@ -181,7 +187,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex& current) //KPluginSelector has no way to remove a list of plugins and load another, so we need to destroy and recreate it each time delete kcmUi->pluginSelector; kcmUi->pluginSelector = new KPluginSelector(this); - kcmUi->verticalLayout_2->addWidget(kcmUi->pluginSelector); + kcmUi->deviceInfo_layout->addWidget(kcmUi->pluginSelector); kcmUi->pluginSelector->setConfigurationArguments(QStringList(currentDevice->id())); diff --git a/kcm/kcm.ui b/kcm/kcm.ui index d3bb9af6b..6f763c843 100644 --- a/kcm/kcm.ui +++ b/kcm/kcm.ui @@ -111,14 +111,14 @@ - + 0 0 - + @@ -127,7 +127,7 @@ 0 - + @@ -260,6 +260,79 @@ + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + No device selected. + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + If you have an Android phone, make sure to install the <a href="https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">KDE Connect Android app</span></a> (also available <a href="https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp"><span style=" text-decoration: underline; color:#0000ff;">from F-Droid</span></a>). + + + Qt::RichText + + + Qt::AlignCenter + + + true + + + 40 + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + +