Skip to content

Commit 7556969

Browse files
author
Martin Rotter
committed
replace most HELP labels with collapsible ones, tweak default acc edit dialog size
1 parent 3670ed2 commit 7556969

File tree

11 files changed

+77
-96
lines changed

11 files changed

+77
-96
lines changed

src/librssguard/services/abstract/gui/authenticationdetails.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>400</width>
10-
<height>300</height>
9+
<width>350</width>
10+
<height>196</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">

src/librssguard/services/abstract/gui/formaccountdetails.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>500</width>
10-
<height>558</height>
9+
<width>477</width>
10+
<height>336</height>
1111
</rect>
1212
</property>
1313
<layout class="QFormLayout" name="formLayout_2">

src/librssguard/services/abstract/gui/formfeeddetails.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>500</width>
10-
<height>600</height>
10+
<height>563</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">

src/librssguard/services/feedly/gui/feedlyaccountdetails.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ FeedlyAccountDetails::FeedlyAccountDetails(QWidget* parent) : QWidget(parent), m
3232
tr("Here, results of connection test are shown."));
3333

3434
#if defined(FEEDLY_OFFICIAL_SUPPORT)
35-
m_ui.m_lblInfo->setText(tr("Your %1 build has official Feedly support. You do not have to use \"developer acess "
36-
"token\". You can therefore leave corresponding field empty.").arg(APP_NAME));
35+
m_ui.m_lblInfo->setHelpText(tr("Your %1 build has official Feedly support. You do not have to use \"developer acess "
36+
"token\". You can therefore leave corresponding field empty.").arg(QSL(APP_NAME)),
37+
false);
3738
#else
38-
m_ui.m_lblInfo->setText(tr("Your %1 does not offer official Feedly support, thus you must "
39-
"authorize via special authorization code called \"developer access token\". "
40-
"These tokens are usually valid only for 1 month and allow only 250 API calls "
41-
"each day.").arg(APP_NAME));
39+
m_ui.m_lblInfo->setHelpText(tr("Your %1 does not offer official Feedly support, thus you must "
40+
"authorize via special authorization code called \"developer access token\". "
41+
"These tokens are usually valid only for 1 month and allow only 250 API calls "
42+
"each day.").arg(QSL(APP_NAME)),
43+
true);
4244
#endif
4345

44-
m_ui.m_lblLimitMessagesInfo->setText(tr("Beware of downloading too many articles, because "
45-
"Feedly permanently caches ALL articles of the feed, so you might "
46-
"end up with thousands of articles which you will never read anyway."));
47-
48-
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
49-
GuiUtilities::setLabelAsNotice(*m_ui.m_lblLimitMessagesInfo, true);
46+
m_ui.m_lblLimitMessagesInfo->setHelpText(tr("Beware of downloading too many articles, because "
47+
"Feedly permanently caches ALL articles of the feed, so you might "
48+
"end up with thousands of articles which you will never read anyway."),
49+
true);
5050

5151
connect(m_ui.m_btnGetToken, &QPushButton::clicked, this, &FeedlyAccountDetails::getDeveloperAccessToken);
5252
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FeedlyAccountDetails::onUsernameChanged);

src/librssguard/services/feedly/gui/feedlyaccountdetails.ui

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,7 @@
4343
</layout>
4444
</item>
4545
<item row="2" column="0" colspan="2">
46-
<widget class="QLabel" name="m_lblInfo">
47-
<property name="alignment">
48-
<set>Qt::AlignCenter</set>
49-
</property>
50-
<property name="wordWrap">
51-
<bool>true</bool>
52-
</property>
53-
</widget>
46+
<widget class="HelpSpoiler" name="m_lblInfo" native="true"/>
5447
</item>
5548
<item row="4" column="0" colspan="2">
5649
<layout class="QFormLayout" name="formLayout_3">
@@ -115,35 +108,34 @@
115108
</widget>
116109
</item>
117110
<item row="5" column="0" colspan="2">
118-
<widget class="QLabel" name="m_lblLimitMessagesInfo">
119-
<property name="alignment">
120-
<set>Qt::AlignCenter</set>
121-
</property>
122-
<property name="wordWrap">
123-
<bool>true</bool>
124-
</property>
125-
</widget>
111+
<widget class="HelpSpoiler" name="m_lblLimitMessagesInfo" native="true"/>
126112
</item>
127113
</layout>
128114
</widget>
129115
<customwidgets>
130116
<customwidget>
131-
<class>LabelWithStatus</class>
117+
<class>LineEditWithStatus</class>
132118
<extends>QWidget</extends>
133-
<header>labelwithstatus.h</header>
119+
<header>lineeditwithstatus.h</header>
134120
<container>1</container>
135121
</customwidget>
136122
<customwidget>
137-
<class>LineEditWithStatus</class>
123+
<class>LabelWithStatus</class>
138124
<extends>QWidget</extends>
139-
<header>lineeditwithstatus.h</header>
125+
<header>labelwithstatus.h</header>
140126
<container>1</container>
141127
</customwidget>
142128
<customwidget>
143129
<class>MessageCountSpinBox</class>
144130
<extends>QSpinBox</extends>
145131
<header>messagecountspinbox.h</header>
146132
</customwidget>
133+
<customwidget>
134+
<class>HelpSpoiler</class>
135+
<extends>QWidget</extends>
136+
<header>helpspoiler.h</header>
137+
<container>1</container>
138+
</customwidget>
147139
</customwidgets>
148140
<resources/>
149141
<connections/>

