summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--knotes/knote.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/knotes/knote.cpp b/knotes/knote.cpp
index 4b0a9172c..72a751526 100644
--- a/knotes/knote.cpp
+++ b/knotes/knote.cpp
@@ -437,10 +437,7 @@ void KNote::saveData(bool update)
void KNote::saveConfig() const
{
m_config->setWidth( width() );
- if ( m_tool )
- m_config->setHeight( height() - (m_tool->isHidden() ? 0 : m_tool->height()) );
- else
- m_config->setHeight( 0 );
+ m_config->setHeight( height() );
m_config->setPosition( pos() );
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 )
{
m_tool->show();
- setGeometry( x(), y(), width(), height() + m_tool->height() );
+ updateLayout(); // to update the editor height
}
m_editor->cornerWidget()->show();
}
@@ -1059,7 +1056,6 @@ void KNote::updateFocus()
if ( m_tool && !m_tool->isHidden() )
{
m_tool->hide();
- setGeometry( x(), y(), width(), height() - m_tool->height() );
updateLayout(); // to update the minimum height
}
m_editor->cornerWidget()->hide();
@@ -1075,7 +1071,6 @@ void KNote::updateFocus()
if ( m_tool && !m_tool->isHidden() )
{
m_tool->hide();
- setGeometry( x(), y(), width(), height() - m_tool->height() );
updateLayout(); // to update the minimum height
}
@@ -1214,7 +1209,7 @@ void KNote::updateLayout()
if( m_tool ) {
m_tool->setGeometry(
contentsRect().x(),
- contentsRect().bottom() - (m_tool->isHidden() ? 0 : m_tool->height()) + 1,
+ contentsRect().bottom() - m_tool->height() + 1,
contentsRect().width(),
m_tool->height()
);
@@ -1225,7 +1220,7 @@ void KNote::updateLayout()
setMinimumSize(
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
);