From a4b5fd34f5c3d98a438ae3519cd404c2aeeaf330 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 28 Jun 2011 06:33:02 +0000 Subject: Hnadle 'important' attribute on macros. --- client/macrodrawer.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'client/macrodrawer.cc') diff --git a/client/macrodrawer.cc b/client/macrodrawer.cc index 8c713b0..570ce54 100644 --- a/client/macrodrawer.cc +++ b/client/macrodrawer.cc @@ -45,7 +45,17 @@ MacroDrawer::MacroDrawer(Macro *macro, QString title) setFlat(true); { - QFont f = font(); f.setItalic(true); + QFont f = font(); + f.setItalic(true); + if(macro->isimportant) { + f.setBold(true); + // f.setPointSize(f.pointSize() * 1.2); + /* + QPalette palette; + palette.setBrush(QPalette::Foreground, QBrush(QColor(157, 30, 141))); + setPalette(palette); + */ + } setFont(f); } @@ -64,9 +74,10 @@ MacroDrawer::MacroDrawer(Macro *macro, QString title) connect(button, SIGNAL(clicked()), this, SLOT(toggleMe())); } - QMargins m = contentsMargins(); - m.setLeft(6); - setContentsMargins(m); + int l,t,r,b; + getContentsMargins(&l,&t,&r,&b); + l = 6; + setContentsMargins(l, t, r, b); } bool MacroDrawer::eventFilter(QObject *obj, QEvent *event) -- cgit v1.2.3