[LyX/master] Adjust split views to have equal sizes in Qt6

Koji Yokota yokota at lyx.org
Mon Sep 15 09:47:32 UTC 2025


commit 1f8bc0c231b08e7e98631cbeb947eee31b9a5466
Author: Koji Yokota <yokota at lyx.org>
Date:   Mon Sep 15 18:47:27 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 c4fbad7540..f64c368a59 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -5190,6 +5190,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