src/librssguard/services/gmail/gui/gmailaccountdetails.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ GmailAccountDetails::GmailAccountDetails(QWidget* parent)
1414
: QWidget(parent), m_oauth(nullptr), m_lastProxy({}) {
1515
m_ui.setupUi(this);
1616

17-
GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true);
18-
1917
#if defined(GMAIL_OFFICIAL_SUPPORT)
20-
m_ui.m_lblInfo->setText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your "
21-
"client ID/secret, but it is strongly recommended to obtain your "
22-
"own as it preconfigured tokens have limited global usage quota. If you wish "
23-
"to use preconfigured tokens, simply leave those fields empty and make sure "
24-
"to leave default value of redirect URL."));
18+
m_ui.m_lblInfo->setHelpText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your "
19+
"client ID/secret, but it is strongly recommended to obtain your "
20+
"own as it preconfigured tokens have limited global usage quota. If you wish "
21+
"to use preconfigured tokens, simply leave those fields empty and make sure "
22+
"to leave default value of redirect URL."),
23+
false);
2524
#else
26-
m_ui.m_lblInfo->setText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."));
25+
m_ui.m_lblInfo->setHelpText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."),
26+
true);
2727
#endif
2828

2929
m_ui.m_lblTestResult->setStatus(WidgetWithStatus::StatusType::Information,

src/librssguard/services/gmail/gui/gmailaccountdetails.ui

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,7 @@
9797
</layout>
9898
</item>
9999
<item row="3" column="0" colspan="2">
100-
<widget class="QLabel" name="m_lblInfo">
101-
<property name="sizePolicy">
102-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
103-
<horstretch>0</horstretch>
104-
<verstretch>1</verstretch>
105-
</sizepolicy>
106-
</property>
107-
<property name="alignment">
108-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
109-
</property>
110-
<property name="wordWrap">
111-
<bool>true</bool>
112-
</property>
113-
</widget>
100+
<widget class="HelpSpoiler" name="m_lblInfo" native="true"/>
114101
</item>
115102
</layout>
116103
</widget>
@@ -181,22 +168,28 @@
181168
</widget>
182169
<customwidgets>
183170
<customwidget>
184-
<class>LabelWithStatus</class>
171+
<class>LineEditWithStatus</class>
185172
<extends>QWidget</extends>
186-
<header>labelwithstatus.h</header>
173+
<header>lineeditwithstatus.h</header>
187174
<container>1</container>
188175
</customwidget>
189176
<customwidget>
190-
<class>LineEditWithStatus</class>
177+
<class>LabelWithStatus</class>
191178
<extends>QWidget</extends>
192-
<header>lineeditwithstatus.h</header>
179+
<header>labelwithstatus.h</header>
193180
<container>1</container>
194181
</customwidget>
195182
<customwidget>
196183
<class>MessageCountSpinBox</class>
197184
<extends>QSpinBox</extends>
198185
<header>messagecountspinbox.h</header>
199186
</customwidget>
187+
<customwidget>
188+
<class>HelpSpoiler</class>
189+
<extends>QWidget</extends>
190+
<header>helpspoiler.h</header>
191+
<container>1</container>
192+
</customwidget>
200193
</customwidgets>
201194
<tabstops>
202195
<tabstop>m_btnRegisterApi</tabstop>

src/librssguard/services/owncloud/gui/owncloudaccountdetails.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
1212
m_ui.setupUi(this);
1313

1414
m_ui.m_lblTestResult->label()->setWordWrap(true);
15-
m_ui.m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "
16-
"of feeds will be probably much slower and may time-out often."));
15+
m_ui.m_lblServerSideUpdateInformation->setHelpText(tr("Leaving this option on causes that updates "
16+
"of feeds will be probably much slower and may time-out often."),
17+
true);
1718
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your Nextcloud account"));
1819
m_ui.m_txtPassword->lineEdit()->setPasswordMode(true);
1920
m_ui.m_txtUsername->lineEdit()->setPlaceholderText(tr("Username for your Nextcloud account"));
@@ -31,8 +32,6 @@ OwnCloudAccountDetails::OwnCloudAccountDetails(QWidget* parent) : QWidget(parent
3132
}
3233
});
3334

