Fix raised borders for some styles.

[GB.QT4]
* BUG: Fix raised borders for some styles.

[GB.QT5]
* BUG: Fix raised borders for some styles.
This commit is contained in:
gambas 2021-01-26 22:31:31 +01:00
parent e41cb20ec2
commit a8b0df9f8c

View file

@ -606,18 +606,17 @@ static void _draw_border(QPainter *p, int frame, QWidget *w, QStyleOptionFrame &
p->setBrush(QBrush());
style->drawPrimitive(QStyle::PE_Frame, &optv3, p, w);
p->setBrush(save_brush);
//style->drawControl(QStyle::CE_ShapedFrame, &optv3, p, w);
break;
case BORDER_RAISED:
optv3.rect = opt.rect;
optv3.state = opt.state | QStyle::State_Raised;
optv3.frameShape = QFrame::StyledPanel;
save_brush = p->brush();
p->setBrush(QBrush());
style->drawPrimitive(QStyle::PE_Frame, &optv3, p, w);
/*opt.lineWidth = 2;
opt.midLineWidth = 2;
opt.state |= QStyle::State_Raised;
style->drawPrimitive(QStyle::PE_Frame, &opt, p, w);*/
p->setBrush(save_brush);
break;
case BORDER_ETCHED:
@ -625,7 +624,6 @@ static void _draw_border(QPainter *p, int frame, QWidget *w, QStyleOptionFrame &
//optv3.state = opt.state | QStyle::State_Raised;
optv3.frameShape = QFrame::StyledPanel;
style->drawPrimitive(QStyle::PE_FrameGroupBox, &optv3, p, w);
//qDrawShadeRect(p, opt.rect, opt.palette, true, 1, 0);
break;
default: