[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kontact/plugins/knotes
From: Michael Brade <brade () kde ! org>
Date: 2004-08-27 13:22:15
Message-ID: 20040827132215.79B711D1C () office ! kde ! org
[Download RAW message or body]
CVS commit by brade:
- uninitialized variables suck, too.
- fixed the fixed width of the tooltips that leaves too much whitespace in
many cases; however, the loop sucks as well, for it's slow and does not
take into account words that are long and not breakable--they're cut.
Hmm. What's the conclusion I should draw from the last commit logs..? :}
M +7 -2 knotetip.cpp 1.4
--- kdepim/kontact/plugins/knotes/knotetip.cpp #1.3:1.4
@@ -44,4 +44,5 @@ KNoteTip::KNoteTip( KIconView *parent )
: QFrame( 0, 0, WX11BypassWM | // this will make Seli happy >:-P
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop ),
+ m_filter( false ),
m_view( parent ),
m_noteIVI( 0 ),
@@ -58,5 +59,4 @@ KNoteTip::KNoteTip( KIconView *parent )
setMargin( 1 );
setFrameStyle( QFrame::Plain | QFrame::Box );
- resize( 350, height() );
hide();
}
@@ -91,6 +91,11 @@ void KNoteTip::setNote( KNotesIconViewIt
m_preview->sync();
+ int w = 400;
+ int h = m_preview->heightForWidth( w );
+ while ( w > 60 && h == m_preview->heightForWidth( w - 20 ) )
+ w -= 20;
+
QRect desk = KGlobalSettings::desktopGeometry( m_noteIVI->rect().center() );
- resize( width(), QMIN( m_preview->contentsHeight(), desk.height()/2 - 20 ) );
+ resize( w, QMIN(h, desk.height()/2 - 20) );
hide();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic