QListWidget-based tabs may become invisible to the user

Bug #1028302 reported by ovl-1
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
High
Bogdan Marinov

Bug Description

In the test version Stellarium 0.11.4dev4 (BZR r5453), another tab has been added to the configuration window. The consequence of this is that there is not enough horisontal space for all the tabs to be shown. After seeing through some languages several had this problem. For example, when the last tab is open the first tab is not visible at all. (Yes, the window can be dragged wider at the edge, but presumably most users will not think about doing this so it is really a big problem.)

Have earlier seen similar problem in a couple of other programs, and in those the problem was solved by adding clickable arrow buttons on the tab bar for moving forward and backwards. In this way the problem is solved once and for all even when adding more tabs later. Maybe a solution for Stellarium?

FreewareTips

Related branches

Revision history for this message
Alexander Wolf (alexwolf) wrote :

This bug related with Qt 4.8.x - latest test build was compiled with Qt 4.8.1 for Win32 and Qt 4.8.2 for Win64.

summary: - Tab bar problem
+ QListWidget-based tabs scroll out of the window
Revision history for this message
Bogdan Marinov (daggerstab) wrote : Re: QListWidget-based tabs scroll out of the window

The reason for this is that the Configuration window and the View window don't use QTabWidget, but a combination of QListWidget for the tab bar and QStackedWidget for the "pages". QTabWidget shows indication when a tab goes out of the viewport, but a QList widget normally just add a scrollbar, something that has been disabled to make it look like a tab bar. (For the way a QListWidget and QStackedWidget are used normally in this way, see this Qt example: http://qt-project.org/doc/qt-4.8/dialogs-configdialog.html )

I've searched for a solution. Apparently, the only way to make a QListWidget to resize to its contents is to make a subclass of QListWidget with a custom (minimum)sizeHint() method using the undocumented protected function QListView::contentsSize(). (QListWidget is a subclass of QListView.)

And no, this is not related to bug #995107. That one affected things like buttons.

Changed in stellarium:
importance: Undecided → High
milestone: none → 0.11.4
status: New → Triaged
summary: - QListWidget-based tabs scroll out of the window
+ No indication when QListWidget-based tabs are not shown
summary: - No indication when QListWidget-based tabs are not shown
+ QListWidget-based tabs may become invisible to the user
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I've committed a tentative fix that resizes the QListWidget (and therefore, the window) to make sure that all tab icons are visible:
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/5467

I'm not happy with it, though. There are a number of things that can be improved.

Changed in stellarium:
assignee: nobody → Bogdan Marinov (daggerstab)
status: Triaged → In Progress
Changed in stellarium:
status: In Progress → Fix Committed
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.