Partially revert "UI: Smaller font size for date/time columns."

This reverts commit 5c3c93cd82.
This commit is contained in:
Nodir Temirkhodjaev 2021-05-18 19:38:13 +03:00
parent 9bc5fc089d
commit 607784f691
8 changed files with 2 additions and 74 deletions

View File

@ -1,12 +1,11 @@
Fort Firewall ChangeLog
v3.4.0, 2021-05-17:
v3.4.0, 2021-05-18:
- UI: Options: Add "For all users" auto-run mode.
- UI: Options: Add "Run as a Service in background" option.
- UI: Use "%LocalAppData%\Fort Firewall\FortFirewall.user.ini" for user specific settings.
- UI: Options: Hot Keys is applied immediately now.
- UI: Options: Move Statistics page to Statistics window as Traffic page.
- UI: Smaller font size for date/time columns.
Attention: For a Service the default profile path is "%ProgramData%\Fort Firewall\", else it's "%LocalAppData%\Fort Firewall\".

View File

@ -197,18 +197,11 @@ QVariant AppListModel::dataFont(const QModelIndex &index) const
{
const int column = index.column();
switch (column) {
case 2: {
if (column == 2) {
QFont font;
font.setWeight(QFont::DemiBold);
return font;
}
case 4: {
QFont font;
font.setPointSize(8);
return font;
}
}
return QVariant();
}

View File

@ -108,10 +108,6 @@ QVariant ConnListModel::data(const QModelIndex &index, int role) const
// Icon
case Qt::DecorationRole:
return dataDecoration(index);
// Font
case Qt::FontRole:
return dataFont(index);
}
return QVariant();
@ -176,21 +172,6 @@ QVariant ConnListModel::dataDecoration(const QModelIndex &index) const
return QVariant();
}
QVariant ConnListModel::dataFont(const QModelIndex &index) const
{
const int column = index.column();
switch (column) {
case 6: {
QFont font;
font.setPointSize(8);
return font;
}
}
return QVariant();
}
QString ConnListModel::blockReasonText(const ConnBlockRow &blockRow)
{
switch (blockRow.blockReason) {

View File

@ -89,7 +89,6 @@ private:
QVariant dataDisplay(const QModelIndex &index, int role) const;
QVariant dataDisplayDirection(const ConnRow &connRow, int role) const;
QVariant dataDecoration(const QModelIndex &index) const;
QVariant dataFont(const QModelIndex &index) const;
static QString blockReasonText(const ConnBlockRow &blockRow);

View File

@ -1,7 +1,6 @@
#include "zonelistmodel.h"
#include <QDebug>
#include <QFont>
#include <QJsonDocument>
#include <sqlite/sqlitedb.h>
@ -66,10 +65,6 @@ QVariant ZoneListModel::data(const QModelIndex &index, int role) const
case Qt::ToolTipRole:
return dataDisplay(index);
// Font
case Qt::FontRole:
return dataFont(index);
// Enabled
case Qt::CheckStateRole:
return dataCheckState(index);
@ -101,22 +96,6 @@ QVariant ZoneListModel::dataDisplay(const QModelIndex &index) const
return QVariant();
}
QVariant ZoneListModel::dataFont(const QModelIndex &index) const
{
const int column = index.column();
switch (column) {
case 2:
case 3: {
QFont font;
font.setPointSize(8);
return font;
}
}
return QVariant();
}
QVariant ZoneListModel::dataCheckState(const QModelIndex &index) const
{
if (index.column() == 0) {

View File

@ -78,7 +78,6 @@ protected:
private:
QVariant dataDisplay(const QModelIndex &index) const;
QVariant dataFont(const QModelIndex &index) const;
QVariant dataCheckState(const QModelIndex &index) const;
void setupZoneTypes();

View File

@ -1,7 +1,5 @@
#include "tasklistmodel.h"
#include <QFont>
#include "taskinfo.h"
#include "taskmanager.h"
@ -63,9 +61,6 @@ QVariant TaskListModel::data(const QModelIndex &index, int role) const
case Qt::ToolTipRole:
return dataDisplay(index);
case Qt::FontRole:
return dataFont(index);
case Qt::CheckStateRole:
case RoleEnabled:
return dataCheckState(index);
@ -103,22 +98,6 @@ QVariant TaskListModel::dataDisplay(const QModelIndex &index) const
return QVariant();
}
QVariant TaskListModel::dataFont(const QModelIndex &index) const
{
const int column = index.column();
switch (column) {
case 2:
case 3: {
QFont font;
font.setPointSize(8);
return font;
}
}
return QVariant();
}
QVariant TaskListModel::dataCheckState(const QModelIndex &index) const
{
if (index.column() == 0) {

View File

@ -47,7 +47,6 @@ protected:
private:
QVariant dataDisplay(const QModelIndex &index) const;
QVariant dataFont(const QModelIndex &index) const;
QVariant dataCheckState(const QModelIndex &index) const;
bool taskEnabled(int row) const;