summaryrefslogtreecommitdiffstats
path: root/kwin/clients/modernsystem/modernsys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kwin/clients/modernsystem/modernsys.cpp')
-rw-r--r--kwin/clients/modernsystem/modernsys.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kwin/clients/modernsystem/modernsys.cpp b/kwin/clients/modernsystem/modernsys.cpp
index 1bb9f9815..ce7545cdf 100644
--- a/kwin/clients/modernsystem/modernsys.cpp
+++ b/kwin/clients/modernsystem/modernsys.cpp
@@ -65,7 +65,7 @@ static unsigned char shade_on_bits[] = {
static unsigned char menu_bits[] = {
0xff, 0x81, 0x81, 0xff, 0x81, 0xff, 0x81, 0xff};
-static unsigned char btnhighcolor_tqmask_bits[] = {
+static unsigned char btnhighcolor_mask_bits[] = {
0xe0,0x41,0xf8,0x07,0xfc,0x0f,0xfe,0xdf,0xfe,0x1f,0xff,0x3f,0xff,0xff,0xff,
0x3f,0xff,0x3f,0xff,0xff,0xff,0xff,0xfe,0x9f,0xfe,0x1f,0xfc,0x0f,0xf0,0x03,
0x00,0x40,0x80,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x20,0x99,0x0f,0x08,0xc4,
@@ -127,7 +127,7 @@ static void make_button_fx(const TQColorGroup &g, TQPixmap *pix, bool light=fals
}
else{
- if(!lcDark1->tqmask()){
+ if(!lcDark1->mask()){
lcDark1->setMask(*lcDark1);
lcDark2->setMask(*lcDark2);
lcDark3->setMask(*lcDark3);
@@ -171,20 +171,20 @@ static void create_pixmaps()
KPixmapEffect::VerticalGradient);
}
// buttons
- TQColorGroup btnColor(options()->tqcolorGroup(KDecoration::ColorButtonBg, true));
+ TQColorGroup btnColor(options()->colorGroup(KDecoration::ColorButtonBg, true));
buttonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPix);
buttonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, buttonPixDown, true);
- btnColor = options()->tqcolorGroup(KDecoration::ColorButtonBg, false);
+ btnColor = options()->colorGroup(KDecoration::ColorButtonBg, false);
iButtonPix = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPix);
iButtonPixDown = new TQPixmap(14, 15);
make_button_fx(btnColor, iButtonPixDown, true);
- if(tqGray(btnColor.background().rgb()) < 150)
+ if(qGray(btnColor.background().rgb()) < 150)
buttonFg = new TQColor(Qt::white);
else
buttonFg = new TQColor(Qt::black);
@@ -289,11 +289,11 @@ ModernButton::ModernButton(ButtonType type, ModernSys *parent, const char *name)
{
setBackgroundMode( NoBackground );
- TQBitmap tqmask(14, 15, TQPixmap::defaultDepth() > 8 ?
- btnhighcolor_tqmask_bits : lowcolor_tqmask_bits, true);
+ TQBitmap mask(14, 15, TQPixmap::defaultDepth() > 8 ?
+ btnhighcolor_mask_bits : lowcolor_mask_bits, true);
resize(14, 15);
- setMask(tqmask);
+ setMask(mask);
}
void ModernButton::reset(unsigned long changed)
@@ -410,7 +410,7 @@ bool ModernSys::decorationBehaviour(DecorationBehaviour behaviour) const
}
}
-int ModernSys::tqlayoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const
+int ModernSys::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const
{
// bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows();
@@ -425,9 +425,9 @@ int ModernSys::tqlayoutMetric(LayoutMetric lm, bool respectWindowState, const KC
return border_width + handle_width;
case LM_TitleEdgeLeft:
- return tqlayoutMetric(LM_BorderLeft,respectWindowState)+3;
+ return layoutMetric(LM_BorderLeft,respectWindowState)+3;
case LM_TitleEdgeRight:
- return tqlayoutMetric(LM_BorderRight,respectWindowState)+3;
+ return layoutMetric(LM_BorderRight,respectWindowState)+3;
case LM_TitleEdgeTop:
return 2;
@@ -454,7 +454,7 @@ int ModernSys::tqlayoutMetric(LayoutMetric lm, bool respectWindowState, const KC
return 3;
default:
- return KCommonDecoration::tqlayoutMetric(lm, respectWindowState, btn);
+ return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}
}
@@ -515,10 +515,10 @@ void ModernSys::recalcTitleBuffer()
p.drawTiledPixmap(0, 0, width(), title_height+2, *aUpperGradient);
else
p.fillRect(0, 0, width(), title_height+2,
- options()->tqcolorGroup(ColorTitleBar, true).
+ options()->colorGroup(ColorTitleBar, true).
brush(TQColorGroup::Button));
- TQRect t = titleRect(); // titlebar->tqgeometry();
+ TQRect t = titleRect(); // titlebar->geometry();
t.setTop( 2 );
t.setLeft( t.left() );
t.setRight( t.right() - 2 );
@@ -554,7 +554,7 @@ void ModernSys::updateCaption()
void ModernSys::drawRoundFrame(TQPainter &p, int x, int y, int w, int h)
{
kDrawRoundButton(&p, x, y, w, h,
- options()->tqcolorGroup(ColorFrame, isActive()), false);
+ options()->colorGroup(ColorFrame, isActive()), false);
}
@@ -568,11 +568,11 @@ void ModernSys::paintEvent( TQPaintEvent* )
int hw = handle_width;
TQPainter p( widget() );
- TQRect t = titleRect(); // titlebar->tqgeometry();
+ TQRect t = titleRect(); // titlebar->geometry();
- TQBrush fillBrush(widget()->tqcolorGroup().brush(TQColorGroup::Background).pixmap() ?
- widget()->tqcolorGroup().brush(TQColorGroup::Background) :
- options()->tqcolorGroup(ColorFrame, isActive()).
+ TQBrush fillBrush(widget()->colorGroup().brush(TQColorGroup::Background).pixmap() ?
+ widget()->colorGroup().brush(TQColorGroup::Background) :
+ options()->colorGroup(ColorFrame, isActive()).
brush(TQColorGroup::Button));
p.fillRect(1, title_height+3, width()-2, height()-(title_height+3), fillBrush);
@@ -586,7 +586,7 @@ void ModernSys::paintEvent( TQPaintEvent* )
int h = height() - hw;
// titlebar
- TQColorGroup g = options()->tqcolorGroup(ColorTitleBar, isActive());
+ TQColorGroup g = options()->colorGroup(ColorTitleBar, isActive());
if(isActive()){
p.drawPixmap(1, 1, titleBuffer, 0, 0, w-2, title_height+2);
}
@@ -609,7 +609,7 @@ void ModernSys::paintEvent( TQPaintEvent* )
p.drawLine(0, title_height+2, w-2, title_height+2);
// frame
- g = options()->tqcolorGroup(ColorFrame, isActive());
+ g = options()->colorGroup(ColorFrame, isActive());
p.setPen(g.light());
p.drawLine(1, title_height+3, 1, h-2);
p.setPen(g.dark());
@@ -649,22 +649,22 @@ void ModernSys::updateWindowShape()
{
int hs = handle_size;
int hw = handle_width;
- TQRegion tqmask;
- tqmask += TQRect(0, 0, width()-hw, height()-hw);
+ TQRegion mask;
+ mask += TQRect(0, 0, width()-hw, height()-hw);
//single points
- tqmask -= TQRect(0, 0, 1, 1);
- tqmask -= TQRect(width()-hw-1, 0, 1, 1);
- tqmask -= TQRect(0, height()-hw-1, 1, 1);
+ mask -= TQRect(0, 0, 1, 1);
+ mask -= TQRect(width()-hw-1, 0, 1, 1);
+ mask -= TQRect(0, height()-hw-1, 1, 1);
if (show_handle) {
- tqmask += TQRect(width()-hs, height()-hs, hs-1, hs-1);
- tqmask -= TQRect(width()-2, height()-2, 1, 1);
- tqmask -= TQRect(width()-2, height()-hs, 1, 1);
- tqmask -= TQRect(width()-hs, height()-2, 1, 1);
+ mask += TQRect(width()-hs, height()-hs, hs-1, hs-1);
+ mask -= TQRect(width()-2, height()-2, 1, 1);
+ mask -= TQRect(width()-2, height()-hs, 1, 1);
+ mask -= TQRect(width()-hs, height()-2, 1, 1);
} else
- tqmask -= TQRect(width()-1, height()-1, 1, 1);
+ mask -= TQRect(width()-1, height()-1, 1, 1);
- setMask(tqmask);
+ setMask(mask);
}
ModernSysFactory::ModernSysFactory()