Changeset 8127 in ntrip for trunk/BNC/qwtpolar/qwt_polar_layout.cpp
- Timestamp:
- May 10, 2017, 3:20:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwtpolar/qwt_polar_layout.cpp
r7990 r8127 23 23 { 24 24 int frameWidth; 25 int vScrollBarWidth;26 int hScrollBarHeight;25 int hScrollExtent; 26 int vScrollExtent; 27 27 QSizeF hint; 28 28 } legend; … … 49 49 { 50 50 legend.frameWidth = plot->legend()->frameWidth(); 51 legend. vScrollBarWidth=52 plot->legend()-> verticalScrollBar()->sizeHint().width();53 legend. hScrollBarHeight =54 plot->legend()-> horizontalScrollBar()->sizeHint().height();51 legend.hScrollExtent = 52 plot->legend()->scrollExtent( Qt::Horizontal ); 53 legend.vScrollExtent = 54 plot->legend()->scrollExtent( Qt::Vertical ); 55 55 56 56 const QSizeF hint = plot->legend()->sizeHint(); … … 62 62 63 63 if ( h > rect.height() ) 64 w += legend. vScrollBarWidth;64 w += legend.hScrollExtent; 65 65 66 66 legend.hint = QSizeF( w, h ); … … 279 279 // half of the available space. 280 280 281 dim = qMin( hint.width(), qreal(rect.width() * d_data->legendRatio));281 dim = qMin( double( hint.width() ), rect.width() * d_data->legendRatio ); 282 282 283 283 if ( !( options & IgnoreScrollbars ) ) … … 288 288 // space for the vertical scrollbar. 289 289 290 dim += d_data->layoutData.legend. vScrollBarWidth;290 dim += d_data->layoutData.legend.hScrollExtent; 291 291 } 292 292 } … … 294 294 else 295 295 { 296 dim = qMin( hint.width(), qreal(rect.width() * d_data->legendRatio));297 dim = qMax( dim, d_data->layoutData.legend. hScrollBarHeight );296 dim = qMin( double( hint.height() ), rect.height() * d_data->legendRatio ); 297 dim = qMax( dim, d_data->layoutData.legend.vScrollExtent ); 298 298 } 299 299
Note:
See TracChangeset
for help on using the changeset viewer.