mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-04-01 02:42:39 +08:00
Merge pull request #5 from duerr-ndt/retain_tab_bar_close_button_size_on_hide
CloseButton: Retain size when hidden.
This commit is contained in:
commit
a4d06923f1
@ -153,7 +153,10 @@ void DockWidgetTabPrivate::createLayout()
|
||||
CloseIcon.addPixmap(internal::createTransparentPixmap(normalPixmap, 0.25), QIcon::Disabled);
|
||||
CloseButton->setIcon(CloseIcon);
|
||||
|
||||
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
CloseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
QSizePolicy spRetain = CloseButton->sizePolicy();
|
||||
spRetain.setRetainSizeWhenHidden(true);
|
||||
CloseButton->setSizePolicy(spRetain);
|
||||
CloseButton->setVisible(false);
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
CloseButton->setToolTip(QObject::tr("Close Tab"));
|
||||
|
Loading…
Reference in New Issue
Block a user