comparison main/MainWindow.cpp @ 1383:bf4f7a12fee0 more-hidpi

Scale the sizes of a few more UI elements
author Chris Cannam
date Mon, 05 Dec 2016 12:04:23 +0000
parents 3ef81d81b767
children 05d35ce6ea72
comparison
equal deleted inserted replaced
1382:a1e0ddadbf22 1383:bf4f7a12fee0
208 208
209 m_mainScroll->setWidget(m_paneStack); 209 m_mainScroll->setWidget(m_paneStack);
210 210
211 m_overview = new Overview(frame); 211 m_overview = new Overview(frame);
212 m_overview->setViewManager(m_viewManager); 212 m_overview->setViewManager(m_viewManager);
213 m_overview->setFixedHeight(40); 213 m_overview->setFixedHeight(m_viewManager->scalePixelSize(40));
214 #ifndef _WIN32 214 #ifndef _WIN32
215 // For some reason, the contents of the overview never appear if we 215 // For some reason, the contents of the overview never appear if we
216 // make this setting on Windows. I have no inclination at the moment 216 // make this setting on Windows. I have no inclination at the moment
217 // to track down the reason why. 217 // to track down the reason why.
218 m_overview->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); 218 m_overview->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
239 239
240 m_playSpeed = new AudioDial(frame); 240 m_playSpeed = new AudioDial(frame);
241 m_playSpeed->setMinimum(0); 241 m_playSpeed->setMinimum(0);
242 m_playSpeed->setMaximum(120); 242 m_playSpeed->setMaximum(120);
243 m_playSpeed->setValue(60); 243 m_playSpeed->setValue(60);
244 m_playSpeed->setFixedWidth(32); 244 m_playSpeed->setFixedWidth(m_viewManager->scalePixelSize(32));
245 m_playSpeed->setFixedHeight(32); 245 m_playSpeed->setFixedHeight(m_viewManager->scalePixelSize(32));
246 m_playSpeed->setNotchesVisible(true); 246 m_playSpeed->setNotchesVisible(true);
247 m_playSpeed->setPageStep(10); 247 m_playSpeed->setPageStep(10);
248 m_playSpeed->setObjectName(tr("Playback Speed")); 248 m_playSpeed->setObjectName(tr("Playback Speed"));
249 m_playSpeed->setRangeMapper(new PlaySpeedRangeMapper); 249 m_playSpeed->setRangeMapper(new PlaySpeedRangeMapper);
250 m_playSpeed->setDefaultValue(60); 250 m_playSpeed->setDefaultValue(60);
256 256
257 IconLoader il; 257 IconLoader il;
258 258
259 m_playControlsSpacer = new QFrame; 259 m_playControlsSpacer = new QFrame;
260 260
261 layout->setSpacing(4); 261 layout->setSpacing(m_viewManager->scalePixelSize(4));
262 layout->addWidget(m_mainScroll, 0, 0, 1, 5); 262 layout->addWidget(m_mainScroll, 0, 0, 1, 4);
263 layout->addWidget(m_overview, 1, 1); 263 layout->addWidget(m_overview, 1, 0);
264 layout->addWidget(m_playControlsSpacer, 1, 2); 264 layout->addWidget(m_playControlsSpacer, 1, 1);
265 layout->addWidget(m_playSpeed, 1, 3); 265 layout->addWidget(m_playSpeed, 1, 2);
266 layout->addWidget(m_fader, 1, 4); 266 layout->addWidget(m_fader, 1, 3);
267 267
268 m_playControlsWidth = 268 m_playControlsWidth =
269 m_fader->width() + m_playSpeed->width() + layout->spacing() * 2; 269 m_fader->width() + m_playSpeed->width() + layout->spacing() * 2;
270
271 layout->setColumnMinimumWidth(0, 14);
272 layout->setColumnStretch(0, 0);
273 270
274 m_paneStack->setPropertyStackMinWidth(m_playControlsWidth 271 m_paneStack->setPropertyStackMinWidth(m_playControlsWidth
275 + 2 + layout->spacing()); 272 + 2 + layout->spacing());
276 m_playControlsSpacer->setFixedSize(QSize(2, 2)); 273 m_playControlsSpacer->setFixedSize(QSize(2, 2));
277 274
278 layout->setColumnStretch(1, 10); 275 layout->setColumnStretch(0, 10);
279 276
280 connect(m_paneStack, SIGNAL(propertyStacksResized(int)), 277 connect(m_paneStack, SIGNAL(propertyStacksResized(int)),
281 this, SLOT(propertyStacksResized(int))); 278 this, SLOT(propertyStacksResized(int)));
282 279
283 frame->setLayout(layout); 280 frame->setLayout(layout);