adjust panel border

Change-Id: I98cfc15843cf5e835080aeea9b327453a431db02
This commit is contained in:
石博文 2016-07-12 16:08:46 +08:00 committed by Hualet Wang
parent bbf96e1bfc
commit 4fb2b161fc
2 changed files with 7 additions and 6 deletions

View File

@ -21,7 +21,7 @@ MainPanel::MainPanel(QWidget *parent)
setAcceptDrops(true);
setObjectName("MainPanel");
setStyleSheet("QWidget #MainPanel {"
"border:" str(PANEL_BORDER) "px solid rgba(162, 162, 162, .2);"
"border:" xstr(PANEL_BORDER) "px solid rgba(162, 162, 162, .2);"
"background-color:rgba(10, 10, 10, .6);"
"}"
// Top
@ -45,19 +45,19 @@ MainPanel::MainPanel(QWidget *parent)
"border-bottom-right-radius:5px;"
"}"
"QWidget #MainPanel[position='0'] {"
"padding:0 " str(PANEL_PADDING) "px;"
"padding:0 " xstr(PANEL_PADDING) "px;"
"border-top:none;"
"}"
"QWidget #MainPanel[position='1'] {"
"padding:" str(PANEL_PADDING) "px 0;"
"padding:" xstr(PANEL_PADDING) "px 0;"
"border-right:none;"
"}"
"QWidget #MainPanel[position='2'] {"
"padding:0 " str(PANEL_PADDING) "px;"
"padding:0 " xstr(PANEL_PADDING) "px;"
"border-bottom:none;"
"}"
"QWidget #MainPanel[position='3'] {"
"padding:" str(PANEL_PADDING) "px 0;"
"padding:" xstr(PANEL_PADDING) "px 0;"
"border-left:none;"
"}");

View File

@ -8,9 +8,10 @@
#include <QTimer>
#include <QBoxLayout>
#define xstr(s) str(s)
#define str(s) #s
#define PANEL_BORDER 1
#define PANEL_PADDING 6
#define str(x) #x
class MainPanel : public QFrame
{