mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 08:51:24 +00:00
Let window.resizeTo etc. also work when the tabbar is shown and there's only
one tab. Tested by Andras Mantia. svn path=/trunk/kdebase/konqueror/; revision=262514
This commit is contained in:
parent
b6e4448b08
commit
4e2d181bae
|
@ -25,6 +25,7 @@
|
|||
#include "konq_run.h"
|
||||
#include "konq_events.h"
|
||||
#include "konq_viewmgr.h"
|
||||
#include "konq_tabs.h"
|
||||
#include "konq_browseriface.h"
|
||||
#include <kparts/statusbarextension.h>
|
||||
#include <kparts/browserextension.h>
|
||||
|
@ -467,13 +468,18 @@ void KonqView::slotEnableAction( const char * name, bool enabled )
|
|||
|
||||
void KonqView::slotMoveTopLevelWidget( int x, int y )
|
||||
{
|
||||
if ( m_pMainWindow->currentView()->frame()->parentContainer()->frameType() != "Tabs" )
|
||||
KonqFrameContainerBase* container = frame()->parentContainer();
|
||||
// If tabs are shown, only accept to move the whole window if there's only one tab.
|
||||
if ( container->frameType() != "Tabs" || static_cast<KonqFrameTabs*>(container)->count() == 1 )
|
||||
m_pMainWindow->move( x, y );
|
||||
}
|
||||
|
||||
void KonqView::slotResizeTopLevelWidget( int w, int h )
|
||||
{
|
||||
if ( m_pMainWindow->currentView()->frame()->parentContainer()->frameType() != "Tabs" )
|
||||
KonqFrameContainerBase* container = frame()->parentContainer();
|
||||
// If tabs are shown, only accept to resize the whole window if there's only one tab.
|
||||
// ### Maybe we could store the size requested by each tab and resize the window to the biggest one.
|
||||
if ( container->frameType() != "Tabs" || static_cast<KonqFrameTabs*>(container)->count() == 1 )
|
||||
m_pMainWindow->resize( w, h );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue