mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Remove the workaoround from QTableView, made stretching default
This commit is contained in:
@@ -557,7 +557,7 @@ namespace BlackGui
|
|||||||
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
|
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
|
||||||
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
|
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
|
||||||
int m_loadIndicatorTimeoutMsDefault = 30 * 1000; //!< default time for timeout
|
int m_loadIndicatorTimeoutMsDefault = 30 * 1000; //!< default time for timeout
|
||||||
bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again
|
bool m_forceStretchLastColumnWhenResized = true; //!< a small table might (few columns) fail stretching, force again
|
||||||
bool m_showingLoadIndicator = false; //!< showing loading indicator
|
bool m_showingLoadIndicator = false; //!< showing loading indicator
|
||||||
bool m_enabledLoadIndicator = true; //!< loading indicator enabled/disabled
|
bool m_enabledLoadIndicator = true; //!< loading indicator enabled/disabled
|
||||||
bool m_acceptClickSelection = false; //!< clicked
|
bool m_acceptClickSelection = false; //!< clicked
|
||||||
|
|||||||
@@ -760,6 +760,10 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CViewBaseNonTemplate::fullResizeToContents()
|
void CViewBaseNonTemplate::fullResizeToContents()
|
||||||
{
|
{
|
||||||
|
//! \fixme 2019-04 Disabled the magic FOO trick for resizing
|
||||||
|
//! Not working anymore and NOT needed ??? anymore, seems like
|
||||||
|
|
||||||
|
/**
|
||||||
// resize to maximum magic trick from:
|
// resize to maximum magic trick from:
|
||||||
// http://stackoverflow.com/q/3433664/356726
|
// http://stackoverflow.com/q/3433664/356726
|
||||||
this->setVisible(false);
|
this->setVisible(false);
|
||||||
@@ -773,6 +777,7 @@ namespace BlackGui
|
|||||||
vpNew.setWidth(screenGeometry.width());
|
vpNew.setWidth(screenGeometry.width());
|
||||||
this->viewport()->setGeometry(vpNew);
|
this->viewport()->setGeometry(vpNew);
|
||||||
}
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
this->resizeColumnsToContents(); // columns
|
this->resizeColumnsToContents(); // columns
|
||||||
|
|
||||||
@@ -784,12 +789,19 @@ namespace BlackGui
|
|||||||
m_resizeCount++;
|
m_resizeCount++;
|
||||||
|
|
||||||
// re-stretch
|
// re-stretch
|
||||||
if (m_forceStretchLastColumnWhenResized) { this->horizontalHeader()->setStretchLastSection(true); }
|
if (m_forceStretchLastColumnWhenResized)
|
||||||
if (m_forceColumnsToMaxSize) { this->viewport()->setGeometry(vpOriginal); }
|
{
|
||||||
|
// toggling forces the stretch, otherwise not working
|
||||||
|
this->horizontalHeader()->setStretchLastSection(false);
|
||||||
|
this->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Magic FOO
|
||||||
|
// if (m_forceColumnsToMaxSize) { this->viewport()->setGeometry(vpOriginal); }
|
||||||
// if I store the original visibility and then
|
// if I store the original visibility and then
|
||||||
// set it back here, the whole view disappears
|
// set it back here, the whole view disappears
|
||||||
this->setVisible(true);
|
// this->setVisible(true);
|
||||||
|
**/
|
||||||
}
|
}
|
||||||
|
|
||||||
void CViewBaseNonTemplate::customMenuRequested(const QPoint &pos)
|
void CViewBaseNonTemplate::customMenuRequested(const QPoint &pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user