mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
feal(dock): modefied icon doesn't change with the window
This commit is contained in:
parent
f05debd9f5
commit
4ac6a85b3b
@ -68,11 +68,12 @@ DockItem::DockItem(QWidget *parent)
|
||||
grabGesture(Qt::TapAndHoldGesture);
|
||||
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
setMaximumSize(50,50);
|
||||
}
|
||||
|
||||
QSize DockItem::sizeHint() const
|
||||
{
|
||||
return QSize(50, 50);
|
||||
return maximumSize();
|
||||
}
|
||||
|
||||
DockItem::~DockItem()
|
||||
|
@ -165,8 +165,18 @@ void MainPanelControl::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void MainPanelControl::updateAppAreaSonWidgetSize()
|
||||
{
|
||||
for (int i = 0; i < m_appAreaSonLayout->count(); ++i) {
|
||||
QWidget *w = m_appAreaSonLayout->itemAt(i)->widget();
|
||||
if (w) {
|
||||
if ((m_position == Qt::TopEdge) || (m_position == Qt::BottomEdge)) {
|
||||
w->setMaximumSize(height(), height());
|
||||
} else {
|
||||
w->setMaximumSize(width(), width());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((m_position == Qt::TopEdge) || (m_position == Qt::BottomEdge)) {
|
||||
m_appAreaSonWidget->setMaximumHeight(QWIDGETSIZE_MAX);
|
||||
m_appAreaSonWidget->setMaximumWidth(qMin((m_appAreaWidget->geometry().right() - width() / 2) * 2, m_appAreaWidget->width()));
|
||||
} else {
|
||||
m_appAreaSonWidget->setMaximumWidth(QWIDGETSIZE_MAX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user