diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-30 22:44:02 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-30 22:44:02 -0500 |
commit | d26d6ac23685063d532f0195499e617b2442350b (patch) | |
tree | a319beb31fac524d2147a3460de5880841c14faa /kstyles/asteroid/asteroid.cpp | |
parent | 40712e064638a603834221ccc204345c1bb9acf5 (diff) | |
download | tdelibs-d26d6ac23685063d532f0195499e617b2442350b.tar.gz tdelibs-d26d6ac23685063d532f0195499e617b2442350b.zip |
Style update
Diffstat (limited to 'kstyles/asteroid/asteroid.cpp')
-rw-r--r-- | kstyles/asteroid/asteroid.cpp | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index a618ef0e8..432756032 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -937,6 +937,34 @@ void AsteroidStyle::drawPrimitive(TQ_PrimitiveElement pe, break; } + case PE_MenuItemIndicatorCheck: { + int x, y, w, h; + r.rect( &x, &y, &w, &h ); + + bool active = sf & Style_Active; + bool disabled = !(sf & Style_Enabled); + + int xp = x; + + SFlags cflags = Style_Default; + if (disabled) { + cflags |= Style_On; + } else { + cflags |= Style_Enabled; + } + + p->setPen(active ? cg.highlightedText() : cg.buttonText()); + + TQRect rr = TQRect(xp, y, w, h); + if (backwards) { + rr = visualRect(rr, r); + } + + drawPrimitive(PE_CheckMark, p, ceData, elementFlags, rr, cg, cflags); + + break; + } + default: { KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, sf, o); } @@ -1572,23 +1600,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, p->drawPixmap(pmr.topLeft(), pixmap); } else if (checkable) { if (mi->isChecked()) { - int xp = xpos; - - SFlags cflags = Style_Default; - if (disabled) { - cflags |= Style_On; - } else { - cflags |= Style_Enabled; - } - - p->setPen(active ? cg.highlightedText() : cg.buttonText()); - - TQRect rr = TQRect(xp, y, checkcol, sh); - if (backwards) { - rr = visualRect(rr, r); - } - - drawPrimitive(PE_CheckMark, p, ceData, elementFlags, rr, cg, cflags); + drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(x, y, checkcol, sh), cg, sf); } } |