Added more settings

This commit is contained in:
Agel committed 2026-03-20 17:49:57 +01:00
1 parent 562692954d
commit 62873ff77f
6 files changed
+268 -74

No files matched your search

+3 -8
View File
@@ -99,14 +99,9 @@ void ReadingModel::setScrollInfo(int topChunkIndex, qreal offsetInChunk, bool at
void ReadingModel::computeChunkHeights()
{
// Text width matches the QML delegate:
// ListView left margin: 12, delegate rightPadding: 2
// delegate width = listView.width - 18 (hardcoded in QML)
// text layout width = delegate.width - rightPadding = listView.width - 20
// m_viewportWidth = chunkListView.width = parent.width - leftMargin(12)
// so delegate.width = m_viewportWidth - 18
// text width = delegate.width - rightPadding(2) = m_viewportWidth - 20
qreal textWidth = m_viewportWidth - 20.0;
// Caller passes effective text width:
// chunkListView.width - 18 (scrollbar) - 2 * horizontalMargin (delegate padding)
qreal textWidth = m_viewportWidth;
if (textWidth <= 0)
textWidth = 1;