From 03ebad6bb6c922323b16b3ae6a701ddc34ba538b Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Mon, 16 Sep 2019 04:16:59 +0300 Subject: Add expanded style sheet support Allow lobby fonts to happen --- include/aoapplication.h | 3 +++ include/courtroom.h | 6 ++++++ include/lobby.h | 4 ++++ 3 files changed, 13 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 24dc35c..fcee38f 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -252,6 +252,9 @@ public: //Returns a QStringList of all key=value definitions on a given tag. QStringList read_char_ini_tag(QString p_char, QString target_tag); + //Returns the text between target_tag and terminator_tag in p_file + QString get_stylesheet(QString target_tag, QString p_file); + //Returns the side of the p_char character from that characters ini file QString get_char_side(QString p_char); diff --git a/include/courtroom.h b/include/courtroom.h index 7fbde27..9d33a91 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -122,6 +122,12 @@ public: //helper function that calls above function on the relevant widgets void set_fonts(); + //sets dropdown menu stylesheet + void set_dropdown(QWidget *widget, QString target_tag); + + //helper funciton that call above function on the relevant widgets + void set_dropdowns(); + void set_window_title(QString p_title); //reads theme inis and sets size and pos based on the identifier diff --git a/include/lobby.h b/include/lobby.h index 4293ac3..e0cd03d 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -32,6 +32,10 @@ public: void append_chatmessage(QString f_name, QString f_message); void append_error(QString f_message); void set_player_count(int players_online, int max_players); + void set_stylesheet(QWidget *widget, QString target_tag); + void set_stylesheets(); + void set_fonts(); + void set_font(QWidget *widget, QString p_identifier); void set_loading_text(QString p_text); void show_loading_overlay(){ui_loading_background->show();} void hide_loading_overlay(){ui_loading_background->hide();} -- cgit