Bug 89342

Summary: Plastik does not honor QButtonGroup::setLineWidth( 0 )
Product: [Frameworks and Libraries] kdelibs Reporter: Alexander Reinholdt <alexander.reinholdt>
Component: kstyleAssignee: Karol Szwed <gallium>
Status: RESOLVED FIXED    
Severity: normal CC: sgiessl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: QButtonGroup line width error screenshot

Description Alexander Reinholdt 2004-09-12 11:36:54 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
Compiler:          g++ (GCC) 3.3.4 (Debian 1:3.3.4-11) 
OS:                Linux

Setting the linewidth of a button group with QButtonGroup::setLineWidth( 0 ) won't be honored and a line will still be visible. See the attached screenshot.
Comment 1 Alexander Reinholdt 2004-09-12 11:55:00 UTC
Created attachment 7492 [details]
QButtonGroup line width error screenshot

This screenshot shows the problem. The QButtongroup with the two QRadioButtons
in it (super/sudo) has been made with the following code sequence:

QButtonGroup *suidBox = new QButtonGroup( 2, Qt::Horizontal, superBox,
"SUIDBox" );
suidBox->setLineWidth( 0 );
suidBox->setInsideMargin( 1 );
m_super = new QRadioButton( "super", suidBox, "SuperButton" );
m_sudo = new QRadioButton( "sudo", suidBox, "SudoButton" );

One can clearly see, that the line width is not set to 0 as it should be but to
1 most likely.
Comment 2 Sandro Giessl 2004-09-13 22:09:57 UTC
CVS commit by giessl: 

Don't draw Panel with QButtonGroup::setLineWidth(0)

CCMAIL: 89342-done@bugs.kde.org


  M +5 -1      plastik.cpp   1.92


--- kdeartwork/styles/plastik/plastik.cpp  #1.91:1.92
@@ -1855,4 +1855,6 @@ void PlastikStyle::drawPrimitive(Primiti
         case PE_PanelGroupBox:
         case PE_GroupBoxFrame: {
+            if ( opt.isDefault() || opt.lineWidth() <= 0 )
+                break;
                 renderPanel(p, r, cg, false);
 
@@ -1862,4 +1864,6 @@ void PlastikStyle::drawPrimitive(Primiti
         case PE_WindowFrame:
         case PE_Panel: {
+            if ( opt.isDefault() || opt.lineWidth() <= 0 )
+                break;
             renderPanel(p, r, cg, true, sunken);
             break;