[LyX/2.4.x] Adjust split views to have equal sizes in Qt6

Koji Yokota yokota at lyx.org
Mon Sep 15 10:13:05 UTC 2025


commit 0af0705f7a13bdff7f7c2a4708a7ae7e39001911
Author: Koji Yokota <yokota at lyx.org>
Date:   Mon Sep 15 19:12:59 2025 +0900

    Adjust split views to have equal sizes in Qt6
---
 src/frontends/qt/GuiView.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 23259a77ca..15019c5526 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -5018,6 +5018,13 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 			TabWorkArea * twa = addTabWorkArea();
 			GuiWorkArea * wa = twa->addWorkArea(*doc_buffer, *this);
 
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+			// Adjust all views to have equal sizes
+			QList<int> sizelist;
+			for (int i=0; i < d.splitter_->count(); ++i)
+				sizelist.append(1);
+			d.splitter_->setSizes(sizelist);
+#endif
 			wa->bufferView().copySettingsFrom(*bv);
 			dr.screenUpdate(Update::ForceAll);
 			setCurrentWorkArea(wa);


More information about the lyx-cvs mailing list