Commit 2c788336 authored by Susurrus's avatar Susurrus

Merge pull request #778 from Susurrus/master

Fix remaining Windows issues on Qt5
parents 61ad6017 07a50dbb
...@@ -334,6 +334,14 @@ QMenu::separator { ...@@ -334,6 +334,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px; margin: 8px 5px 4px 5px;
} }
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #222;
}
QMenuBar::item:selected { QMenuBar::item:selected {
background-color: #CCC; background-color: #CCC;
color: #000; color: #000;
......
...@@ -278,6 +278,14 @@ QMenu::separator { ...@@ -278,6 +278,14 @@ QMenu::separator {
margin: 8px 5px 4px 5px; margin: 8px 5px 4px 5px;
} }
/*
* Fix for bug in Qt5 where QMenuBar items are styled natively on Windows, ignoring inherited settings.
* so we explicitly set their background color here (should match catch-all style background color).
*/
QMenuBar::item {
background-color: #F6F6F6;
}
QMenuBar::item:selected { QMenuBar::item:selected {
background-color: #555; background-color: #555;
color: #FFF; color: #FFF;
......
...@@ -55,7 +55,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -55,7 +55,7 @@ This file is part of the QGROUNDCONTROL project
void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) void msgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{ {
const char symbols[] = { 'I', 'E', '!', 'X' }; const char symbols[] = { 'I', 'E', '!', 'X' };
QString output = QString("[%1] in %2:%3 - \"%2\"").arg(symbols[type]).arg(context.file).arg(context.line).arg(msg); QString output = QString("[%1] at %2:%3 - \"%4\"").arg(symbols[type]).arg(context.file).arg(context.line).arg(msg);
std::cerr << output.toStdString() << std::endl; std::cerr << output.toStdString() << std::endl;
if( type == QtFatalMsg ) abort(); if( type == QtFatalMsg ) abort();
} }
......
...@@ -191,13 +191,11 @@ void MainWindow::init() ...@@ -191,13 +191,11 @@ void MainWindow::init()
menuActionHelper->setMenu(ui.menuTools); menuActionHelper->setMenu(ui.menuTools);
// Qt 4 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar. // Qt 4 on Ubuntu does place the native menubar correctly so on Linux we revert back to in-window menu bar.
// TODO: Check that this is still necessary on Qt5 on Ubuntu
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
menuBar()->setNativeMenuBar(false); menuBar()->setNativeMenuBar(false);
#endif #endif
// We only need this menu if we have more than one system
// ui.menuConnected_Systems->setEnabled(false);
// Set dock options // Set dock options
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks); setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment