From 69c33e4c2210ed56df5da3378132625fa3ac6cd8 Mon Sep 17 00:00:00 2001 From: OmniTroid Date: Mon, 13 Feb 2017 23:56:23 +0100 Subject: [PATCH] tailoring for windows --- courtroom.cpp | 21 +++++++++++++++++---- lobby.cpp | 1 + packet_distribution.cpp | 1 - path_functions.cpp | 4 ++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/courtroom.cpp b/courtroom.cpp index d20ef48..841e3aa 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -338,14 +338,17 @@ void Courtroom::set_widgets() ui_vp_chatbox->hide(); set_size_and_pos(ui_vp_showname, "showname"); - QFont f = ui_vp_showname->font(); - f.setPointSize(8); - ui_vp_showname->setFont(f); + QFont pt_8 = ui_vp_showname->font(); + QFont pt_10 = ui_vp_showname->font(); + pt_8.setPointSize(8); + pt_10.setPointSize(10); + ui_vp_showname->setFont(pt_8); ui_vp_showname->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: white;"); set_size_and_pos(ui_vp_message, "message"); ui_vp_message->setReadOnly(true); + ui_vp_message->setFont(pt_10); ui_vp_message->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: white"); @@ -364,6 +367,7 @@ void Courtroom::set_widgets() ui_vp_objection->combo_resize(ui_viewport->width(), ui_viewport->height()); set_size_and_pos(ui_ic_chatlog, "ic_chatlog"); + ui_ic_chatlog->setFont(pt_10); ui_ic_chatlog->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: white;"); @@ -381,7 +385,7 @@ void Courtroom::set_widgets() set_size_and_pos(ui_music_list, "music_list"); ui_music_list->setStyleSheet("QListWidget{background-color: rgba(0, 0, 0, 0);}"); - ui_music_list->setFont(f); + ui_music_list->setFont(pt_8); set_size_and_pos(ui_ic_chat_message, "ic_chat_message"); ui_ic_chat_message->setStyleSheet("background-color: rgba(89, 89, 89, 255);"); @@ -649,6 +653,15 @@ void Courtroom::enter_courtroom(int p_cid) ui_prosecution_plus->hide(); } + QString char_path = ao_app->get_character_path(current_char); + + if (ao_app->custom_objection_enabled && + file_exists(char_path + "custom.gif") && + file_exists(char_path + "custom.wav")) + ui_custom_objection->show(); + else + ui_custom_objection->hide(); + if (ao_app->flipping_enabled) ui_flip->show(); diff --git a/lobby.cpp b/lobby.cpp index b510113..cbf32ab 100644 --- a/lobby.cpp +++ b/lobby.cpp @@ -112,6 +112,7 @@ void Lobby::set_widgets() ui_loading_text->setFont(QFont("Arial", 20, QFont::Bold)); ui_loading_text->setReadOnly(true); ui_loading_text->setAlignment(Qt::AlignCenter); + ui_loading_text->setFrameStyle(QFrame::NoFrame); ui_loading_text->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: rgba(255, 128, 0, 255);"); ui_loading_text->append("Loading"); diff --git a/packet_distribution.cpp b/packet_distribution.cpp index 4e1bb0a..63e137e 100644 --- a/packet_distribution.cpp +++ b/packet_distribution.cpp @@ -167,7 +167,6 @@ void AOApplication::server_packet_received(AOPacket *p_packet) QString window_title = "Attorney Online 2"; int selected_server = w_lobby->get_selected_server(); - if (w_lobby->public_servers_selected) { if (selected_server >= 0 && selected_server < server_list.size()) diff --git a/path_functions.cpp b/path_functions.cpp index 0630e0f..5c58e3d 100644 --- a/path_functions.cpp +++ b/path_functions.cpp @@ -1,8 +1,12 @@ #include "aoapplication.h" #include "courtroom.h" +#ifndef OMNI_WIN_DEBUG +#define OMNI_WIN_DEBUG + #include #include +#endif QString AOApplication::get_base_path(){