34-
GuiUtilities::setLabelAsNotice(*m_ui.m_lblServerSideUpdateInformation, true);
35-
3635
connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onPasswordChanged);
3736
connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUsernameChanged);
3837
connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &OwnCloudAccountDetails::onUrlChanged);

src/librssguard/services/owncloud/gui/owncloudaccountdetails.ui

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,7 @@
7373
</layout>
7474
</item>
7575
<item row="4" column="0" colspan="2">
76-
<widget class="QLabel" name="m_lblServerSideUpdateInformation">
77-
<property name="text">
78-
<string/>
79-
</property>
80-
<property name="wordWrap">
81-
<bool>true</bool>
82-
</property>
83-
</widget>
76+
<widget class="HelpSpoiler" name="m_lblServerSideUpdateInformation" native="true"/>
8477
</item>
8578
<item row="6" column="0" colspan="2">
8679
<widget class="QGroupBox" name="m_gbAuthentication">
@@ -174,22 +167,28 @@
174167
</widget>
175168
<customwidgets>
176169
<customwidget>
177-
<class>LabelWithStatus</class>
170+
<class>LineEditWithStatus</class>
178171
<extends>QWidget</extends>
179-
<header>labelwithstatus.h</header>
172+
<header>lineeditwithstatus.h</header>
180173
<container>1</container>
181174
</customwidget>
182175
<customwidget>
183-
<class>LineEditWithStatus</class>
176+
<class>LabelWithStatus</class>
184177
<extends>QWidget</extends>
185-
<header>lineeditwithstatus.h</header>
178+
<header>labelwithstatus.h</header>
186179
<container>1</container>
187180
</customwidget>
188181
<customwidget>
189182
<class>MessageCountSpinBox</class>
190183
<extends>QSpinBox</extends>
191184
<header>messagecountspinbox.h</header>
192185
</customwidget>
186+
<customwidget>
187+
<class>HelpSpoiler</class>
188+
<extends>QWidget</extends>
189+
<header>helpspoiler.h</header>
190+
<container>1</container>
191+
</customwidget>
193192
</customwidgets>
194193
<tabstops>
195194
<tabstop>m_checkDownloadOnlyUnreadMessages</tabstop>

src/librssguard/services/tt-rss/gui/ttrssaccountdetails.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
1111
m_ui.setupUi(this);
1212

1313
m_ui.m_lblTestResult->label()->setWordWrap(true);
14-
m_ui.m_lblServerSideUpdateInformation->setText(tr("Leaving this option on causes that updates "
15-
"of feeds will be probably much slower and may time-out often."));
14+
m_ui.m_lblServerSideUpdateInformation->setHelpText(tr("Leaving this option on causes that updates "
15+
"of feeds will be probably much slower and may time-out often."),
16+
true);
1617
m_ui.m_txtHttpUsername->lineEdit()->setPlaceholderText(tr("HTTP authentication username"));
1718
m_ui.m_txtHttpPassword->lineEdit()->setPlaceholderText(tr("HTTP authentication password"));
1819
m_ui.m_txtPassword->lineEdit()->setPlaceholderText(tr("Password for your TT-RSS account"));
@@ -22,8 +23,6 @@ TtRssAccountDetails::TtRssAccountDetails(QWidget* parent) : QWidget(parent) {
2223
tr("No test done yet."),
2324
tr("Here, results of connection test are shown."));
2425

25-
GuiUtilities::setLabelAsNotice(*m_ui.m_lblServerSideUpdateInformation, true);
26-
2726
setTabOrder(m_ui.m_txtUrl->lineEdit(), m_ui.m_checkDownloadOnlyUnreadMessages);
2827
setTabOrder(m_ui.m_checkDownloadOnlyUnreadMessages, m_ui.m_spinLimitMessages);
2928
setTabOrder(m_ui.m_spinLimitMessages, m_ui.m_checkServerSideUpdate);

0 commit comments

Comments
 (0)