Update the border style of preview

tower: https://tower.im/projects/715dbdd34f694ea08f6de7888b7ffd7d/todos/5fec5f913c034a46934502fe9cba8cff/

Change-Id: Ia71362595545d0002d37ae915869611f97c78d7e
This commit is contained in:
杨万青 2015-11-06 18:44:10 +08:00
parent 293568b692
commit 0d6d0c5fc3
Notes: Deepin Code Review 2016-06-14 07:19:47 +00:00
Verified+1: Anonymous Coward #1000004
Verified+1: <wangyanli@linuxdeepin.com>
Code-Review+2: <mr.asianwang@gmail.com>
Submitted-by: <mr.asianwang@gmail.com>
Submitted-at: Sun, 15 Nov 2015 11:40:33 +0800
Reviewed-on: https://cr.deepin.io/8445
Project: dde/dde-dock
Branch: refs/heads/master
2 changed files with 11 additions and 3 deletions

View File

@ -59,14 +59,14 @@ QPushButton#AppPreviewLoaderFrameCloseButton:pressed {
border-image: url(:/images/resources/dark/images/close_press.png);
}
QFrame#WindowPreview {
AppPreviewLoader {
border-radius: 3px;
border-width: 3px;
border-width: 2px;
border-style: solid;
border-color: rgba(255,255,255,0.1);
}
QFrame#WindowPreview[isHover="true"] {
AppPreviewLoader[isHover="true"] {
border-color: rgba(255,255,255,0.5);
}
@ -75,6 +75,7 @@ QLabel#AppPreviewLoaderFrameTitle {
border-bottom-left-radius: 3px;
border-top-right-radius: 0px;
border-bottom-right-radius: 3px;
border-width: 0;
font-size: 10px;
color: #FFFFFF;
background-color: rgba(0,0,0,0.7);

View File

@ -6,6 +6,13 @@ PreviewWindow::PreviewWindow(ArrowDirection direction, QWidget *parent) : DArrow
setArrowWidth(ARROW_WIDTH);
setArrowHeight(ARROW_HEIGHT);
//QWidget calls this function after it has been fully constructed but before it is shown the very first time.
//so call it to make sure the style sheet won't repolish and cover the value set by seter-function
ensurePolished();
setRadius(4);
setBorderWidth(1);
setBorderColor(QColor(0, 0, 0, 0.2 * 255));
m_showTimer = new QTimer(this);
m_showTimer->setSingleShot(true);
connect(m_showTimer, &QTimer::timeout, this, &PreviewWindow::onShowTimerTriggered);