projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move font settings to general appearance settingspage
[quassel.git]
/
src
/
uisupport
/
bufferview.cpp
diff --git
a/src/uisupport/bufferview.cpp
b/src/uisupport/bufferview.cpp
index
ccea4e8
..
d6c1106
100644
(file)
--- a/
src/uisupport/bufferview.cpp
+++ b/
src/uisupport/bufferview.cpp
@@
-60,6
+60,10
@@
BufferView::BufferView(QWidget *parent)
BufferViewDelegate *tristateDelegate = new BufferViewDelegate(this);
setItemDelegate(tristateDelegate);
delete oldDelegate;
BufferViewDelegate *tristateDelegate = new BufferViewDelegate(this);
setItemDelegate(tristateDelegate);
delete oldDelegate;
+
+ UiStyleSettings s("QtUiStyle/Fonts"); // li'l dirty here, but fonts are stored in QtUiStyle :/
+ s.notify("BufferView", this, SLOT(setCustomFont(QVariant)));
+ setCustomFont(s.value("BufferView", QFont()));
}
void BufferView::init() {
}
void BufferView::init() {
@@
-188,6
+192,13
@@
void BufferView::setRootIndexForNetworkId(const NetworkId &networkId) {
}
}
}
}
+void BufferView::setCustomFont(const QVariant &v) {
+ QFont font = v.value<QFont>();
+ if(font.family().isEmpty())
+ font = QApplication::font();
+ setFont(font);
+}
+
void BufferView::joinChannel(const QModelIndex &index) {
BufferInfo::Type bufferType = (BufferInfo::Type)index.data(NetworkModel::BufferTypeRole).value<int>();
void BufferView::joinChannel(const QModelIndex &index) {
BufferInfo::Type bufferType = (BufferInfo::Type)index.data(NetworkModel::BufferTypeRole).value<int>();