replace most HELP labels with collapsible ones, tweak default acc edit dialog size

This commit is contained in:
Martin Rotter 2021-09-07 08:43:58 +02:00
parent 3670ed210e
commit 7556969397
11 changed files with 85 additions and 104 deletions

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>350</width>
<height>300</height> <height>196</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>477</width>
<height>558</height> <height>336</height>
</rect> </rect>
</property> </property>
<layout class="QFormLayout" name="formLayout_2"> <layout class="QFormLayout" name="formLayout_2">

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>500</width>
<height>600</height> <height>563</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">

View file

@ -32,21 +32,21 @@ FeedlyAccountDetails::FeedlyAccountDetails(QWidget* parent) : QWidget(parent), m
tr("Here, results of connection test are shown.")); tr("Here, results of connection test are shown."));
#if defined(FEEDLY_OFFICIAL_SUPPORT) #if defined(FEEDLY_OFFICIAL_SUPPORT)
m_ui.m_lblInfo->setText(tr("Your %1 build has official Feedly support. You do not have to use \"developer acess " m_ui.m_lblInfo->setHelpText(tr("Your %1 build has official Feedly support. You do not have to use \"developer acess "
"token\". You can therefore leave corresponding field empty.").arg(APP_NAME)); "token\". You can therefore leave corresponding field empty.").arg(QSL(APP_NAME)),
false);
#else #else
m_ui.m_lblInfo->setText(tr("Your %1 does not offer official Feedly support, thus you must " m_ui.m_lblInfo->setHelpText(tr("Your %1 does not offer official Feedly support, thus you must "
"authorize via special authorization code called \"developer access token\". " "authorize via special authorization code called \"developer access token\". "
"These tokens are usually valid only for 1 month and allow only 250 API calls " "These tokens are usually valid only for 1 month and allow only 250 API calls "
"each day.").arg(APP_NAME)); "each day.").arg(QSL(APP_NAME)),
true);
#endif #endif
m_ui.m_lblLimitMessagesInfo->setText(tr("Beware of downloading too many articles, because " m_ui.m_lblLimitMessagesInfo->setHelpText(tr("Beware of downloading too many articles, because "
"Feedly permanently caches ALL articles of the feed, so you might " "Feedly permanently caches ALL articles of the feed, so you might "
"end up with thousands of articles which you will never read anyway.")); "end up with thousands of articles which you will never read anyway."),
true);
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
GuiUtilities::setLabelAsNotice(*m_ui.m_lblLimitMessagesInfo, true);
connect(m_ui.m_btnGetToken, &QPushButton::clicked, this, &FeedlyAccountDetails::getDeveloperAccessToken); connect(m_ui.m_btnGetToken, &QPushButton::clicked, this, &FeedlyAccountDetails::getDeveloperAccessToken);
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FeedlyAccountDetails::onUsernameChanged); connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FeedlyAccountDetails::onUsernameChanged);

View file

@ -43,14 +43,7 @@
</layout> </layout>
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QLabel" name="m_lblInfo"> <widget class="HelpSpoiler" name="m_lblInfo" native="true"/>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="4" column="0" colspan="2">
<layout class="QFormLayout" name="formLayout_3"> <layout class="QFormLayout" name="formLayout_3">
@ -115,35 +108,34 @@
</widget> </widget>
</item> </item>
<item row="5" column="0" colspan="2"> <item row="5" column="0" colspan="2">
<widget class="QLabel" name="m_lblLimitMessagesInfo"> <widget class="HelpSpoiler" name="m_lblLimitMessagesInfo" native="true"/>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LineEditWithStatus</class> <class>LineEditWithStatus</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>lineeditwithstatus.h</header> <header>lineeditwithstatus.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MessageCountSpinBox</class> <class>MessageCountSpinBox</class>
<extends>QSpinBox</extends> <extends>QSpinBox</extends>
<header>messagecountspinbox.h</header> <header>messagecountspinbox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>HelpSpoiler</class>
<extends>QWidget</extends>
<header>helpspoiler.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>

View file

@ -14,16 +14,16 @@ GmailAccountDetails::GmailAccountDetails(QWidget* parent)
: QWidget(parent), m_oauth(nullptr), m_lastProxy({}) { : QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
m_ui.setupUi(this); m_ui.setupUi(this);
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
#if defined(GMAIL_OFFICIAL_SUPPORT) #if defined(GMAIL_OFFICIAL_SUPPORT)
m_ui.m_lblInfo->setText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your " m_ui.m_lblInfo->setHelpText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your "
"client ID/secret, but it is strongly recommended to obtain your " "client ID/secret, but it is strongly recommended to obtain your "
"own as it preconfigured tokens have limited global usage quota. If you wish " "own as it preconfigured tokens have limited global usage quota. If you wish "
"to use preconfigured tokens, simply leave those fields empty and make sure " "to use preconfigured tokens, simply leave those fields empty and make sure "
"to leave default value of redirect URL.")); "to leave default value of redirect URL."),
false);
#else #else
m_ui.m_lblInfo->setText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL.")); m_ui.m_lblInfo->setHelpText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."),
true);
#endif #endif
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information, m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information,

View file

@ -97,20 +97,7 @@
</layout> </layout>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QLabel" name="m_lblInfo"> <widget class="HelpSpoiler" name="m_lblInfo" native="true"/>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -180,23 +167,29 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LineEditWithStatus</class> <class>LineEditWithStatus</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>lineeditwithstatus.h</header> <header>lineeditwithstatus.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MessageCountSpinBox</class> <class>MessageCountSpinBox</class>
<extends>QSpinBox</extends> <extends>QSpinBox</extends>
<header>messagecountspinbox.h</header> <header>messagecountspinbox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>HelpSpoiler</class>
<extends>QWidget</extends>
<header>helpspoiler.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>m_btnRegisterApi</tabstop> <tabstop>m_btnRegisterApi</tabstop>

View file

@ -12,8 +12,9 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
m_ui.setupUi(this); m_ui.setupUi(this);
m_ui.m_lblTestResult->label()->setWordWrap(true); m_ui.m_lblTestResult->label()->setWordWrap(true);
m_ui.m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates " m_ui.m_lblServerSideUpdateInformation->setHelpText(tr("Leaving this option on causes that updates "
"of feeds will be probably much slower and may time-out often.")); "of feeds will be probably much slower and may time-out often."),
true);
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account")); m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
m_ui.m_txtPassword->lineEdit()->setPasswordMode(true); m_ui.m_txtPassword->lineEdit()->setPasswordMode(true);
m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your Nextcloud account")); m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your Nextcloud account"));
@ -31,8 +32,6 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
} }
}); });
GuiUtilities::setLabelAsNotice(*m_ui.m_lblServerSideUpdateInformation, true);
connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onPasswordChanged); connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onPasswordChanged);
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUsernameChanged); connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUsernameChanged);
connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUrlChanged); connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUrlChanged);

View file

@ -73,14 +73,7 @@
</layout> </layout>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="4" column="0" colspan="2">
<widget class="QLabel" name="m_lblServerSideUpdateInformation"> <widget class="HelpSpoiler" name="m_lblServerSideUpdateInformation" native="true"/>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="6" column="0" colspan="2"> <item row="6" column="0" colspan="2">
<widget class="QGroupBox" name="m_gbAuthentication"> <widget class="QGroupBox" name="m_gbAuthentication">
@ -173,23 +166,29 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LineEditWithStatus</class> <class>LineEditWithStatus</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>lineeditwithstatus.h</header> <header>lineeditwithstatus.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MessageCountSpinBox</class> <class>MessageCountSpinBox</class>
<extends>QSpinBox</extends> <extends>QSpinBox</extends>
<header>messagecountspinbox.h</header> <header>messagecountspinbox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>HelpSpoiler</class>
<extends>QWidget</extends>
<header>helpspoiler.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>m_checkDownloadOnlyUnreadMessages</tabstop> <tabstop>m_checkDownloadOnlyUnreadMessages</tabstop>

View file

@ -11,8 +11,9 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
m_ui.setupUi(this); m_ui.setupUi(this);
m_ui.m_lblTestResult->label()->setWordWrap(true); m_ui.m_lblTestResult->label()->setWordWrap(true);
m_ui.m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates " m_ui.m_lblServerSideUpdateInformation->setHelpText(tr("Leaving this option on causes that updates "
"of feeds will be probably much slower and may time-out often.")); "of feeds will be probably much slower and may time-out often."),
true);
m_ui.m_txtHttpUsername->lineEdit()->setPlaceholderText(tr("HTTP authentication username")); m_ui.m_txtHttpUsername->lineEdit()->setPlaceholderText(tr("HTTP authentication username"));
m_ui.m_txtHttpPassword->lineEdit()->setPlaceholderText(tr("HTTP authentication password")); m_ui.m_txtHttpPassword->lineEdit()->setPlaceholderText(tr("HTTP authentication password"));
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your TT-RSS account")); m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your TT-RSS account"));
@ -22,8 +23,6 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
tr("No test done yet."), tr("No test done yet."),
tr("Here, results of connection test are shown.")); tr("Here, results of connection test are shown."));
GuiUtilities::setLabelAsNotice(*m_ui.m_lblServerSideUpdateInformation, true);
setTabOrder(m_ui.m_txtUrl->lineEdit(), m_ui.m_checkDownloadOnlyUnreadMessages); setTabOrder(m_ui.m_txtUrl->lineEdit(), m_ui.m_checkDownloadOnlyUnreadMessages);
setTabOrder(m_ui.m_checkDownloadOnlyUnreadMessages, m_ui.m_spinLimitMessages); setTabOrder(m_ui.m_checkDownloadOnlyUnreadMessages, m_ui.m_spinLimitMessages);
setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_checkServerSideUpdate); setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_checkServerSideUpdate);

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>432</width> <width>432</width>
<height>480</height> <height>396</height>
</rect> </rect>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
@ -93,14 +93,7 @@
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2"> <item row="4" column="0" colspan="2">
<widget class="QLabel" name="m_lblServerSideUpdateInformation"> <widget class="HelpSpoiler" name="m_lblServerSideUpdateInformation" native="true"/>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="5" column="0" colspan="2"> <item row="5" column="0" colspan="2">
<widget class="QGroupBox" name="m_gbAuthentication"> <widget class="QGroupBox" name="m_gbAuthentication">
@ -220,23 +213,29 @@
</layout> </layout>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LineEditWithStatus</class> <class>LineEditWithStatus</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>lineeditwithstatus.h</header> <header>lineeditwithstatus.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LabelWithStatus</class>
<extends>QWidget</extends>
<header>labelwithstatus.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MessageCountSpinBox</class> <class>MessageCountSpinBox</class>
<extends>QSpinBox</extends> <extends>QSpinBox</extends>
<header>messagecountspinbox.h</header> <header>messagecountspinbox.h</header>
</customwidget> </customwidget>
<customwidget>
<class>HelpSpoiler</class>
<extends>QWidget</extends>
<header>helpspoiler.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>