|
3 | 3 | // #include "../FifoBuffer.h" |
4 | 4 | #include "../FifoBuffer2.h" |
5 | 5 | #include "../LookAndFeel.h" |
| 6 | +#include "../QtParentedWindow.h" |
6 | 7 | #include "SettingsComponent.h" |
7 | 8 |
|
8 | 9 | #include <juce_audio_utils/juce_audio_utils.h> |
@@ -109,23 +110,22 @@ class DeviceIoApp final : public AudioAppComponent |
109 | 110 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DeviceIoApp) |
110 | 111 | }; |
111 | 112 |
|
112 | | -class AudioAppMainWindow final : public DocumentWindow |
| 113 | +class AudioAppMainWindow final : public atk::QtParentedDocumentWindow |
113 | 114 | { |
114 | 115 | public: |
115 | 116 | AudioAppMainWindow(DeviceIoApp& demo) |
116 | | - : DocumentWindow( |
117 | | - "Audio Device Settings", |
118 | | - Colours::lightgrey, |
119 | | - DocumentWindow::minimiseButton | DocumentWindow::closeButton, |
120 | | - false |
| 117 | + : atk::QtParentedDocumentWindow( |
| 118 | + "DeviceIo Audio Settings", |
| 119 | + juce::LookAndFeel::getDefaultLookAndFeel().findColour(juce::ResizableWindow::backgroundColourId), |
| 120 | + DocumentWindow::allButtons |
121 | 121 | ) |
122 | 122 | , audioApp(demo) |
123 | 123 | { |
124 | | - setUsingNativeTitleBar(true); |
125 | | - setContentOwned(&audioApp, false); // Don't take ownership - Impl owns it |
| 124 | + setTitleBarButtonsRequired(DocumentWindow::closeButton, false); |
| 125 | + setContentOwned(&demo, false); // Don't take ownership - Impl owns it |
126 | 126 | setResizable(true, false); |
127 | 127 |
|
128 | | - // Don't add to desktop yet - AudioModule will handle this on first setVisible(true) |
| 128 | + centreWithSize(demo.getWidth(), demo.getHeight()); |
129 | 129 | } |
130 | 130 |
|
131 | 131 | ~AudioAppMainWindow() override |
|
0 commit comments