summaryrefslogtreecommitdiff
path: root/client/Dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/Dialog.cpp')
-rw-r--r--client/Dialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/Dialog.cpp b/client/Dialog.cpp
index e9d3883..bf0c530 100644
--- a/client/Dialog.cpp
+++ b/client/Dialog.cpp
@@ -12,9 +12,11 @@ using namespace std;
ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
{
UpdatedConfig *cfg = UpdatedConfig::CurrentConfig();
+ cfg->AcquireConfig();
/* generic proxy panel */
topLabel = new QLabel(QString::fromLocal8Bit(cfg->TopPanelText.c_str()));
+ topLabel->setObjectName("topLabel");
topLabel->setAlignment(Qt::AlignHCenter);
countryBox = new QComboBox;
stateBox = new QComboBox;
@@ -45,6 +47,7 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
/* static proxy panel */
bottomLabel = new QLabel(QString::fromLocal8Bit(cfg->BottomPanelText.c_str()));
+ bottomLabel->setObjectName("bottomLabel");
bottomLabel->setAlignment(Qt::AlignHCenter);
QGridLayout *bottomPanelLayout = new QGridLayout;
unsigned nlines = cfg->GetStaticProxyGuiLines();
@@ -74,6 +77,7 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
btnLayout->addWidget(btnLabel);
btnLayout->setSizeConstraint(QLayout::SetMinimumSize);
QPushButton *btn = new QPushButton();
+ btn->setObjectName("bottomBtn");
btn->setLayout(btnLayout);
btn->setCheckable(true);
bottomPanelLayout->addWidget(btn, i, j);
@@ -87,6 +91,14 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
mainLayout->addWidget(bottomLabel);
mainLayout->addLayout(bottomPanelLayout);
setLayout(mainLayout);
+
+ QFile file("style.qss");
+ file.open(QFile::ReadOnly);
+ QString cssStr = QString::fromLocal8Bit(file.readAll());
+ file.close();
+
+ Logger::Debug("Going to apply css style: %s\n", cssStr.toLocal8Bit().data());
+ setStyleSheet(cssStr);
}
void ProxyDialog::CountryActivated(int index)