sigh, then you can't shrink manually past size request
Change-Id: Ia919f65f93a3dad0af06a2fa4f7b42b5f9ae2052
This commit is contained in:
parent
3bf5bc2e19
commit
e71ef59f2b
@ -272,9 +272,6 @@ class GtkSalFrame : public SalFrame
|
||||
static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer );
|
||||
void askForXEmbedFocus( sal_Int32 nTimecode );
|
||||
void grabKeyboard(bool bGrab);
|
||||
void resizeWindow( long nWidth, long nHeight );
|
||||
//call gtk_window_resize
|
||||
void window_resize(long nWidth, long nHeight);
|
||||
#endif
|
||||
static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
|
||||
static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer );
|
||||
@ -324,9 +321,12 @@ class GtkSalFrame : public SalFrame
|
||||
return bool(m_nStyle & nMask);
|
||||
}
|
||||
|
||||
//call gtk_window_resize
|
||||
void window_resize(long nWidth, long nHeight);
|
||||
//call gtk_widget_set_size_request
|
||||
void widget_set_size_request(long nWidth, long nHeight);
|
||||
|
||||
void resizeWindow( long nWidth, long nHeight );
|
||||
void moveWindow( long nX, long nY );
|
||||
|
||||
Size calcDefaultSize();
|
||||
|
@ -1162,6 +1162,10 @@ void SystemWindow::DoInitialLayout()
|
||||
setOptimalLayoutSize();
|
||||
mbIsCalculatingInitialLayoutSize = false;
|
||||
}
|
||||
else if (IsDialog() && !(GetStyle() & WB_SIZEABLE))
|
||||
{
|
||||
SetMinOutputSizePixel(GetSizePixel());
|
||||
}
|
||||
}
|
||||
|
||||
void SystemWindow::doDeferredInit(WinBits /*nBits*/)
|
||||
|
@ -893,10 +893,25 @@ void GtkSalFrame::moveWindow( long nX, long nY )
|
||||
}
|
||||
|
||||
void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight)
|
||||
{
|
||||
gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
|
||||
}
|
||||
|
||||
void GtkSalFrame::window_resize(long nWidth, long nHeight)
|
||||
{
|
||||
m_nWidthRequest = nWidth;
|
||||
m_nHeightRequest = nHeight;
|
||||
gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
|
||||
gtk_window_resize(GTK_WINDOW(m_pWindow), nWidth, nHeight);
|
||||
}
|
||||
|
||||
void GtkSalFrame::resizeWindow( long nWidth, long nHeight )
|
||||
{
|
||||
if( isChild( false ) )
|
||||
{
|
||||
widget_set_size_request(nWidth, nHeight);
|
||||
}
|
||||
else if( ! isChild( true, false ) )
|
||||
window_resize(nWidth, nHeight);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1588,8 +1603,10 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
|
||||
{
|
||||
m_bDefaultSize = false;
|
||||
|
||||
if (!(m_nState & GDK_WINDOW_STATE_MAXIMIZED))
|
||||
if( isChild( false ) )
|
||||
widget_set_size_request(nWidth, nHeight);
|
||||
else if( ! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) )
|
||||
window_resize(nWidth, nHeight);
|
||||
|
||||
setMinMaxSize();
|
||||
}
|
||||
@ -1667,7 +1684,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
|
||||
(pState->mnState & WindowStateState::Maximized) &&
|
||||
(pState->mnMask & nMaxGeometryMask) == nMaxGeometryMask )
|
||||
{
|
||||
widget_set_size_request( pState->mnWidth, pState->mnHeight );
|
||||
resizeWindow( pState->mnWidth, pState->mnHeight );
|
||||
moveWindow( pState->mnX, pState->mnY );
|
||||
m_bDefaultPos = m_bDefaultSize = false;
|
||||
|
||||
@ -1877,7 +1894,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle *
|
||||
// temporarily re-sizeable
|
||||
if( !(m_nStyle & SalFrameStyleFlags::SIZEABLE) )
|
||||
gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE );
|
||||
widget_set_size_request(nWidth, nHeight);
|
||||
window_resize(nWidth, nHeight);
|
||||
}
|
||||
|
||||
gtk_window_move(GTK_WINDOW(m_pWindow), nX, nY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user