Improve log formatting

* Updated log level detection for current Minecraft versions
* Better formatting: using a monospaced font and raw text instead of HTML (fixes #111)
This commit is contained in:
Petr Mrázek
2014-11-09 14:53:08 +01:00
parent f9a7c1cf21
commit 2e9284951c
3 changed files with 97 additions and 62 deletions

View File

@ -28,6 +28,7 @@ namespace Ui
{
class LogPage;
}
class QTextCharFormat;
class LogPage : public QWidget, public BasePage
{
@ -55,15 +56,6 @@ public:
}
virtual bool shouldDisplay() const;
private:
/**
* @brief write a colored paragraph
* @param data the string
* @param color the css color name
* this will only insert a single paragraph.
* \n are ignored. a real \n is always appended.
*/
void writeColor(QString text, const char *color, const char *background);
private slots:
/**
* @brief write a string
@ -90,4 +82,6 @@ private:
bool m_scroll_active = true;
int m_saved_offset = 0;
bool m_write_active = true;
QTextCharFormat * defaultFormat;
};