diff options
author | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-04 23:12:00 +0200 |
---|---|---|
committer | Alex Borisov <borisov.alexandr@rambler.ru> | 2011-12-04 23:12:00 +0200 |
commit | 7648ef9f419974ddd5fccaeaa9bf06b9a5e660b3 (patch) | |
tree | 167e684dd3e04561a5175645469ce537621e6d88 | |
parent | dddb90056c37c9d094255ed8af956b4c049b41c9 (diff) |
FIX static proxy button's content alignment
-rw-r--r-- | client/Dialog.cpp | 4 | ||||
-rw-r--r-- | client/style.qss | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/client/Dialog.cpp b/client/Dialog.cpp index 3df6c19..4ce48be 100644 --- a/client/Dialog.cpp +++ b/client/Dialog.cpp @@ -75,8 +75,12 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent) QLabel *btnLabel = new QLabel(btnStr); btnLabel->setAttribute(Qt::WA_TransparentForMouseEvents); QHBoxLayout *btnLayout = new QHBoxLayout; + // insert spacers at the beginning and + // the end to center-align button content + btnLayout->addStretch(); btnLayout->addWidget(btnLabel); btnLayout->setSizeConstraint(QLayout::SetMinimumSize); + btnLayout->addStretch(); QPushButton *btn = new QPushButton(); btn->setObjectName("bottomBtn"); btn->setCheckable(true); diff --git a/client/style.qss b/client/style.qss index 8ab52ce..290c9a5 100644 --- a/client/style.qss +++ b/client/style.qss @@ -32,7 +32,7 @@ QLabel { } QLabel#topLabel { -font-family: monospace; + font-family: monospace; font-weight: bold; font-style: italic; font-size: 16px; |