From ea0429342ade6e908807ff1faef7c8f7e5e46b75 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:11:49 -0500 Subject: harmonized widgets in the tabs, fixed styles --- src/downloadlistwidget.cpp | 1 + src/mainwindow.ui | 262 ++++++++++++----------------------- src/moapplication.cpp | 6 +- src/modlist.cpp | 5 - src/pluginlist.cpp | 5 - src/stylesheets/vs15 Dark-Green.qss | 13 -- src/stylesheets/vs15 Dark-Orange.qss | 15 +- src/stylesheets/vs15 Dark-Purple.qss | 15 +- src/stylesheets/vs15 Dark-Red.qss | 15 +- src/stylesheets/vs15 Dark-Yellow.qss | 16 +-- src/stylesheets/vs15 Dark.qss | 13 -- 11 files changed, 101 insertions(+), 265 deletions(-) (limited to 'src') diff --git a/src/downloadlistwidget.cpp b/src/downloadlistwidget.cpp index ac37b0ee..5ca6cb51 100644 --- a/src/downloadlistwidget.cpp +++ b/src/downloadlistwidget.cpp @@ -103,6 +103,7 @@ DownloadListWidget::DownloadListWidget(QWidget *parent) { setHeader(new DownloadListHeader(Qt::Horizontal, this)); + header()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter); header()->setSectionsMovable(true); header()->setContextMenuPolicy(Qt::CustomContextMenu); header()->setCascadingSectionResizes(true); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 8bd22ff1..acf6767f 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -6,7 +6,7 @@ 0 0 - 926 + 1009 710 @@ -97,12 +97,6 @@ true - - true - - - true - false @@ -781,22 +775,16 @@ p, li { white-space: pre-wrap; } Plugins - - 6 - - - 6 - - - 6 - - - 0 - + + Sort the plugins using LOOT. + + + Sort the plugins using LOOT. + Sort @@ -807,22 +795,28 @@ p, li { white-space: pre-wrap; } - - - Qt::Horizontal + + + Filter the list of plugins. - - - 40 - 20 - + + Filter the list of plugins. - + + + + + Filter + + - Restore Backup... + Restore a backup. + + + Restore a backup. @@ -842,7 +836,10 @@ p, li { white-space: pre-wrap; } - Create Backup + Create a backup. + + + Create a backup. @@ -869,7 +866,7 @@ p, li { white-space: pre-wrap; } - This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter. + <html><head/><body><p>This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter.</p></body></html> QFrame::Sunken @@ -896,14 +893,10 @@ p, li { white-space: pre-wrap; } Qt::CustomContextMenu - List of available esp/esm files + List of available esp/esm files. - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This list contains the esps, esms, and esls contained in the active mods. These require their own load order. Use drag&amp;drop to modify this load order. Please note that MO will only save the load order for mods that are active/checked.<br />There is a great tool named &quot;BOSS&quot; to automatically sort these files.</span></p></body></html> + List of available esp/esm files. QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked @@ -949,20 +942,6 @@ p, li { white-space: pre-wrap; } - - - - - - - - - Filter - - - - - @@ -973,18 +952,6 @@ p, li { white-space: pre-wrap; } Archives - - 6 - - - 6 - - - 6 - - - 6 - @@ -1043,27 +1010,15 @@ p, li { white-space: pre-wrap; } Data - - 6 - - - 6 - - - 6 - - - 6 - - refresh data-directory overview + Refresh the data structure. - Refresh the overview. This may take a moment. + Refresh the data structure. Refresh @@ -1075,44 +1030,41 @@ p, li { white-space: pre-wrap; } - - - Qt::Horizontal + + + Filter the Data tree. - - - 40 - 20 - + + Filter the Data tree. - + - Filters the above list so that only conflicts are displayed. + Filter the list so that only conflicts are displayed. - Filters the above list so that only conflicts are displayed. + Filter the list so that only conflicts are displayed. - Show only conflicts + Conflicts only - Filters the above list so that files from archives are not shown + Filter the list so that files from archives are shown. - Filters the above list so that files from archives are not shown + Filter the list so that files from archives are shown. - Show files from Archives + Archives @@ -1147,13 +1099,6 @@ p, li { white-space: pre-wrap; } - - - - - - - @@ -1161,18 +1106,6 @@ p, li { white-space: pre-wrap; } Saves - - 6 - - - 6 - - - 6 - - - 6 - @@ -1208,31 +1141,52 @@ p, li { white-space: pre-wrap; } Downloads - - 2 - - - 2 - - - 2 - - - 2 - - - - Refresh downloads view - - - Refresh - - - - :/MO/gui/resources/view-refresh.png:/MO/gui/resources/view-refresh.png - - + + + + + Refresh the downloads. + + + Refresh the downloads. + + + Refresh + + + + :/MO/gui/resources/view-refresh.png:/MO/gui/resources/view-refresh.png + + + + + + + Filter the list of downloads. + + + Filter the list of downloads. + + + Filter + + + + + + + Show downloads marked as hidden. + + + Show downloads marked as hidden. + + + Hidden files + + + + @@ -1256,9 +1210,6 @@ p, li { white-space: pre-wrap; } This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here. - - Qt::ScrollBarAlwaysOn - true @@ -1287,37 +1238,6 @@ p, li { white-space: pre-wrap; } - - - - - - Show Hidden - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Filter - - - - - @@ -1370,8 +1290,8 @@ p, li { white-space: pre-wrap; } 0 0 - 926 - 21 + 1009 + 22 diff --git a/src/moapplication.cpp b/src/moapplication.cpp index a071d58b..2fb12809 100644 --- a/src/moapplication.cpp +++ b/src/moapplication.cpp @@ -80,7 +80,11 @@ public: MOApplication::MOApplication(int &argc, char **argv) : QApplication(argc, argv) { - connect(&m_StyleWatcher, SIGNAL(fileChanged(QString)), SLOT(updateStyle(QString))); + connect(&m_StyleWatcher, &QFileSystemWatcher::fileChanged, [&](auto&& file){ + log::debug("style file '{}' changed, reloading", file); + updateStyle(file); + }); + m_DefaultStyle = style()->objectName(); setStyle(new ProxyStyle(style())); } diff --git a/src/modlist.cpp b/src/modlist.cpp index c0f18821..31eb8387 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -676,11 +676,6 @@ QVariant ModList::headerData(int section, Qt::Orientation orientation, return getColumnToolTip(section); } else if (role == Qt::TextAlignmentRole) { return QVariant(Qt::AlignCenter); - } else if (role == Qt::SizeHintRole) { - QSize temp = m_FontMetrics.size(Qt::TextSingleLine, getColumnName(section)); - temp.rwidth() += 20; - temp.rheight() += 12; - return temp; } } return QAbstractItemModel::headerData(section, orientation, role); diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 3f2f4018..266fe35c 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1315,11 +1315,6 @@ QVariant PluginList::headerData(int section, Qt::Orientation orientation, return getColumnName(section); } else if (role == Qt::ToolTipRole) { return getColumnToolTip(section); - } else if (role == Qt::SizeHintRole) { - QSize temp = m_FontMetrics.size(Qt::TextSingleLine, getColumnName(section)); - temp.rwidth() += 25; - temp.rheight() += 12; - return temp; } } return QAbstractItemModel::headerData(section, orientation, role); diff --git a/src/stylesheets/vs15 Dark-Green.qss b/src/stylesheets/vs15 Dark-Green.qss index 6d95c6cc..0a3150ad 100644 --- a/src/stylesheets/vs15 Dark-Green.qss +++ b/src/stylesheets/vs15 Dark-Green.qss @@ -692,19 +692,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; diff --git a/src/stylesheets/vs15 Dark-Orange.qss b/src/stylesheets/vs15 Dark-Orange.qss index 2dd27df4..0e1d96b1 100644 --- a/src/stylesheets/vs15 Dark-Orange.qss +++ b/src/stylesheets/vs15 Dark-Orange.qss @@ -603,7 +603,7 @@ SaveGameInfoWidget { border-width: 1px; padding: 2px; } - QStatusBar::item {border: None;} +QStatusBar::item {border: None;} /* Progress Bars (Downloads) #QProgressBar */ QProgressBar { @@ -693,19 +693,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; diff --git a/src/stylesheets/vs15 Dark-Purple.qss b/src/stylesheets/vs15 Dark-Purple.qss index 116aaa7d..c19d188b 100644 --- a/src/stylesheets/vs15 Dark-Purple.qss +++ b/src/stylesheets/vs15 Dark-Purple.qss @@ -603,7 +603,7 @@ SaveGameInfoWidget { border-width: 1px; padding: 2px; } - QStatusBar::item {border: None;} +QStatusBar::item {border: None;} /* Progress Bars (Downloads) #QProgressBar */ QProgressBar { @@ -693,19 +693,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; diff --git a/src/stylesheets/vs15 Dark-Red.qss b/src/stylesheets/vs15 Dark-Red.qss index 60f565a1..a6221dff 100644 --- a/src/stylesheets/vs15 Dark-Red.qss +++ b/src/stylesheets/vs15 Dark-Red.qss @@ -603,7 +603,7 @@ SaveGameInfoWidget { border-width: 1px; padding: 2px; } - QStatusBar::item {border: None;} +QStatusBar::item {border: None;} /* Progress Bars (Downloads) #QProgressBar */ QProgressBar { @@ -693,19 +693,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; diff --git a/src/stylesheets/vs15 Dark-Yellow.qss b/src/stylesheets/vs15 Dark-Yellow.qss index bfaa4c94..fb2e0422 100644 --- a/src/stylesheets/vs15 Dark-Yellow.qss +++ b/src/stylesheets/vs15 Dark-Yellow.qss @@ -1,4 +1,3 @@ -/*base*/ /*!************************************* VS15 Dark **************************************** @@ -603,7 +602,7 @@ SaveGameInfoWidget { border-width: 1px; padding: 2px; } - QStatusBar::item {border: None;} +QStatusBar::item {border: None;} /* Progress Bars (Downloads) #QProgressBar */ QProgressBar { @@ -693,19 +692,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; diff --git a/src/stylesheets/vs15 Dark.qss b/src/stylesheets/vs15 Dark.qss index 1d27be17..17def4dd 100644 --- a/src/stylesheets/vs15 Dark.qss +++ b/src/stylesheets/vs15 Dark.qss @@ -692,19 +692,6 @@ QTabBar QToolButton::left-arrow:hover { image: url(./vs15/scrollbar-left-hover.png); } /* Special styles */ -/* fix margins on tabs pane */ -QLineEdit#espFilterEdit { - margin: 0 0 6px 0; } - -QTreeView#downloadView { - margin: 4px 4px 0 4px; } - -QCheckBox#showHiddenBox { - margin: 0 0 4px 4px; } - -QLineEdit#downloadFilterEdit { - margin: 0 4px 4px 0; } - QWidget#tabImages QPushButton { background-color: transparent; margin: 0 .3em; -- cgit v1.3.1