summaryrefslogtreecommitdiffstats
path: root/tdestyles/asteroid/asteroid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdestyles/asteroid/asteroid.cpp')
-rw-r--r--tdestyles/asteroid/asteroid.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/tdestyles/asteroid/asteroid.cpp b/tdestyles/asteroid/asteroid.cpp
index 7119af5a8..305a140c8 100644
--- a/tdestyles/asteroid/asteroid.cpp
+++ b/tdestyles/asteroid/asteroid.cpp
@@ -46,8 +46,6 @@
#include "asteroid.h"
-// #define MINIMUM_PUSHBUTTON_WIDTH 75;
-// #define MINIMUM_PUSHBUTTON_HEIGHT 23;
#define MINIMUM_PUSHBUTTON_WIDTH 73;
#define MINIMUM_PUSHBUTTON_HEIGHT 21;
@@ -56,15 +54,6 @@
#define SPINBOX_BUTTON_WIDTH 12
-//#define POPUPMENUITEM_TEXT_ETCH_CONDITIONS ( etchtext && !enabled && !active )
-#define POPUPMENUITEM_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-
-#define PUSHBUTTON_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-#define HEADER_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-#define TABBAR_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-#define CHECKBOX_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-#define RADIOBUTTON_TEXT_ETCH_CONDITIONS ( etchtext && !enabled )
-
/* Hackery to make metasources work */
#include "asteroid.moc"
@@ -1138,7 +1127,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
tr.setWidth(tr.width()+4); // Compensate for text appearing too far to the left
// TQRect tr_offset = TQRect(tr.x()+ETCH_X_OFFSET, tr.y()+ETCH_Y_OFFSET, tr.width(), tr.height());
TQRect tr_offset = TQRect(tr.x()+0, tr.y()+0, tr.width(), tr.height());
- if TABBAR_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
TQColorGroup etchedcg = cg;
@@ -1185,7 +1174,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
//TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height());
TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height());
- if CHECKBOX_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
TQColorGroup etchedcg = cg;
@@ -1234,7 +1223,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
// TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height());
TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height());
- if RADIOBUTTON_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
TQColorGroup etchedcg = cg;
@@ -1417,9 +1406,9 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
}
}
- p->setPen( POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():cg.foreground() );
+ p->setPen( ( etchtext && !enabled )?cg.dark():cg.foreground() );
TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height());
- if POPUPMENUITEM_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
p->drawText(r_offset, text_flags, o.menuItem()->text());
@@ -1473,13 +1462,13 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
}
if (!pb->text().isNull()) {
- p->setPen(POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():(enabled ? cg.buttonText() : pb->palette().disabled().buttonText()));
+ p->setPen(( etchtext && !enabled )?cg.dark():(enabled ? cg.buttonText() : pb->palette().disabled().buttonText()));
if (pb->iconSet() && !pb->iconSet()->isNull()) {
TQRect tpr(dx, r.y(), r.width()-dx, r.height());
TQRect tr(p->boundingRect(tpr, text_flags, pb->text()));
TQRect tr_offset = TQRect(tr.x()+ETCH_X_OFFSET, tr.y()+ETCH_Y_OFFSET, tr.width(), tr.height());
- if PUSHBUTTON_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
p->drawText(tr_offset, text_flags, pb->text());
@@ -1488,7 +1477,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
p->drawText(tr, text_flags, pb->text());
} else {
TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height());
- if PUSHBUTTON_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
p->drawText(r_offset, text_flags, pb->text());
@@ -1515,7 +1504,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
p->drawPixmap(pr.topLeft(), pm);
pr = TQRect(pr.width(), r.top(), r.width() - pr.width(), r.height());
TQRect pr_offset = TQRect(pr.x()+ETCH_X_OFFSET, pr.y()+ETCH_Y_OFFSET, pr.width(), pr.height());
- if HEADER_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
p->setPen( cg.dark()) ;
TQPen savePen = p->pen();
p->setPen( cg.light() );
@@ -1524,9 +1513,9 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
}
p->drawText(pr, text_flags, ceData.textLabel);
} else {
- p->setPen( POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():cg.buttonText() );
+ p->setPen( ( etchtext && !enabled )?cg.dark():cg.buttonText() );
TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height());
- if HEADER_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
p->drawText(r_offset, text_flags, ceData.textLabel);
@@ -1611,8 +1600,8 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
if (mi->custom()) {
int m = itemVMargin;
- p->setPen( POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():cg.foreground() );
- if POPUPMENUITEM_TEXT_ETCH_CONDITIONS {
+ p->setPen( ( etchtext && !enabled )?cg.dark():cg.foreground() );
+ if ( etchtext && !enabled ) {
TQPen savePen = p->pen();
p->setPen( cg.light() );
TQColorGroup etchedcg = cg;
@@ -1656,7 +1645,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
rr_offset = visualRect(rr_offset, r);
}
- if POPUPMENUITEM_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
p->setPen(cg.dark());
TQPen savePen = p->pen();
p->setPen( cg.light() );
@@ -1675,7 +1664,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce,
text_flags |= AlignRight;
}
- if POPUPMENUITEM_TEXT_ETCH_CONDITIONS {
+ if ( etchtext && !enabled ) {
p->setPen(cg.dark());
TQPen savePen = p->pen();
p->setPen( cg.light() );