mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Leaves can't collapse
This commit is contained in:
parent
fe49beb68e
commit
65152252a4
3 changed files with 3 additions and 4 deletions
|
@ -112,7 +112,7 @@ Page {
|
|||
spacing: Nheko.paddingMedium
|
||||
anchors.fill: parent
|
||||
anchors.margins: Nheko.paddingMedium
|
||||
anchors.leftMargin: communitySidebar.collapsed ? Nheko.paddingMedium : (Nheko.paddingMedium * (model.depth + 1))
|
||||
anchors.leftMargin: Nheko.paddingMedium + (communitySidebar.collapsed ? 0 : (fontMetrics.lineSpacing * model.depth))
|
||||
|
||||
ImageButton {
|
||||
visible: !communitySidebar.collapsed && model.collapsible
|
||||
|
@ -156,7 +156,7 @@ Page {
|
|||
visible: !communitySidebar.collapsed
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: communityItem.importantText
|
||||
elideWidth: parent.width - avatar.width - r.anchors.leftMargin - Nheko.paddingMedium - fontMetrics.lineSpacing
|
||||
elideWidth: parent.width - avatar.width - r.anchors.leftMargin/2 - Nheko.paddingMedium - fontMetrics.lineSpacing
|
||||
fullText: model.displayName
|
||||
textFormat: Text.PlainText
|
||||
}
|
||||
|
|
|
@ -438,7 +438,6 @@ tagIdToCat(QString tagId)
|
|||
bool
|
||||
FilteredCommunitiesModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
nhlog::ui()->debug("lessThan");
|
||||
QModelIndex const left_idx = sourceModel()->index(left.row(), 0, QModelIndex());
|
||||
QModelIndex const right_idx = sourceModel()->index(right.row(), 0, QModelIndex());
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
const auto depth = tree[index].depth;
|
||||
int i = index + 1;
|
||||
for (; i < size(); i++)
|
||||
if (tree[i].depth == depth)
|
||||
if (tree[i].depth <= depth)
|
||||
break;
|
||||
return i - 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue