mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
optimize rounded border on efficient mode
Change-Id: Ia5bc234b45d114154b2405a71011aea2af7acb30
This commit is contained in:
parent
19f6c34f68
commit
1bb203ef11
@ -22,8 +22,27 @@ MainPanel::MainPanel(QWidget *parent)
|
||||
setObjectName("MainPanel");
|
||||
setStyleSheet("QWidget #MainPanel {"
|
||||
"border:none;"
|
||||
"background-color:rgba(0, 0, 0, .6);"
|
||||
"border-radius:5px 5px 5px 5px;"
|
||||
"background-color:rgba(0, 0, 0, .65);"
|
||||
"}"
|
||||
// Top
|
||||
"QWidget #MainPanel[displayMode='0'][position='0'] {"
|
||||
"border-bottom-left-radius:5px;"
|
||||
"border-bottom-right-radius:5px;"
|
||||
"}"
|
||||
// Right
|
||||
"QWidget #MainPanel[displayMode='0'][position='1'] {"
|
||||
"border-top-left-radius:5px;"
|
||||
"border-bottom-left-radius:5px;"
|
||||
"}"
|
||||
// Bottom
|
||||
"QWidget #MainPanel[displayMode='0'][position='2'] {"
|
||||
"border-top-left-radius:5px;"
|
||||
"border-top-right-radius:5px;"
|
||||
"}"
|
||||
// Left
|
||||
"QWidget #MainPanel[displayMode='0'][position='3'] {"
|
||||
"border-top-right-radius:5px;"
|
||||
"border-bottom-right-radius:5px;"
|
||||
"}");
|
||||
|
||||
connect(m_itemController, &DockItemController::itemInserted, this, &MainPanel::itemInserted);
|
||||
@ -69,6 +88,19 @@ void MainPanel::updateDockDisplayMode(const DisplayMode displayMode)
|
||||
// if (item->itemType() == DockItem::Placeholder)
|
||||
// item->setVisible(displayMode == Dock::Efficient);
|
||||
// }
|
||||
|
||||
// reload qss
|
||||
setStyleSheet(styleSheet());
|
||||
}
|
||||
|
||||
int MainPanel::displayMode()
|
||||
{
|
||||
return int(m_displayMode);
|
||||
}
|
||||
|
||||
int MainPanel::position()
|
||||
{
|
||||
return int(m_position);
|
||||
}
|
||||
|
||||
void MainPanel::resizeEvent(QResizeEvent *e)
|
||||
|
@ -11,12 +11,16 @@
|
||||
class MainPanel : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int displayMode READ displayMode DESIGNABLE true)
|
||||
Q_PROPERTY(int position READ position DESIGNABLE true)
|
||||
|
||||
public:
|
||||
explicit MainPanel(QWidget *parent = 0);
|
||||
|
||||
void updateDockPosition(const Position dockPosition);
|
||||
void updateDockDisplayMode(const Dock::DisplayMode displayMode);
|
||||
int displayMode();
|
||||
int position();
|
||||
|
||||
signals:
|
||||
void requestRefershWindowVisible() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user