comparison main/MainWindow.cpp @ 1461:0a145f215a45 3.0-integration

Fix to removal of icons from menus on the Mac
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 03 Jan 2017 14:32:53 +0000
parents 96057b1185cb
children f5180edc5dda
comparison
equal deleted inserted replaced
1459:9a3684f1393b 1461:0a145f215a45
277 connect(m_paneStack, SIGNAL(propertyStacksResized(int)), 277 connect(m_paneStack, SIGNAL(propertyStacksResized(int)),
278 this, SLOT(propertyStacksResized(int))); 278 this, SLOT(propertyStacksResized(int)));
279 279
280 frame->setLayout(layout); 280 frame->setLayout(layout);
281 281
282 #ifdef Q_OS_MAC
283 // Mac doesn't align menu labels when icons are shown: result is messy
284 QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
285 setIconsVisibleInMenus(false);
286 #endif
287
282 setupMenus(); 288 setupMenus();
283 setupToolbars(); 289 setupToolbars();
284 setupHelpMenu(); 290 setupHelpMenu();
285 291
286 statusBar(); 292 statusBar();
350 356
351 void 357 void
352 MainWindow::setupMenus() 358 MainWindow::setupMenus()
353 { 359 {
354 if (!m_mainMenusCreated) { 360 if (!m_mainMenusCreated) {
355
356 #ifdef Q_OS_MAC
357 // Mac doesn't align menu labels when icons are shown: result is messy
358 QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
359 #endif
360 361
361 #ifdef Q_OS_LINUX 362 #ifdef Q_OS_LINUX
362 // In Ubuntu 14.04 the window's menu bar goes missing entirely 363 // In Ubuntu 14.04 the window's menu bar goes missing entirely
363 // if the user is running any desktop environment other than Unity 364 // if the user is running any desktop environment other than Unity
364 // (in which the faux single-menubar appears). The user has a 365 // (in which the faux single-menubar appears). The user has a