diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-16 06:09:39 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-16 06:09:39 +0300 |
| commit | 9b39b7d6aa2beb8b5496a528c2351adf125c4601 (patch) | |
| tree | 605b75c820fd63deb8a4e0b2032d1c0851fc32ff /include | |
| parent | 03ebad6bb6c922323b16b3ae6a701ddc34ba538b (diff) | |
Allow char.ini to override the chat font and font size with chat_font = and chat_size =
Scream at the coders that decided hard-coding fonts and colors was a good idea (gotta properly let the themes modify that later)
Fix a lot of ui elements not properly respecting the themes and their colors
add a set_qfont method for those situations that need it
Allow the theme to change sender colors for ooc and ms chatlogs
rename url parser variable to something more immediately apparent as to what it is for readability's sake
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 8 | ||||
| -rw-r--r-- | include/aotextarea.h | 2 | ||||
| -rw-r--r-- | include/courtroom.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index fcee38fd..e4a5b7f6 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -261,9 +261,15 @@ public: //Returns the showname from the ini of p_char QString get_showname(QString p_char); - //Returns the value of chat from the specific p_char's ini file + //Returns the value of chat image from the specific p_char's ini file QString get_chat(QString p_char); + //Returns the value of chat font from the specific p_char's ini file + QString get_chat_font(QString p_char); + + //Returns the value of chat font size from the specific p_char's ini file + int get_chat_size(QString p_char); + //Returns the value of shouts from the specified p_char's ini file QString get_char_shouts(QString p_char); diff --git a/include/aotextarea.h b/include/aotextarea.h index d44596b2..266b7222 100644 --- a/include/aotextarea.h +++ b/include/aotextarea.h @@ -16,7 +16,7 @@ public: void append_error(QString p_message); private: - const QRegExp omnis_dank_url_regex = QRegExp("\\b(https?://\\S+\\.\\S+)\\b"); + const QRegExp url_parser_regex = QRegExp("\\b(https?://\\S+\\.\\S+)\\b"); void auto_scroll(QTextCursor old_cursor, int scrollbar_value, bool is_scrolled_down); }; diff --git a/include/courtroom.h b/include/courtroom.h index 9d33a911..304dd64f 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -117,8 +117,13 @@ public: //sets position of widgets based on theme ini files void set_widgets(); + //sets font size based on theme ini files void set_font(QWidget *widget, QString p_identifier); + + //actual operation of setting the font on a widget + void set_qfont(QWidget *widget, QFont font, QColor f_color = Qt::black, bool bold = false); + //helper function that calls above function on the relevant widgets void set_fonts(); |
