mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-25 13:38:44 +01:00
Couple of GUI fixes.
This commit is contained in:
parent
7f16ae5265
commit
3b4ac7cc96
@ -328,7 +328,8 @@ HEADERS += src/core/feeddownloader.h \
|
||||
src/services/standard/rssparser.h \
|
||||
src/miscellaneous/serviceoperator.h \
|
||||
src/services/abstract/cacheforserviceroot.h \
|
||||
src/services/tt-rss/gui/formeditttrssaccount.h
|
||||
src/services/tt-rss/gui/formeditttrssaccount.h \
|
||||
src/gui/guiutilities.h
|
||||
|
||||
SOURCES += src/core/feeddownloader.cpp \
|
||||
src/core/feedsmodel.cpp \
|
||||
@ -448,7 +449,8 @@ SOURCES += src/core/feeddownloader.cpp \
|
||||
src/services/standard/rssparser.cpp \
|
||||
src/miscellaneous/serviceoperator.cpp \
|
||||
src/services/abstract/cacheforserviceroot.cpp \
|
||||
src/services/tt-rss/gui/formeditttrssaccount.cpp
|
||||
src/services/tt-rss/gui/formeditttrssaccount.cpp \
|
||||
src/gui/guiutilities.cpp
|
||||
|
||||
FORMS += src/gui/toolbareditor.ui \
|
||||
src/network-web/downloaditem.ui \
|
||||
|
37
src/gui/guiutilities.cpp
Executable file
37
src/gui/guiutilities.cpp
Executable file
@ -0,0 +1,37 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2017 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// RSS Guard is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// RSS Guard is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "gui/guiutilities.h"
|
||||
|
||||
#include "definitions/definitions.h"
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
|
||||
void GuiUtilities::setLabelAsNotice(QLabel *label, bool is_warning) {
|
||||
label->setMargin(6);
|
||||
|
||||
if (is_warning) {
|
||||
label->setStyleSheet(QSL("font-weight: bold; font-style: italic; color: red"));
|
||||
}
|
||||
else {
|
||||
label->setStyleSheet(QSL("font-style: italic;"));
|
||||
}
|
||||
}
|
||||
|
||||
GuiUtilities::GuiUtilities() {
|
||||
}
|
32
src/gui/guiutilities.h
Executable file
32
src/gui/guiutilities.h
Executable file
@ -0,0 +1,32 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2017 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// RSS Guard is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// RSS Guard is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef GUIUTILITIES_H
|
||||
#define GUIUTILITIES_H
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
class GuiUtilities {
|
||||
public:
|
||||
static void setLabelAsNotice(QLabel *label, bool is_warning);
|
||||
|
||||
private:
|
||||
explicit GuiUtilities();
|
||||
};
|
||||
|
||||
#endif // GUIUTILITIES_H
|
@ -20,6 +20,7 @@
|
||||
#include "network-web/silentnetworkaccessmanager.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "gui/guiutilities.h"
|
||||
|
||||
#include <QNetworkProxy>
|
||||
#include <QFileDialog>
|
||||
@ -29,6 +30,10 @@ SettingsBrowserMail::SettingsBrowserMail(Settings *settings, QWidget *parent)
|
||||
: SettingsPanel(settings, parent), m_ui(new Ui::SettingsBrowserMail) {
|
||||
m_ui->setupUi(this);
|
||||
|
||||
GuiUtilities::setLabelAsNotice(m_ui->label, false);
|
||||
GuiUtilities::setLabelAsNotice(m_ui->m_lblExternalEmailInfo, false);
|
||||
GuiUtilities::setLabelAsNotice(m_ui->m_lblProxyInfo, false);
|
||||
|
||||
#if defined(USE_WEBENGINE)
|
||||
m_ui->m_checkOpenLinksInExternal->setVisible(false);
|
||||
#else
|
||||
|
@ -109,7 +109,7 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Note that "%1" (without quotation marks) is placeholder for URL of selected message.</string>
|
||||
@ -122,7 +122,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_checkOpenLinksInExternal">
|
||||
<property name="text">
|
||||
<string>Always open links from simple internal text browser in external web browser</string>
|
||||
|
@ -21,12 +21,17 @@
|
||||
#include "definitions/definitions.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/textfactory.h"
|
||||
#include "gui/guiutilities.h"
|
||||
|
||||
|
||||
SettingsDatabase::SettingsDatabase(Settings *settings, QWidget *parent)
|
||||
: SettingsPanel(settings, parent), m_ui(new Ui::SettingsDatabase) {
|
||||
m_ui->setupUi(this);
|
||||
|
||||
GuiUtilities::setLabelAsNotice(m_ui->m_lblDataStorageWarning, true);
|
||||
GuiUtilities::setLabelAsNotice(m_ui->m_lblMysqlInfo, false);
|
||||
GuiUtilities::setLabelAsNotice(m_ui->m_lblSqliteInMemoryWarnings, true);
|
||||
|
||||
connect(m_ui->m_cmbDatabaseDriver, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SettingsDatabase::dirtifySettings);
|
||||
connect(m_ui->m_checkSqliteUseInMemoryDatabase, &QCheckBox::toggled, this, &SettingsDatabase::dirtifySettings);
|
||||
connect(m_ui->m_txtMysqlDatabase->lineEdit(), &QLineEdit::textChanged, this, &SettingsDatabase::dirtifySettings);
|
||||
|
@ -23,7 +23,35 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="5" column="0">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="m_checkUseTransactions">
|
||||
<property name="toolTip">
|
||||
<string>Note that turning this option ON will make saving of new messages FASTER, but it might rarely cause some issues with messages saving.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use DB transactions when storing downloaded messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblDataStorageWarning">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel {
|
||||
margin-top: 12px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>WARNING: Note that switching to another data storage type will NOT copy existing your data from currently active data storage to newly selected one.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="m_lblDatabaseDriver">
|
||||
<property name="text">
|
||||
<string>Database driver</string>
|
||||
@ -33,10 +61,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="m_cmbDatabaseDriver"/>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QStackedWidget" name="m_stackedDatabaseDriver">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
@ -110,16 +138,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Hostname</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>m_txtMysqlHostname</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
@ -156,15 +174,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>m_txtMysqlUsername</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtMysqlDatabase" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtMysqlUsername" native="true"/>
|
||||
@ -182,6 +193,16 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<item row="3" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtMysqlPassword" native="true"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="m_checkMysqlShowPassword">
|
||||
<property name="text">
|
||||
<string>&Show password</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
@ -211,11 +232,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblMysqlInfo">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Note that speed of used MySQL server and latency of used connection medium HEAVILY influences the final performance of this application. Using slow database connections leads to bad performance when browsing feeds or messages.</string>
|
||||
</property>
|
||||
@ -225,24 +241,18 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="m_checkMysqlShowPassword">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>&Show password</string>
|
||||
<string>Username</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<property name="buddy">
|
||||
<cstring>m_txtMysqlUsername</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="LineEditWithStatus" name="m_txtMysqlDatabase" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
@ -250,49 +260,31 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Hostname</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>m_txtMysqlHostname</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="m_checkUseTransactions">
|
||||
<property name="text">
|
||||
<string>Use DB transactions when storing downloaded messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="m_lblDataStorageWarning">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel {
|
||||
margin-top: 12px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>WARNING: Note that switching to another data storage type will NOT copy existing your data from currently active data storage to newly selected one.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Note that turning this option ON will make saving of new messages FASTER, but it might rarely cause some issues with messages saving.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignHCenter|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>m_lblDatabaseDriver</zorder>
|
||||
<zorder>m_cmbDatabaseDriver</zorder>
|
||||
<zorder>m_stackedDatabaseDriver</zorder>
|
||||
<zorder>m_checkUseTransactions</zorder>
|
||||
<zorder>m_lblDataStorageWarning</zorder>
|
||||
<zorder>label_2</zorder>
|
||||
<zorder>label_11</zorder>
|
||||
<zorder>label_4</zorder>
|
||||
<zorder>label_5</zorder>
|
||||
<zorder>m_lblMysqlInfo</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "gui/feedsview.h"
|
||||
#include "gui/messagesview.h"
|
||||
#include "gui/timespinbox.h"
|
||||
#include "gui/guiutilities.h"
|
||||
|
||||
#include <QFontDialog>
|
||||
|
||||
@ -34,6 +35,8 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings *settings, QWidget *parent
|
||||
m_ui->setupUi(this);
|
||||
initializeMessageDateFormats();
|
||||
|
||||
GuiUtilities::setLabelAsNotice(m_ui->label_9, false);
|
||||
|
||||
connect(m_ui->m_checkAutoUpdate, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_checkKeppMessagesInTheMiddle, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
connect(m_ui->m_checkMessagesDateTimeFormat, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
|
||||
|
Loading…
x
Reference in New Issue
Block a user