Skip to content

Commit df1bc94

Browse files
Added Auto-Hide tab unpin context menu entry
1 parent 6924e69 commit df1bc94

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/AutoHideTab.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,23 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev)
393393
d->createAutoHideToAction(tr("Right"), SideBarRight, menu);
394394
d->createAutoHideToAction(tr("Bottom"), SideBarBottom, menu);
395395

396+
Action = Menu.addAction(tr("Unpin (Dock)"), this, SLOT(unpinDockWidget()));
397+
396398
Menu.exec(ev->globalPos());
397399
}
398400

399401

400402
//============================================================================
401403
void CAutoHideTab::setDockWidgetFloating()
402404
{
403-
dockWidget()->setFloating();
405+
d->DockWidget->setFloating();
406+
}
407+
408+
409+
//============================================================================
410+
void CAutoHideTab::unpinDockWidget()
411+
{
412+
d->DockWidget->setAutoHide(false);
404413
}
405414

406415

src/AutoHideTab.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ public Q_SLOTS:
145145
* Set the dock widget floating, if it is floatable
146146
*/
147147
void setDockWidgetFloating();
148+
149+
/**
150+
* Unpin and dock the auto hide widget
151+
*/
152+
void unpinDockWidget();
148153
}; // class AutoHideTab
149154
}
150155
// namespace ads

0 commit comments

Comments
 (0)