2025/09/12 23:16、Jürgen Spitzmüller <[email protected]>のメール:

Am Freitag, dem 12.09.2025 um 13:37 +0100 schrieb José Matos:
On Fri, 2025-09-12 at 07:42 +0200, Jürgen Spitzmüller wrote:
Is this a regression to 2.4? Otherwise, I'd rather do it later in
2.6.x (and then maybe backport to 2.5.x).

Honestly, and recently, I have also started to see this in 2.4.
Before the split
was 50-50 and now is not anymore. The same applies to 2.5.

So more than a regression in 2.5, I suspect, without any concrete
proof, that this is a change due to, for example, an update in qt.

I tested now, and I see it, too. But only with Qt6, not with Qt5. So
the size change should be conditioned on that, and we should research
whether this is a bug in Qt6 or some intentional change.

The manual of QSplitter does not mention about the arrangement of sizes after insertion of a widget, so the behavior in Qt5 might have just happened to be consistent with the purpose here. I cannot point out exactly when the behavior changed, but setting the condition at the start of Qt6 would not be harmful.

Does the patch like this look OK?

--------------------------------------------------------------------------------------
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);
———————————————————————————————————————————

Koji

Attachment: adjust_views.diff
Description: Binary data

-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to