Version: (using KDE KDE 3.5.7) Installed from: Compiled From Sources PDFs with deeply nested tables of contents are not fully accessible in the contents sidebar as it provides no horizontal scrollbar on small window widths. This leads to a chapter's sections being cut off instead of horizontally scrollable at a 120px sidebar width. Steps to reproduce. 1. Load a document with an elaborate table of contents. I used http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf 2. Reduce sidebar width to ~120px Expected results: A horizontal scrollbar appears, allowing me to center on the subsection list of a chapter Actual results: No horizontal scrollbar appears, subsection titles are cut off.
Created attachment 20967 [details] current accessibility issue Table of contents exhibiting the issue. Note that entries are cut off insteasd of providing a horizontal scrollbar.
Created attachment 20973 [details] patch Patch fixing the bug. Please review and commit before 3.5.8 or let me commit it.
Hi Leo, we already provide a Tooltip for TOC items that don't fit in the TOC width, but if you think your patch is better please go ahead.
What about enabling directly the horizontal scrollbar of the TOC, instead of using a dummy widget?
@ comment 4: Been there, done that. The scrollbar will stretch beyond the visible viewport (seems to be an issue with QToolBox).
SVN commit 680874 by savernik: Provide horizontal scrollbar in table of contents sidebar instead of cropping the entries. This improves usability esp. for deeply nested TOCs. BUG: 147233 M +6 -2 part.cpp M +2 -1 ui/toc.cpp --- branches/KDE/3.5/kdegraphics/kpdf/part.cpp #680873:680874 @@ -186,9 +186,13 @@ int index; // [left toolbox: Table of Contents] | [] - m_tocFrame = new TOC( m_toolBox, m_document ); + // dummy wrapper with layout to enable horizontal scroll bars (bug: 147233) + QWidget *tocWrapper = new QWidget(m_toolBox); + QVBoxLayout *tocWrapperLayout = new QVBoxLayout(tocWrapper); + m_tocFrame = new TOC( tocWrapper, m_document ); + tocWrapperLayout->add(m_tocFrame); connect(m_tocFrame, SIGNAL(hasTOC(bool)), this, SLOT(enableTOC(bool))); - index = m_toolBox->addItem( m_tocFrame, QIconSet(SmallIcon("text_left")), i18n("Contents") ); + index = m_toolBox->addItem( tocWrapper, QIconSet(SmallIcon("text_left")), i18n("Contents") ); m_toolBox->setItemToolTip(index, i18n("Contents")); enableTOC( false ); --- branches/KDE/3.5/kdegraphics/kpdf/ui/toc.cpp #680873:680874 @@ -64,7 +64,8 @@ #endif setSorting(-1); setRootIsDecorated(true); - setResizeMode(AllColumns); + // the next line causes bug:147233 +// setResizeMode(AllColumns); setAllColumnsShowFocus(true); connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *))); connect(this, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(slotExecuted(QListViewItem *)));
*** Bug 149239 has been marked as a duplicate of this bug. ***
(KPDF: 0.5.10 (using KDE 3.5.10 "release 21.11" openSUSE) (Okular: Version 0.7.3 Using KDE 4.1.3 (KDE 4.1.3) "release 4.10.4") Hi, it has been a while since this bug. I find the limited sizing of the left pane _with scrollbar_ very irritating (also in Okular). Hovering over the TOC entry does not show the whole entry in my openSUSE 11.1 64 Bit System, on which Okular does show the hover. Why can the two panes not be varied without limits for either the TOC or the main displayed PDF?