forked from qt-creator/qt-creator
Fix white text in tool tips and dock widget decorations
This was a regression in the custom styling. We no longer set the panel property on the mainwindow but rely on qobject_cast to style custom mainwindows. Reviewed-by: thorbjorn
This commit is contained in:
@@ -55,7 +55,6 @@ FancyMainWindowPrivate::FancyMainWindowPrivate() :
|
|||||||
FancyMainWindow::FancyMainWindow(QWidget *parent) :
|
FancyMainWindow::FancyMainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent), d(new FancyMainWindowPrivate)
|
QMainWindow(parent), d(new FancyMainWindowPrivate)
|
||||||
{
|
{
|
||||||
setProperty("panelwidget", true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FancyMainWindow::~FancyMainWindow()
|
FancyMainWindow::~FancyMainWindow()
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/stylehelper.h>
|
#include <utils/stylehelper.h>
|
||||||
|
|
||||||
|
#include <utils/fancymainwindow.h>
|
||||||
|
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtGui/QComboBox>
|
#include <QtGui/QComboBox>
|
||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
@@ -85,6 +87,9 @@ bool panelWidget(const QWidget *widget)
|
|||||||
if (qobject_cast<const QDialog *>(widget->window()))
|
if (qobject_cast<const QDialog *>(widget->window()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (qobject_cast<const Utils::FancyMainWindow *>(widget))
|
||||||
|
return true;
|
||||||
|
|
||||||
const QWidget *p = widget;
|
const QWidget *p = widget;
|
||||||
while (p) {
|
while (p) {
|
||||||
if (qobject_cast<const QToolBar *>(p) ||
|
if (qobject_cast<const QToolBar *>(p) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user