xml \
phonon
include(src/qtsingleapplication/qtsingleapplication.pri)
-include(src/thlibrary/thlibrary.pri)
HEADERS += src/MainWindow.h \
src/SearchView.h \
src/MediaView.h \
src/videowidget.h \
src/flickcharm.h \
src/videodefinition.h \
- src/fontutils.h
+ src/fontutils.h \
+ src/thlibrary/thblackbar.h
SOURCES += src/main.cpp \
src/MainWindow.cpp \
src/SearchView.cpp \
src/flickcharm.cpp \
src/videodefinition.cpp \
src/constants.cpp \
- src/fontutils.cpp
+ src/fontutils.cpp \
+ src/thlibrary/thblackbar.cpp
RESOURCES += resources.qrc
DESTDIR = build/target/
OBJECTS_DIR = build/obj/
QBoxLayout *aboutlayout = new QHBoxLayout(this);
aboutlayout->setAlignment(Qt::AlignCenter);
+ aboutlayout->setMargin(30);
aboutlayout->setSpacing(30);
QLabel *logo = new QLabel(this);
#include "SearchView.h"
#include "constants.h"
+#include "fontutils.h"
namespace The {
QMap<QString, QAction*>* globalActions();
SearchView::SearchView(QWidget *parent) : QWidget(parent) {
- QFont biggerFont;
- biggerFont.setPointSize(biggerFont.pointSize()*1.5);
-
- QFont smallerFont;
- smallerFont.setPointSize(smallerFont.pointSize()*.85);
- smallerFont.setBold(true);
+ QFont biggerFont = FontUtils::big();
+ QFont smallerFont = FontUtils::smallBold();
QBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->setMargin(PADDING);
#include "PrettyItemDelegate.h"
#include "../ListModel.h"
+#include "../fontutils.h"
#include <QFontMetricsF>
#include <QPainter>
const qreal PrettyItemDelegate::PADDING = 10.0;
PrettyItemDelegate::PrettyItemDelegate( QObject* parent ) : QStyledItemDelegate( parent ) {
-
boldFont.setBold(true);
- smallerFont.setPointSize(smallerFont.pointSize()*.85);
- smallerBoldFont.setBold(true);
- smallerBoldFont.setPointSize(smallerBoldFont.pointSize()*.85);
- QFontInfo fontInfo(smallerFont);
- if (fontInfo.pixelSize() < 10) {
- smallerFont.setPixelSize(10);
- smallerBoldFont.setPixelSize(10);
- }
+ smallerBoldFont = FontUtils::smallBold();
+ smallerFont = FontUtils::small();
createPlayIcon();
}
#include <QtGui>
#include "thblackbar.h"
+#include "../fontutils.h"
/* ============================================================================
* PRIVATE Class
}
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, mh, width, mh, color);
painter->drawRect(0, 0, width, height);
- QFont smallerBoldFont;
- smallerBoldFont.setBold(true);
- smallerBoldFont.setPointSize(smallerBoldFont.pointSize()*.85);
+ 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());