subWindow resizing, minimum, and intial sizes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1219 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
||||
2008-06-30 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* plugins/ladspa_browser/ladspa_browser.cpp:
|
||||
* include/automation_editor.h:
|
||||
* src/gui/piano_roll.cpp:
|
||||
* src/gui/fx_mixer_view.cpp:
|
||||
* src/gui/widgets/controller_rack_view.cpp:
|
||||
* src/gui/widgets/controller_view.cpp:
|
||||
* src/gui/automation_editor.cpp:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
Remove maximize and resize capability from many windows and set proper
|
||||
minimum and intial sizes
|
||||
|
||||
2008-06-29 Javier Serrano Polo <jasp00/at/terra/dot/es>
|
||||
|
||||
* data/locale/ca.ts:
|
||||
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
} ;
|
||||
|
||||
// some constants...
|
||||
static const int INITIAL_WIDTH = 640;
|
||||
static const int INITIAL_WIDTH = 740;
|
||||
static const int INITIAL_HEIGHT = 480;
|
||||
|
||||
static const int SCROLLBAR_SIZE = 16;
|
||||
|
||||
@@ -179,6 +179,11 @@ ladspaBrowserView::ladspaBrowserView( tool * _tool ) :
|
||||
parentWidget()->hide();
|
||||
parentWidget()->layout()->setSizeConstraint(
|
||||
QLayout::SetFixedSize );
|
||||
|
||||
Qt::WindowFlags flags = parentWidget()->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
parentWidget()->setWindowFlags( flags );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -354,6 +354,8 @@ automationEditor::automationEditor( void ) :
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 128 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
@@ -677,14 +679,12 @@ void automationEditor::drawLine( int _x0, float _y0, int _x1, float _y1 )
|
||||
while( i < deltax )
|
||||
{
|
||||
y = _y0 + ( ystep * yscale * i );
|
||||
m_pattern->removeValue( midiTime( x ) );
|
||||
m_pattern->putValue( midiTime( x ), y );
|
||||
|
||||
x += xstep;
|
||||
i += 1;
|
||||
m_pattern->removeValue( midiTime( x ) );
|
||||
m_pattern->putValue( midiTime( x ), y );
|
||||
}
|
||||
m_pattern->removeValue( midiTime( _x1 ) );
|
||||
m_pattern->putValue( midiTime( _x1 ), _y1 );
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <QtGui/QInputDialog>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QToolButton>
|
||||
@@ -45,8 +46,6 @@
|
||||
#include "tooltip.h"
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
|
||||
class fxLine : public QWidget
|
||||
{
|
||||
public:
|
||||
@@ -229,7 +228,14 @@ fxMixerView::fxMixerView() :
|
||||
|
||||
|
||||
// add ourself to workspace
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
parentWidget()->move( 10, 200 );
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ extern Keys whiteKeys[]; // defined in piano_widget.cpp
|
||||
|
||||
|
||||
// some constants...
|
||||
const int INITIAL_PIANOROLL_WIDTH = 640;
|
||||
const int INITIAL_PIANOROLL_WIDTH = 840;
|
||||
const int INITIAL_PIANOROLL_HEIGHT = 480;
|
||||
|
||||
const int SCROLLBAR_SIZE = 16;
|
||||
@@ -442,6 +442,8 @@ pianoRoll::pianoRoll( void ) :
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
setMinimumSize( tb_layout->minimumSize().width(), 160 );
|
||||
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
@@ -71,7 +72,15 @@ controllerRackView::controllerRackView( ) :
|
||||
|
||||
setModel( engine::getSong() );
|
||||
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
setWindowFlags( flags );
|
||||
subWin->layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,12 @@ controllerView::controllerView( controller * _model, QWidget * _parent ) :
|
||||
|
||||
m_subWindow = engine::getMainWindow()->workspace()->addSubWindow(
|
||||
m_controllerDlg );
|
||||
|
||||
Qt::WindowFlags flags = m_subWindow->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
m_subWindow->setWindowFlags( flags );
|
||||
m_subWindow->setFixedSize( m_subWindow->size() );
|
||||
|
||||
m_subWindow->setWindowIcon( m_controllerDlg->windowIcon() );
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QMdiSubWindow>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
|
||||
@@ -1204,7 +1205,14 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
QMdiSubWindow * subWin =
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
Qt::WindowFlags flags = subWin->windowFlags();
|
||||
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||
flags &= ~Qt::WindowMaximizeButtonHint;
|
||||
subWin->setWindowFlags( flags );
|
||||
subWin->setFixedSize( subWin->size() );
|
||||
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user