diff options
| author | Al <26797547+Al12rs@users.noreply.github.com> | 2020-02-27 11:02:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-27 11:02:34 +0100 |
| commit | a44100ada11a5e7a9849d4308bcb533bf65567ef (patch) | |
| tree | 2499044e60ebfb4044e1fe10204ef627d923e30b /src/loglist.cpp | |
| parent | 756056fcc3fce44f9ceaccfb5e9f2e9c9c0257fb (diff) | |
| parent | c2e2be8ff7953c59cbf51024e3ff0249ad83387c (diff) | |
Merge pull request #1021 from Al12rs/log_changes
Various UI changes:
Diffstat (limited to 'src/loglist.cpp')
| -rw-r--r-- | src/loglist.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/loglist.cpp b/src/loglist.cpp index 28aae0ff..31f1817f 100644 --- a/src/loglist.cpp +++ b/src/loglist.cpp @@ -117,7 +117,7 @@ QVariant LogModel::data(const QModelIndex& index, int role) const const auto& e = m_entries[row];
if (role == Qt::DisplayRole) {
- if (index.column() == 1) {
+ if (index.column() == 0) {
const auto ms = duration_cast<milliseconds>(e.time.time_since_epoch());
const auto s = duration_cast<seconds>(ms);
@@ -132,7 +132,7 @@ QVariant LogModel::data(const QModelIndex& index, int role) const }
if (role == Qt::DecorationRole) {
- if (index.column() == 0) {
+ if (index.column() == 1) {
switch (e.level) {
case log::Warning:
return QIcon(":/MO/gui/warning");
@@ -140,8 +140,10 @@ QVariant LogModel::data(const QModelIndex& index, int role) const case log::Error:
return QIcon(":/MO/gui/problem");
- case log::Debug: // fall-through
+ case log::Debug:
+ return QIcon(":/MO/gui/debug");
case log::Info:
+ return QIcon(":/MO/gui/information");
default:
return {};
}
@@ -163,8 +165,8 @@ LogList::LogList(QWidget* parent) setModel(&LogModel::instance());
header()->setMinimumSectionSize(0);
- header()->resizeSection(0, 20);
- header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
+ header()->resizeSection(1, 20);
+ header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
setAutoScroll(true);
scrollToBottom();
|
