diff --git a/krusader/Konfigurator/kgadvanced.cpp b/krusader/Konfigurator/kgadvanced.cpp --- a/krusader/Konfigurator/kgadvanced.cpp +++ b/krusader/Konfigurator/kgadvanced.cpp @@ -52,9 +52,10 @@ generalGrid->addWidget(generals, 1, 0); - addLabel(generalGrid, 2, 0, i18n("MountMan will not (un)mount the following mount-points:"), + QLabel *labelNonMount = addLabel(generalGrid, 2, 0, i18n("MountMan will not (un)mount the following mount-points:"), generalGrp); - KonfiguratorEditBox *nonMountPoints = createEditBox("Advanced", "Nonmount Points", _NonMountPoints, generalGrp, false); + KonfiguratorEditBox *nonMountPoints = createEditBox("Advanced", "Nonmount Points", _NonMountPoints, + labelNonMount, generalGrp, false); generalGrid->addWidget(nonMountPoints, 2, 1); @@ -103,9 +104,10 @@ spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); fineTuneGrid->addWidget(spinBox, 0, 1); - addLabel(fineTuneGrid, 1, 0, i18n("Arguments of updatedb:"), + QLabel *labelArgUpdate = addLabel(fineTuneGrid, 1, 0, i18n("Arguments of updatedb:"), fineTuneGrp); - KonfiguratorEditBox *updatedbArgs = createEditBox("Locate", "UpdateDB Arguments", "", fineTuneGrp, false); + KonfiguratorEditBox *updatedbArgs = createEditBox("Locate", "UpdateDB Arguments", "", + labelArgUpdate, fineTuneGrp, false); fineTuneGrid->addWidget(updatedbArgs, 1, 1); kgAdvancedLayout->addWidget(fineTuneGrp, 2 , 0); diff --git a/krusader/Konfigurator/kgstartup.cpp b/krusader/Konfigurator/kgstartup.cpp --- a/krusader/Konfigurator/kgstartup.cpp +++ b/krusader/Konfigurator/kgstartup.cpp @@ -76,13 +76,13 @@ auto *iconThemeLayout = new QHBoxLayout(); QLabel *iconThemeLabel = new QLabel(i18n("Fallback Icon Theme:")); - iconThemeLabel->setWhatsThis(i18n("Whenever icon is not found in system icon theme, " - "this theme will be used as a fallback. " - "If fallback theme doesn't contain the icon, " - "Breeze or Oxygen will be used if any of these are present.")); + QString toolTip = i18n("Whenever icon is not found in system icon theme, " + "this theme will be used as a fallback. " + "If fallback theme doesn't contain the icon, " + "Breeze or Oxygen will be used if any of these are present."); iconThemeLayout->addWidget(iconThemeLabel); KonfiguratorEditBox *iconThemeEditBox = createEditBox("Startup", "Fallback Icon Theme", "", - panelsGrp, true); + iconThemeLabel, panelsGrp, true, toolTip); iconThemeLayout->addWidget(iconThemeEditBox); iconThemeLayout->addStretch(1); panelsGrid->addLayout(iconThemeLayout, 3, 0, 1, 2); diff --git a/krusader/Konfigurator/konfiguratorpage.h b/krusader/Konfigurator/konfiguratorpage.h --- a/krusader/Konfigurator/konfiguratorpage.h +++ b/krusader/Konfigurator/konfiguratorpage.h @@ -162,15 +162,16 @@ * @param configGroup The class name used in KConfig (ex. "Archives") * @param name The itemname used in KConfig (ex. "Do Tar") * @param defaultValue The default value of the editbox + * @param label The label that is associated to the editbox * @param parent Reference to the parent widget * @param restart The change of this parameter requires Krusader restart * @param toolTip Tooltip used for this editbox * @param page The subpage of a Konfigurator page (because of setDefaults) * * @return reference to the newly created editbox */ KonfiguratorEditBox *createEditBox(QString configGroup, QString name, QString defaultValue, - QWidget *parent = nullptr, bool restart = false, + QLabel *label, QWidget *parent = nullptr, bool restart = false, const QString &toolTip = QString(), int page = FIRST_PAGE); /** diff --git a/krusader/Konfigurator/konfiguratorpage.cpp b/krusader/Konfigurator/konfiguratorpage.cpp --- a/krusader/Konfigurator/konfiguratorpage.cpp +++ b/krusader/Konfigurator/konfiguratorpage.cpp @@ -106,11 +106,14 @@ } KonfiguratorEditBox* KonfiguratorPage::createEditBox(QString configGroup, QString name, - QString defaultValue, QWidget *parent, bool restart, const QString &toolTip, int page) + QString defaultValue, QLabel *label, QWidget *parent, bool restart, + const QString &toolTip, int page) { KonfiguratorEditBox *editBox = new KonfiguratorEditBox(std::move(configGroup), std::move(name), std::move(defaultValue), parent, restart, page); if (!toolTip.isEmpty()) { + label->setWhatsThis(toolTip); + label->setToolTip(toolTip); editBox->setWhatsThis(toolTip); editBox->setToolTip(toolTip); }