void BoxSkin::setFrameThickness( Border frame ) { bool hadFrame = (m_frame.width() + m_frame.height() > 0 ); bool hasFrame = (frame.width() + frame.height() > 0); m_frame = frame; if( hadFrame != hasFrame ) _updateOpaqueFlag(); }
BoxSkin::BoxSkin( Color color, Border frame, Color frameColor ) { m_frame = frame; for( int i = 0 ; i < StateEnum_Nb ; i++ ) { m_color[i] = color; m_frameColor[i] = frameColor; } bool hasFrame = (frame.width() + frame.height() > 0 ); if( color.a == 255 && (!hasFrame || frameColor.a == 255) ) m_bOpaque = true; else m_bOpaque = false; }