|
|
@ -437,10 +437,7 @@ void KNote::saveData(bool update)
|
|
|
|
void KNote::saveConfig() const
|
|
|
|
void KNote::saveConfig() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_config->setWidth( width() );
|
|
|
|
m_config->setWidth( width() );
|
|
|
|
if ( m_tool )
|
|
|
|
m_config->setHeight( height() );
|
|
|
|
m_config->setHeight( height() - (m_tool->isHidden() ? 0 : m_tool->height()) );
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
m_config->setHeight( 0 );
|
|
|
|
|
|
|
|
m_config->setPosition( pos() );
|
|
|
|
m_config->setPosition( pos() );
|
|
|
|
|
|
|
|
|
|
|
|
NETWinInfo wm_client( tqt_xdisplay(), winId(), tqt_xrootwin(), NET::WMDesktop );
|
|
|
|
NETWinInfo wm_client( tqt_xdisplay(), winId(), tqt_xrootwin(), NET::WMDesktop );
|
|
|
@ -1050,7 +1047,7 @@ void KNote::updateFocus()
|
|
|
|
if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == TQTextEdit::RichText )
|
|
|
|
if ( m_tool && m_tool->isHidden() && m_editor->textFormat() == TQTextEdit::RichText )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_tool->show();
|
|
|
|
m_tool->show();
|
|
|
|
setGeometry( x(), y(), width(), height() + m_tool->height() );
|
|
|
|
updateLayout(); // to update the editor height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_editor->cornerWidget()->show();
|
|
|
|
m_editor->cornerWidget()->show();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1059,7 +1056,6 @@ void KNote::updateFocus()
|
|
|
|
if ( m_tool && !m_tool->isHidden() )
|
|
|
|
if ( m_tool && !m_tool->isHidden() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_tool->hide();
|
|
|
|
m_tool->hide();
|
|
|
|
setGeometry( x(), y(), width(), height() - m_tool->height() );
|
|
|
|
|
|
|
|
updateLayout(); // to update the minimum height
|
|
|
|
updateLayout(); // to update the minimum height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_editor->cornerWidget()->hide();
|
|
|
|
m_editor->cornerWidget()->hide();
|
|
|
@ -1075,7 +1071,6 @@ void KNote::updateFocus()
|
|
|
|
if ( m_tool && !m_tool->isHidden() )
|
|
|
|
if ( m_tool && !m_tool->isHidden() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_tool->hide();
|
|
|
|
m_tool->hide();
|
|
|
|
setGeometry( x(), y(), width(), height() - m_tool->height() );
|
|
|
|
|
|
|
|
updateLayout(); // to update the minimum height
|
|
|
|
updateLayout(); // to update the minimum height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1214,7 +1209,7 @@ void KNote::updateLayout()
|
|
|
|
if( m_tool ) {
|
|
|
|
if( m_tool ) {
|
|
|
|
m_tool->setGeometry(
|
|
|
|
m_tool->setGeometry(
|
|
|
|
contentsRect().x(),
|
|
|
|
contentsRect().x(),
|
|
|
|
contentsRect().bottom() - (m_tool->isHidden() ? 0 : m_tool->height()) + 1,
|
|
|
|
contentsRect().bottom() - m_tool->height() + 1,
|
|
|
|
contentsRect().width(),
|
|
|
|
contentsRect().width(),
|
|
|
|
m_tool->height()
|
|
|
|
m_tool->height()
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -1225,7 +1220,7 @@ void KNote::updateLayout()
|
|
|
|
|
|
|
|
|
|
|
|
setMinimumSize(
|
|
|
|
setMinimumSize(
|
|
|
|
m_editor->cornerWidget()->width() + margin*2,
|
|
|
|
m_editor->cornerWidget()->width() + margin*2,
|
|
|
|
headerHeight + s_ppOffset + ( m_tool ? (m_tool->isHidden() ? 0 : m_tool->height() ) : 0 ) +
|
|
|
|
headerHeight + s_ppOffset + ( m_tool ? m_tool->height() : 0 ) +
|
|
|
|
m_editor->cornerWidget()->height() + margin*2
|
|
|
|
m_editor->cornerWidget()->height() + margin*2
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|