1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

Merge pull request #9 from duerr-ndt/revert-5-retain_tab_bar_close_button_size_on_hide

Revert "CloseButton: Retain size when hidden."
This commit is contained in:
Nick D'Ademo 2019-10-15 15:06:43 +08:00 committed by GitHub
commit db34e501dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,10 +152,7 @@ void DockWidgetTabPrivate::createLayout()
CloseIcon.addPixmap(internal::createTransparentPixmap(normalPixmap, 0.25), QIcon::Disabled);
CloseButton->setIcon(CloseIcon);
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
QSizePolicy spRetain = CloseButton->sizePolicy();
spRetain.setRetainSizeWhenHidden(true);
CloseButton->setSizePolicy(spRetain);
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
CloseButton->setVisible(false);
#ifndef QT_NO_TOOLTIP
CloseButton->setToolTip(QObject::tr("Close Tab"));