This commit is contained in:
Martin Rotter 2023-05-05 08:55:58 +02:00
parent 1b6f4a9dcd
commit 0891600884
3 changed files with 20 additions and 1 deletions

View File

@ -1000,3 +1000,12 @@ void FeedsView::onItemExpandRequested(const QList<RootItem*>& items, bool exp) {
setExpanded(proxy_index, exp);
}
}
void FeedsView::drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const {
// auto opts = options;
// opts.decorationAlignment = Qt::AlignmentFlag::AlignLeft;
// opts.decorationSize = {options.decorationSize.height(), options.decorationSize.height()};
BaseTreeView::drawRow(painter, options, index);
}

View File

@ -144,6 +144,10 @@ class RSSGUARD_DLLSPEC FeedsView : public BaseTreeView {
FeedsModel* m_sourceModel;
FeedsProxyModel* m_proxyModel;
bool m_dontSaveExpandState;
// QTreeView interface
protected:
virtual void drawRow(QPainter *painter, const QStyleOptionViewItem &options, const QModelIndex &index) const;
};
inline FeedsProxyModel* FeedsView::model() const {

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>500</width>
<height>550</height>
<height>628</height>
</rect>
</property>
<property name="windowTitle">
@ -133,6 +133,12 @@
</item>
<item>
<widget class="QGroupBox" name="m_groupFeeds">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="title">
<string/>
</property>