set Qt::ToolTip-window-flag in order to display correctly - some other positioning code still needs to be fixed
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@743 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2008-02-29 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/widgets/text_float.cpp:
|
||||
set Qt::ToolTip-window-flag in order to display correctly - some other
|
||||
positioning code still needs to be fixed
|
||||
|
||||
* include/import_filter.h:
|
||||
fixed importFilter::readByte() to return proper integer instead of
|
||||
signed char - makes import-filters finally work
|
||||
|
||||
@@ -91,7 +91,8 @@ void textFloat::reparent( QWidget * _new_parent )
|
||||
|
||||
// Get position and reparent to either top level or dialog
|
||||
//
|
||||
while( _new_parent->parentWidget() && !_new_parent->inherits("QMdiSubWindow"))
|
||||
while( _new_parent->parentWidget() &&
|
||||
!_new_parent->inherits( "QMdiSubWindow" ) )
|
||||
{
|
||||
_new_parent = _new_parent->parentWidget();
|
||||
position += _new_parent->pos();
|
||||
@@ -99,10 +100,10 @@ void textFloat::reparent( QWidget * _new_parent )
|
||||
|
||||
// Position this widget to the right of the parent
|
||||
//
|
||||
//move(pos + QPoint(parent->width() + 5, 5));
|
||||
move( position + QPoint(_ new_parent->width() + 5, 5 ) );
|
||||
|
||||
QWidget::setParent( _new_parent, Qt::FramelessWindowHint |
|
||||
Qt::WindowStaysOnTopHint );
|
||||
Qt::WindowStaysOnTopHint | Qt::ToolTip );
|
||||
}
|
||||
|
||||
|
||||
@@ -217,11 +218,11 @@ void textFloat::mousePressEvent( QMouseEvent * )
|
||||
|
||||
void textFloat::updateSize( void )
|
||||
{
|
||||
QFontMetrics metrics( font() );
|
||||
QFontMetrics metrics( pointSize<8>( font() ) );
|
||||
QRect textBound = metrics.boundingRect( m_text );
|
||||
if( m_title != "" )
|
||||
{
|
||||
QFont f = font();
|
||||
QFont f = pointSize<8>( font() );
|
||||
f.setBold( TRUE );
|
||||
int title_w = QFontMetrics( f ).boundingRect( m_title ).width();
|
||||
if( title_w > textBound.width() )
|
||||
|
||||
Reference in New Issue
Block a user