-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: remove the limit of term splitting #353
feat: remove the limit of term splitting #353
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA. |
/check clacheck/CLAssistant |
Deepin Obs Bot |
deepin-terminal/src/views/termwidget.cpp Line 126 in 7a69abb
这里有设置最小的大小限制,小窗口下显示分屏多的话,下面的分屏终端显示会被遮盖。 |
recheck |
I have read the CLA Document and I hereby sign the CLA. |
23bf46b
to
5516f54
Compare
|
a feature request from here: https://bbs.deepin.org/post/277237
fix no term gets focus after closing one, which will cause crashes if you hit Alt+Q in sequence.
original minimum size relies on the limit of one can only split the terminal once, since we removed the limits, the minimum size should change accordingly
fix the bug that new term not showing right after the old one after the splitting
5516f54
to
6d03e2c
Compare
fix the bug that new term has wrong size after splitting
6d03e2c
to
eee66bc
Compare
@rb-union @ArchieMeng done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically LGTM.
Additionally, a commit message is required by https://github.com/linuxdeepin/deepin-terminal/actions/runs/10635689078/job/29485856049?pr=353
disable splitting menu when there's no enough room for splitting
fix shortcut still work even when there's no room for splitting
createSubSplit has side effects, it removes the term form its parent, so find size of it in QSplitter::sizes crashes.
12de9a0
to
f7d6de1
Compare
deepin pr auto review关键摘要:
是否建议立即修改: |
src/main/mainwindow.cpp
Outdated
@@ -1131,7 +1131,7 @@ inline void MainWindow::slotShortcutHorizonzalSplit() | |||
// 判读数量是否允许分屏 | |||
if (Service::instance()->isCountEnable()) { | |||
TermWidgetPage *page = currentPage(); | |||
if (page && CanSplit(page->currentTerminal(), Qt::Vertical)) { | |||
if (page && TermWidget::canSplit(page->currentTerminal(), Qt::Vertical)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant "convert canSplit to object function". So that, the way of calling it becomes
page->currentTerminal()->canSplit(Qt::Vertical)
src/views/termwidget.cpp
Outdated
@@ -1011,6 +1011,38 @@ bool TermWidget::isInRemoteServer() | |||
return false; | |||
} | |||
|
|||
bool TermWidget::canSplit(TermWidget *term, Qt::Orientation ori) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant "convert canSplit to object function".
- change CanSplit to a public funtion of TermWidget - change MIN_WIDTH and MIN_HEIGHT of TermWidget to private
f7d6de1
to
084e086
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ArchieMeng, hualet The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* feat: remove the limit of term splitting a feature request from here: https://bbs.deepin.org/post/277237 * fix: no term gets focus after closing one fix no term gets focus after closing one, which will cause crashes if you hit Alt+Q in sequence. * fix: change minimum size set on TermWidget original minimum size relies on the limit of one can only split the terminal once, since we removed the limits, the minimum size should change accordingly * fix: new term not showing in the right position fix the bug that new term not showing right after the old one after the splitting * fix: new term resized wrongly fix the bug that new term has wrong size after splitting * fix: disable splitting menu if there's no room disable splitting menu when there's no enough room for splitting * fix: shortcut can still do splitting on room left fix shortcut still work even when there's no room for splitting * fix: crash of unfound size createSubSplit has side effects, it removes the term form its parent, so find size of it in QSplitter::sizes crashes. * chore: some code refactory - change CanSplit to a public funtion of TermWidget - change MIN_WIDTH and MIN_HEIGHT of TermWidget to private
a feature request from here: https://bbs.deepin.org/post/277237