projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the new style engine compile and maybe even work. (Cached) format data is now
[quassel.git]
/
src
/
qtui
/
topicbutton.cpp
diff --git
a/src/qtui/topicbutton.cpp
b/src/qtui/topicbutton.cpp
index
4c26bfc
..
2030a54
100644
(file)
--- a/
src/qtui/topicbutton.cpp
+++ b/
src/qtui/topicbutton.cpp
@@
-45,6
+45,8
@@
void TopicButton::paintEvent(QPaintEvent *event) {
QPainter painter(this);
painter.setBackgroundMode(Qt::OpaqueMode);
QPainter painter(this);
painter.setBackgroundMode(Qt::OpaqueMode);
+ // FIXME re-enable topic painting
+#ifndef SPUTDEV
QRect drawRect = rect();
QRect brect;
QString textPart;
QRect drawRect = rect();
QRect brect;
QString textPart;
@@
-56,6
+58,7
@@
void TopicButton::paintEvent(QPaintEvent *event) {
painter.drawText(drawRect, Qt::AlignLeft|Qt::TextSingleLine, textPart, &brect);
drawRect.setLeft(brect.right());
}
painter.drawText(drawRect, Qt::AlignLeft|Qt::TextSingleLine, textPart, &brect);
drawRect.setLeft(brect.right());
}
+#endif
}
void TopicButton::setAndStyleText(const QString &text) {
}
void TopicButton::setAndStyleText(const QString &text) {
@@
-64,6
+67,7
@@
void TopicButton::setAndStyleText(const QString &text) {
setText(text); // this triggers a repaint event
setText(text); // this triggers a repaint event
+#ifndef SPUTDEV
styledText = QtUi::style()->styleString(Message::mircToInternal(text));
int height = 1;
foreach(QTextLayout::FormatRange fr, styledText.formats) {
styledText = QtUi::style()->styleString(Message::mircToInternal(text));
int height = 1;
foreach(QTextLayout::FormatRange fr, styledText.formats) {
@@
-75,7
+79,7
@@
void TopicButton::setAndStyleText(const QString &text) {
height = QFontMetrics(qApp->font()).height();
setFixedHeight(height);
height = QFontMetrics(qApp->font()).height();
setFixedHeight(height);
-
+#endif
// show topic in tooltip
setToolTip(tr("%1\n\nClick to edit!").arg(QAbstractButton::text()));
}
// show topic in tooltip
setToolTip(tr("%1\n\nClick to edit!").arg(QAbstractButton::text()));
}