From 7648ef9f419974ddd5fccaeaa9bf06b9a5e660b3 Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Sun, 4 Dec 2011 23:12:00 +0200 Subject: FIX static proxy button's content alignment --- client/Dialog.cpp | 4 ++++ client/style.qss | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3