#include <QtGui>
#include "thblackbar.h"
+#include "../fontutils.h"
/* ============================================================================
* PRIVATE Class
* PROTECTED Methods
*/
void THBlackBar::paintEvent (QPaintEvent *event) {
- int height = event->rect().height();
- int width = event->rect().width();
+ int height = rect().height();
+ int width = rect().width();
// int mh = (height / 2);
// THPainter p(this);
}
int THBlackBar::calculateButtonWidth (void) const {
- QFont smallerBoldFont;
- smallerBoldFont.setBold(true);
- smallerBoldFont.setPointSize(smallerBoldFont.pointSize()*.85);
+ QFont smallerBoldFont = FontUtils::smallBold();
QFontMetrics fontMetrics(smallerBoldFont);
int tmpItemWidth, itemWidth = 0;
foreach (QAction *action, d->actionList) {
painter->fillRect(0, 0, width, mh, QBrush(gradient));
painter->fillRect(0, mh, width, mh, color);
+#ifdef APP_MAC
+ painter->drawRect(-1, -1, width+1, height);
+#else
painter->drawRect(0, 0, width, height);
-
- QFont smallerBoldFont;
- smallerBoldFont.setBold(true);
- smallerBoldFont.setPointSize(smallerBoldFont.pointSize()*.85);
+#endif
+ QFont smallerBoldFont = FontUtils::smallBold();
painter->setFont(smallerBoldFont);
painter->setPen(QPen(QColor(0xff, 0xff, 0xff), 1));
painter->drawText(0, 1, width, height, Qt::AlignCenter, action->text());