[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kstyles/plastik
From:       Sandro Giessl <sandro () giessl ! com>
Date:       2005-08-15 0:03:29
Message-ID: 1124064209.392877.24259.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 449301 by giessl:

- implement MenuItem::CheckOn, MenuItem::CheckOff, MenuItem::RadioOn, \
                MenuItem::RadioOff, MenuItem::CheckIcon
- set KStyle layout props for a KStyle patch yet to commit...

this should make MenuItem checkbox/radiobutton painting basically work. :)


 M  +34 -0     plastik.cpp  


--- trunk/KDE/kdelibs/kstyles/plastik/plastik.cpp #449300:449301
@@ -148,6 +148,9 @@
     setWidgetLayoutProp(WT_PushButton, PushButton::FocusMargin + Top, 2);
     setWidgetLayoutProp(WT_PushButton, PushButton::FocusMargin + Bot, 2);
 
+    setWidgetLayoutProp(WT_MenuItem, MenuItem::CheckAlongsideIcon, 1);
+    setWidgetLayoutProp(WT_MenuItem, MenuItem::CheckWidth, 13);
+
     setWidgetLayoutProp(WT_ProgressBar, ProgressBar::BusyIndicatorSize, 10);
 
     
@@ -574,6 +577,37 @@
                     // empty
                     return;
                 }
+
+                case MenuItem::CheckOn:
+                {
+                    renderCheckBox(p, r, pal, true /*TODO enabled*/, false \
/*mouseOver*/, CheckBox::CheckOn); +                    return;
+                }
+
+                case MenuItem::CheckOff:
+                {
+                    renderCheckBox(p, r, pal, true /*TODO enabled*/, false \
/*mouseOver*/, CheckBox::CheckOff); +                    return;
+                }
+
+                case MenuItem::RadioOn:
+                {
+                    renderRadioButton(p, r, pal, true /*TODO enabled*/, false \
/*mouseOver*/, RadioButton::RadioOn); +                    return;
+                }
+
+                case MenuItem::RadioOff:
+                {
+                    renderRadioButton(p, r, pal, true /*TODO enabled*/, false \
/*mouseOver*/, RadioButton::RadioOff); +                    return;
+                }
+
+                case MenuItem::CheckIcon:
+                {
+                    // TODO
+                    renderButton(p, r, pal, true /*sunken*/);
+                    return;
+                }
             }
         }
         break;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic