"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gui/SubWindow.cpp" between
lmms-1.2.0-rc7.tar.gz and lmms-1.2.0-rc8.tar.gz

About: LMMS (Linux MultiMedia Studio) is a sound generation system (creation of melodies and beats, synthesis and mixing of sounds, arranging of samples; full MIDI support). Release candidate.

SubWindow.cpp  (lmms-1.2.0-rc7):SubWindow.cpp  (lmms-1.2.0-rc8)
skipping to change at line 137 skipping to change at line 137
} }
void SubWindow::elideText( QLabel *label, QString text ) void SubWindow::elideText( QLabel *label, QString text )
{ {
QFontMetrics metrix( label->font() ); QFontMetrics metrix( label->font() );
int width = label->width() - 2; int width = label->width() - 2;
QString clippedText = metrix.elidedText( text, Qt::ElideRight, width ); QString clippedText = metrix.elidedText( text, Qt::ElideRight, width );
label->setText( clippedText ); label->setText( clippedText );
} }
bool SubWindow::isMaximized()
{
#ifdef LMMS_BUILD_APPLE
// check if subwindow size is identical to the MdiArea size, accounting f
or scrollbars
int hScrollBarHeight = mdiArea()->horizontalScrollBar()->isVisible() ? md
iArea()->horizontalScrollBar()->size().height() : 0;
int vScrollBarWidth = mdiArea()->verticalScrollBar()->isVisible() ? mdiAr
ea()->verticalScrollBar()->size().width() : 0;
QSize areaSize( this->mdiArea()->size().width() - vScrollBarWidth, this->
mdiArea()->size().height() - hScrollBarHeight );
return areaSize == this->size();
#else
return QMdiSubWindow::isMaximized();
#endif
}
QRect SubWindow::getTrueNormalGeometry() const QRect SubWindow::getTrueNormalGeometry() const
{ {
return m_trackedNormalGeom; return m_trackedNormalGeom;
} }
QBrush SubWindow::activeColor() const QBrush SubWindow::activeColor() const
{ {
return m_activeColor; return m_activeColor;
} }
skipping to change at line 261 skipping to change at line 247
// truncate the label string if the window is to small. Adds "... " // truncate the label string if the window is to small. Adds "... "
elideText( m_windowTitle, widget()->windowTitle() ); elideText( m_windowTitle, widget()->windowTitle() );
m_windowTitle->setTextInteractionFlags( Qt::NoTextInteraction ); m_windowTitle->setTextInteractionFlags( Qt::NoTextInteraction );
m_windowTitle->adjustSize(); m_windowTitle->adjustSize();
} }
} }
void SubWindow::resizeEvent( QResizeEvent * event ) void SubWindow::resizeEvent( QResizeEvent * event )
{ {
adjustTitleBar(); // When the parent QMdiArea gets resized, maximized subwindows also gets
resized, if any.
// In that case, we should call QMdiSubWindow::resizeEvent first
// to ensure we get the correct window state.
QMdiSubWindow::resizeEvent( event ); QMdiSubWindow::resizeEvent( event );
adjustTitleBar();
// if the window was resized and ISN'T minimized/maximized/fullscreen, // if the window was resized and ISN'T minimized/maximized/fullscreen,
// then save the current size // then save the current size
if( !isMaximized() && !isMinimized() && !isFullScreen() ) if( !isMaximized() && !isMinimized() && !isFullScreen() )
{ {
m_trackedNormalGeom.setSize( event->size() ); m_trackedNormalGeom.setSize( event->size() );
} }
} }
 End of changes. 3 change blocks. 
19 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)