From c678579b70f19d2cec2537f56d927e698a688aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 8 Apr 2016 03:07:37 +0200 Subject: Update to new style API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- dominoConfig/dominoconf.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'dominoConfig') diff --git a/dominoConfig/dominoconf.cpp b/dominoConfig/dominoconf.cpp index 2861b29..6aed86b 100644 --- a/dominoConfig/dominoconf.cpp +++ b/dominoConfig/dominoconf.cpp @@ -2722,7 +2722,9 @@ void PreviewCheckBox::drawButton(TQPainter *p) { TQPixmap pix(18,19); TQPainter painter(&pix); pix.fill(backgroundColor()); - style().drawControl(TQStyle::CE_CheckBox, &painter, this, irect, colorGroup(), flags); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(this, TQStyleOption()); + TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, TQStyleOption()); + style().drawControl(TQStyle::CE_CheckBox, &painter, ceData, elementFlags, irect, colorGroup(), flags, TQStyleOption::Default, this); bitBlt(this, 0, 0, &pix); } @@ -2756,7 +2758,9 @@ void PreviewRadioButton::drawButton(TQPainter *p) { TQPixmap pix(17,17); TQPainter painter(&pix); pix.fill(backgroundColor()); - style().drawControl(TQStyle::CE_RadioButton, &painter, this, irect, colorGroup(), flags); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(this, TQStyleOption()); + TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, TQStyleOption()); + style().drawControl(TQStyle::CE_RadioButton, &painter, ceData, elementFlags, irect, colorGroup(), flags, TQStyleOption::Default, this); bitBlt(this, 0, 0, &pix); } @@ -2831,7 +2835,9 @@ void IndicatorPrevButton::paintEvent(TQPaintEvent* /*event*/) TQPainter p(&buffer); buffer.fill(paletteBackgroundColor()); - previewStyle->drawControl(TQStyle::CE_PushButton, &p, this, rect(), colorGroup(), flags); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(this, TQStyleOption()); + TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, TQStyleOption()); + previewStyle->drawControl(TQStyle::CE_PushButton, &p, ceData, elementFlags, rect(), colorGroup(), flags, TQStyleOption::Default, this); previewStyle->drawFocusIndicator(&p, style().subRect(TQStyle::SR_PushButtonFocusRect, this), AlignHCenter| AlignVCenter |ShowPrefix, colorGroup(), true, 0, indicatorPreviewText, -1, indicatorBtnColor->color(), (indicatorModeCombo->currentItem() == 1), true); @@ -2894,7 +2900,9 @@ void TextEffectPrevButton::paintEvent(TQPaintEvent* /*event*/) TQPixmap buffer(width(), height()); TQPainter p(&buffer); - previewStyle->drawControl(TQStyle::CE_PushButton, &p, this, rect(), colorGroup(), flags); + const TQStyleControlElementData &ceData = populateControlElementDataFromWidget(this, TQStyleOption()); + TQStyle::ControlElementFlags elementFlags = getControlElementFlagsForObject(this, TQStyleOption()); + previewStyle->drawControl(TQStyle::CE_PushButton, &p, ceData, elementFlags, rect(), colorGroup(), flags, TQStyleOption::Default, this); drawButtonLabel(&p); -- cgit v1.2.1