diff --git a/src/kernel/qstyle.h b/src/kernel/qstyle.h index 111a987..f068462 100644 --- a/src/kernel/qstyle.h +++ b/src/kernel/qstyle.h @@ -202,6 +202,7 @@ class QStyleControlElementGenericWidgetData { QPixmap icon; QPalette palette; QFont font; + QColor paletteBgColor; }; class QStyleControlElementTabBarData { @@ -276,6 +277,9 @@ class Q_EXPORT QStyleControlElementData { QRect sliderRect; QPainter* activePainter; QStyleControlElementToolBarWidgetData toolBarData; + Q_UINT32 comboBoxListBoxFlags; + QColor paletteBgColor; + Q_UINT32 parentWidgetFlags; public: QStyleControlElementData(); @@ -1050,6 +1054,12 @@ public: // int - width of menu check column SH_MenuIndicatorColumnWidth, + // bool - whether or not the lower two button drawing areas should be combined into one + SH_ScrollBar_CombineAddLineRegionDrawingAreas, + + // bool - whether or not the upper two button drawing areas should be combined into one + SH_ScrollBar_CombineSubLineRegionDrawingAreas, + // do not add any values below/greater than this SH_CustomBase = 0xf0000000 }; diff --git a/src/styles/qcommonstyle.cpp b/src/styles/qcommonstyle.cpp index 1cc2540..f033df2 100644 --- a/src/styles/qcommonstyle.cpp +++ b/src/styles/qcommonstyle.cpp @@ -66,6 +66,7 @@ #include "qradiobutton.h" #include "qbitmap.h" #include "qprogressbar.h" +#include "qlistbox.h" #include "private/qdialogbuttons_p.h" #include #include @@ -265,6 +266,7 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid if (populateReliantFields) { ceData.fgColor = widget->foregroundColor(); ceData.colorGroup = widget->colorGroup(); + ceData.paletteBgColor = widget->paletteBackgroundColor(); } ceData.geometry = widget->geometry(); ceData.rect = widget->rect(); @@ -504,6 +506,7 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid if (populateReliantFields) { ceData.viewportData.fgColor = viewport->foregroundColor(); ceData.viewportData.colorGroup = viewport->colorGroup(); + ceData.viewportData.paletteBgColor = viewport->paletteBackgroundColor(); } ceData.viewportData.geometry = viewport->geometry(); ceData.viewportData.rect = viewport->rect(); @@ -524,6 +527,10 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid if (lineEdit) { ceData.comboBoxLineEditFlags = getControlElementFlagsForObject(lineEdit, ceData.widgetObjectTypes, QStyleOption::Default); } + const QListBox* listBox = cb->listBox(); + if (listBox) { + ceData.comboBoxListBoxFlags = getControlElementFlagsForObject(listBox, ceData.widgetObjectTypes, QStyleOption::Default); + } } } if (ceData.widgetObjectTypes.contains("QFrame")) { @@ -554,6 +561,7 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid if (populateReliantFields) { ceData.parentWidgetData.fgColor = parentWidget->foregroundColor(); ceData.parentWidgetData.colorGroup = parentWidget->colorGroup(); + ceData.parentWidgetData.paletteBgColor = parentWidget->paletteBackgroundColor(); } ceData.parentWidgetData.geometry = parentWidget->geometry(); ceData.parentWidgetData.rect = parentWidget->rect(); @@ -580,6 +588,7 @@ QStyleControlElementData populateControlElementDataFromWidget(const QWidget* wid if (toolbar) { ceData.toolBarData.orientation = toolbar->orientation(); } + ceData.parentWidgetFlags = getControlElementFlagsForObject(parentWidget, ceData.parentWidgetData.widgetObjectTypes, QStyleOption::Default, populateReliantFields); } QCheckListItem *item = opt.checkListItem();