summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--[-rwxr-xr-x]client/Config.cpp0
-rw-r--r--client/Dialog.cpp12
-rw-r--r--[-rwxr-xr-x]client/ProxyClientApp.cpp0
-rw-r--r--[-rwxr-xr-x]client/ProxyClientApp.h0
-rw-r--r--[-rwxr-xr-x]client/client.h0
-rw-r--r--[-rwxr-xr-x]client/client.pro0
-rw-r--r--client/config/static_proxy_list.cfg2
-rw-r--r--client/images/down_arrow.pngbin0 -> 175 bytes
-rw-r--r--client/images/frame.pngbin0 -> 253 bytes
-rw-r--r--client/images/pagefold.pngbin0 -> 1545 bytes
-rw-r--r--client/images/pushbutton.pngbin0 -> 533 bytes
-rw-r--r--client/images/pushbutton_hover.pngbin0 -> 525 bytes
-rw-r--r--client/images/pushbutton_pressed.pngbin0 -> 513 bytes
-rw-r--r--[-rwxr-xr-x]client/main.cpp0
-rw-r--r--client/style.qss120
15 files changed, 132 insertions, 2 deletions
diff --git a/client/Config.cpp b/client/Config.cpp
index e6174c1..e6174c1 100755..100644
--- a/client/Config.cpp
+++ b/client/Config.cpp
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)
diff --git a/client/ProxyClientApp.cpp b/client/ProxyClientApp.cpp
index 9d1b797..9d1b797 100755..100644
--- a/client/ProxyClientApp.cpp
+++ b/client/ProxyClientApp.cpp
diff --git a/client/ProxyClientApp.h b/client/ProxyClientApp.h
index 6410d65..6410d65 100755..100644
--- a/client/ProxyClientApp.h
+++ b/client/ProxyClientApp.h
diff --git a/client/client.h b/client/client.h
index 7be1ce2..7be1ce2 100755..100644
--- a/client/client.h
+++ b/client/client.h
diff --git a/client/client.pro b/client/client.pro
index 16de7f0..16de7f0 100755..100644
--- a/client/client.pro
+++ b/client/client.pro
diff --git a/client/config/static_proxy_list.cfg b/client/config/static_proxy_list.cfg
index e1cc110..57d04ff 100644
--- a/client/config/static_proxy_list.cfg
+++ b/client/config/static_proxy_list.cfg
@@ -2,5 +2,3 @@
192.168.222.1:10002 "Российский сервер No2" 1 132;
192.168.222.1:10003 "Украинский сервер No1" 2 12;
login:password@192.168.222.1:10004 "Украинский сервер No2" 2 45;
-192.168.222.1:10003 "Украинский сервер No3" 2 35;
-192.168.222.1:10003 "Украинский сервер No4" 2 64;
diff --git a/client/images/down_arrow.png b/client/images/down_arrow.png
new file mode 100644
index 0000000..85004ae
--- /dev/null
+++ b/client/images/down_arrow.png
Binary files differ
diff --git a/client/images/frame.png b/client/images/frame.png
new file mode 100644
index 0000000..05a6005
--- /dev/null
+++ b/client/images/frame.png
Binary files differ
diff --git a/client/images/pagefold.png b/client/images/pagefold.png
new file mode 100644
index 0000000..69be8f2
--- /dev/null
+++ b/client/images/pagefold.png
Binary files differ
diff --git a/client/images/pushbutton.png b/client/images/pushbutton.png
new file mode 100644
index 0000000..c7529ba
--- /dev/null
+++ b/client/images/pushbutton.png
Binary files differ
diff --git a/client/images/pushbutton_hover.png b/client/images/pushbutton_hover.png
new file mode 100644
index 0000000..af0ef9d
--- /dev/null
+++ b/client/images/pushbutton_hover.png
Binary files differ
diff --git a/client/images/pushbutton_pressed.png b/client/images/pushbutton_pressed.png
new file mode 100644
index 0000000..f7381f7
--- /dev/null
+++ b/client/images/pushbutton_pressed.png
Binary files differ
diff --git a/client/main.cpp b/client/main.cpp
index d5a8bcc..d5a8bcc 100755..100644
--- a/client/main.cpp
+++ b/client/main.cpp
diff --git a/client/style.qss b/client/style.qss
new file mode 100644
index 0000000..1bbbf6d
--- /dev/null
+++ b/client/style.qss
@@ -0,0 +1,120 @@
+
+/* Customize dialog window. */
+ProxyDialog {
+ background-color: gainsboro;
+ background-image: url(images/pagefold.png);
+ background-position: top right;
+ background-repeat: no-repeat
+}
+
+
+/* QFrame customization
+ * (in this particular case it applies to QComboBox dropdown list) */
+QFrame {
+ border-image: url(images/frame.png) 4;
+ border-width: 3;
+}
+
+/* customize label style */
+QLabel {
+ border: none;
+ border-image: none;
+ padding: 0;
+ background: none;
+}
+
+QLabel#topLabel {
+ font-family: monospace;
+ font-weight: bold;
+ font-style: italic;
+ font-size: 16px;
+ color: qlineargradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 lightblue, stop: 0.5 blue, stop: 1 navy);
+}
+
+QLabel#bottomLabel {
+ font-weight: bold;
+ color: qlineargradient( x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 yellow, stop: 0.5 green, stop: 1 purple);
+}
+
+/* Customize bottom buttons labels */
+QPushButton#bottomBtn QLabel {
+ font-family: monospace;
+}
+
+
+/* Set the selection colors for all widgets. */
+QWidget {
+ selection-color: black;
+ selection-background-color: Silver;
+ color: black;
+}
+
+
+/* Customize push buttons and comboboxes.
+ * Read-only combobox is very similar to a push button,
+ * so they share the same border image. */
+QPushButton, QComboBox {
+ border-image: url(images/pushbutton.png) 5;
+ border-width: 5;
+}
+
+/* QPushButton customization */
+QPushButton {
+ min-width: 100px;
+ max-width: 100px;
+}
+
+/* Customize bottom buttons (aka staticProxyButton) */
+QPushButton#bottomBtn {
+ min-width: 200px;
+ max-width: 200px;
+}
+
+QPushButton:hover, QComboBox:hover {
+ border-image: url(images/pushbutton_hover.png) 5;
+ border-width: 5;
+}
+
+QPushButton:pressed, QPushButton:checked, QComboBox:on {
+ border-image: url(images/pushbutton_pressed.png) 5;
+ border-width: 5;
+}
+
+
+/* QComboBox customizations */
+QComboBox {
+ min-width: 150px;
+ max-width: 150px;
+ padding-left: 3px;
+ padding-right: 20px; /* space for the arrow */
+}
+
+QComboBox::drop-down {
+ subcontrol-origin: padding;
+ subcontrol-position: top right;
+ width: 15px;
+ border-left-style: solid;
+ border-left-color: darkgray;
+ border-left-width: 1px;
+}
+
+/* Customize arrows. */
+QComboBox::down-arrow {
+ image: url(images/down_arrow.png);
+ width: 7px;
+ height: 7px;
+}
+
+QComboBox::down-arrow {
+ subcontrol-origin: content;
+ subcontrol-position: center;
+ position: relative;
+ left: 1px; /* 1 pixel dropdown border */
+}
+
+/* The combobox arrow is on when the popup is open. */
+QComboBox::down-arrow:on {
+ position: relative;
+ top: 1px;
+ left: 2px;
+}