forked from qt-creator/qt-creator
ProjectMode: Alwyas show at least one target
Even though that target is not usseable at that width, this looks better. Change-Id: If985808bcde6c0a836e4d6085536d0a1d9023c4d Task-number: QTCREATORBUG-14182 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -239,7 +239,7 @@ QSize TargetSelector::sizeHint() const
|
|||||||
|
|
||||||
int TargetSelector::maxVisibleTargets() const
|
int TargetSelector::maxVisibleTargets() const
|
||||||
{
|
{
|
||||||
return (width() - ((NAVBUTTON_WIDTH + 1) * 2 + 3))/(targetWidth() + 1);
|
return qMax((width() - ((NAVBUTTON_WIDTH + 1) * 2 + 3))/(targetWidth() + 1), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TargetSelector::getControlAt(int x, int y, int *buttonIndex, int *targetIndex, int *targetSubIndex)
|
void TargetSelector::getControlAt(int x, int y, int *buttonIndex, int *targetIndex, int *targetSubIndex)
|
||||||
|
Reference in New Issue
Block a user