Support frameless taskbarless dialogs in wxQt
* Moved frameless hint to window, checking border * Removed duplicate code in wxFrame and asserts that were preventing AUI to work Thanks to @seandepagnier for the original patch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8c56462500
commit
5a6ec20ebc
@ -127,27 +127,11 @@ void wxFrame::SetWindowStyleFlag( long style )
|
||||
|
||||
Qt::WindowFlags qtFlags = GetHandle()->windowFlags();
|
||||
|
||||
wxCHECK_RET( !HasFlag( wxFRAME_FLOAT_ON_PARENT ) && !HasFlag( wxTINY_CAPTION ) ,
|
||||
"wxFRAME_FLOAT_ON_PARENT, wxTINY_CAPTION not supported. Use wxFRAME_TOOL_WINDOW instead." );
|
||||
wxCHECK_RET( !HasFlag( wxFRAME_TOOL_WINDOW ) || HasFlag( wxFRAME_NO_TASKBAR ) ,
|
||||
"wxFRAME_TOOL_WINDOW without wxFRAME_NO_TASKBAR not supported." );
|
||||
|
||||
if ( HasFlag( wxFRAME_TOOL_WINDOW ) )
|
||||
{
|
||||
qtFlags &= ~Qt::WindowType_Mask;
|
||||
qtFlags |= Qt::Tool;
|
||||
}
|
||||
else if ( HasFlag( wxFRAME_NO_TASKBAR ) )
|
||||
{
|
||||
qtFlags &= ~Qt::WindowType_Mask;
|
||||
qtFlags |= Qt::Dialog;
|
||||
}
|
||||
|
||||
if ( ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) )
|
||||
!= qtFlags.testFlag( Qt::FramelessWindowHint ) )
|
||||
{
|
||||
qtFlags ^= Qt::FramelessWindowHint;
|
||||
}
|
||||
|
||||
GetHandle()->setWindowFlags( qtFlags );
|
||||
}
|
||||
|
@ -719,6 +719,26 @@ void wxWindowQt::SetWindowStyleFlag( long style )
|
||||
// qtFrame->setFrameStyle( QFrame::StyledPanel );
|
||||
// qtFrame->setFrameShadow( QFrame::Plain );
|
||||
// }
|
||||
|
||||
Qt::WindowFlags qtFlags = GetHandle()->windowFlags();
|
||||
|
||||
if ( HasFlag( wxFRAME_NO_TASKBAR ) )
|
||||
{
|
||||
// qtFlags &= ~Qt::WindowType_Mask;
|
||||
if ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) ) {
|
||||
qtFlags = Qt::ToolTip | Qt::FramelessWindowHint;
|
||||
}
|
||||
else
|
||||
qtFlags |= Qt::Dialog;
|
||||
}
|
||||
else
|
||||
if ( ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) )
|
||||
!= qtFlags.testFlag( Qt::FramelessWindowHint ) )
|
||||
{
|
||||
qtFlags ^= Qt::FramelessWindowHint;
|
||||
}
|
||||
|
||||
GetHandle()->setWindowFlags( qtFlags );
|
||||
}
|
||||
|
||||
void wxWindowQt::SetExtraStyle( long exStyle )
|
||||
|
Loading…
Reference in New Issue
Block a user