Skip to content

Commit

Permalink
fix: [sidebar] Sidebar Item editor not vertical centering
Browse files Browse the repository at this point in the history
  • Loading branch information
GongHeng2017 authored and deepin-bot[bot] committed Nov 30, 2024
1 parent 2c54f33 commit 92de566
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ void SideBarItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOpti
editor->setFixedWidth(sidebarView->width() - 50);
QRect rect = editor->geometry();
rect.setHeight(rect.height() + 2);
rect.moveTo(40, rect.top());
int verticalOffset = (option.rect.height() - rect.height()) / 2;
rect.moveTo(40, rect.top() + verticalOffset);
editor->setGeometry(rect);
}

Expand Down

0 comments on commit 92de566

Please sign in to comment.