X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=d6c11069fdd3df05c4d95bd68b366ff28fc396cd;hp=ccea4e8cb8f12d1228ad44f91fa4a1493e3ab36d;hb=c14a00f37179e49f034dc64b4da0c86b51caed5d;hpb=55c127eea871373f770f0155a73df013d2307276 diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index ccea4e8c..d6c11069 100644 --- 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; + + 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() { @@ -188,6 +192,13 @@ void BufferView::setRootIndexForNetworkId(const NetworkId &networkId) { } } +void BufferView::setCustomFont(const QVariant &v) { + QFont font = v.value(); + 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();