Bug 89342 - Plastik does not honor QButtonGroup::setLineWidth( 0 )
Summary: Plastik does not honor QButtonGroup::setLineWidth( 0 )
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kstyle (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Karol Szwed
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-12 11:36 UTC by Alexander Reinholdt
Modified: 2004-09-13 22:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
QButtonGroup line width error screenshot (84.70 KB, image/png)
2004-09-12 11:55 UTC, Alexander Reinholdt
Details

Note You need to log in before you can comment on or make changes to this bug.
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;