-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature/detach-window] Transfer size restrictions to embedded widget from SubWindow #7596
base: feature/detach-window
Are you sure you want to change the base?
Changes from all commits
22f477d
465b1e6
954c5e9
cb88b85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -202,13 +202,10 @@ MicrotunerConfig::MicrotunerConfig() : | |||||
this->setLayout(microtunerLayout); | ||||||
|
||||||
// Add to the main window and setup fixed size etc. | ||||||
QMdiSubWindow *subWin = getGUI()->mainWindow()->addWindowedWidget(this); | ||||||
|
||||||
SubWindow *subWin = getGUI()->mainWindow()->addWindowedWidget(this); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
subWin->setAttribute(Qt::WA_DeleteOnClose, false); | ||||||
subWin->setMinimumWidth(300); | ||||||
subWin->setMinimumHeight(300); | ||||||
subWin->setMaximumWidth(500); | ||||||
subWin->setMaximumHeight(700); | ||||||
setMinimumSize(300, 300); | ||||||
setMaximumSize(500, 700); | ||||||
subWin->hide(); | ||||||
|
||||||
// No maximize button | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -49,7 +49,7 @@ MidiCCRackView::MidiCCRackView(InstrumentTrack * track) : | |||||
setWindowIcon(embed::getIconPixmap("midi_cc_rack")); | ||||||
setWindowTitle(tr("MIDI CC Rack - %1").arg(m_track->name())); | ||||||
|
||||||
QMdiSubWindow * subWin = getGUI()->mainWindow()->addWindowedWidget(this); | ||||||
SubWindow * subWin = getGUI()->mainWindow()->addWindowedWidget(this); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The asterisk should go on the left for new code |
||||||
|
||||||
// Remove maximize button | ||||||
Qt::WindowFlags flags = subWin->windowFlags(); | ||||||
|
@@ -58,9 +58,8 @@ MidiCCRackView::MidiCCRackView(InstrumentTrack * track) : | |||||
|
||||||
// Adjust window attributes, sizing and position | ||||||
subWin->setAttribute(Qt::WA_DeleteOnClose, false); | ||||||
subWin->resize(350, 300); | ||||||
subWin->setFixedWidth(350); | ||||||
subWin->setMinimumHeight(300); | ||||||
setFixedWidth(350); | ||||||
setMinimumHeight(300); | ||||||
subWin->hide(); | ||||||
|
||||||
// Main window layout | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,17 +169,11 @@ MixerView::MixerView(Mixer* mixer) : | |
// adjust window size | ||
layout()->invalidate(); | ||
resize(sizeHint()); | ||
if (parentWidget()) | ||
{ | ||
parentWidget()->resize(parentWidget()->sizeHint()); | ||
} | ||
setFixedHeight(height()); | ||
layout()->setSizeConstraint(QLayout::SetMinimumSize); | ||
|
||
// add ourself to workspace | ||
QMdiSubWindow* subWin = mainWindow->addWindowedWidget(this); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is causing a build failure on Linux and MinGW because |
||
layout()->setSizeConstraint(QLayout::SetMinimumSize); | ||
subWin->layout()->setSizeConstraint(QLayout::SetMinAndMaxSize); | ||
subWin->setFixedHeight(subWin->height()); | ||
|
||
parentWidget()->setAttribute(Qt::WA_DeleteOnClose, false); | ||
parentWidget()->move(5, 310); | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -202,11 +202,11 @@ void TempoSyncBarModelEditor::showCustom() | |||||
if(m_custom == nullptr) | ||||||
{ | ||||||
m_custom = new MeterDialog(getGUI()->mainWindow()->workspace()); | ||||||
QMdiSubWindow * subWindow = getGUI()->mainWindow()->addWindowedWidget(m_custom); | ||||||
SubWindow * subWindow = getGUI()->mainWindow()->addWindowedWidget(m_custom); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Qt::WindowFlags flags = subWindow->windowFlags(); | ||||||
flags &= ~Qt::WindowMaximizeButtonHint; | ||||||
subWindow->setWindowFlags(flags); | ||||||
subWindow->setFixedSize(subWindow->size()); | ||||||
setFixedSize(size()); | ||||||
m_custom->setWindowTitle("Meter"); | ||||||
m_custom->setModel(&model()->getCustomMeterModel()); | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -295,11 +295,11 @@ void TempoSyncKnob::showCustom() | |||||
if( m_custom == nullptr ) | ||||||
{ | ||||||
m_custom = new MeterDialog( getGUI()->mainWindow()->workspace() ); | ||||||
QMdiSubWindow * subWindow = getGUI()->mainWindow()->addWindowedWidget( m_custom ); | ||||||
SubWindow * subWindow = getGUI()->mainWindow()->addWindowedWidget(m_custom); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Qt::WindowFlags flags = subWindow->windowFlags(); | ||||||
flags &= ~Qt::WindowMaximizeButtonHint; | ||||||
subWindow->setWindowFlags( flags ); | ||||||
subWindow->setFixedSize( subWindow->size() ); | ||||||
setFixedSize(size()); | ||||||
m_custom->setWindowTitle( "Meter" ); | ||||||
m_custom->setModel( &model()->m_custom ); | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.