QWizard/Windows: Remove code for Windows < 7
Change-Id: I1021ede67fe1396cdea3114d310e293fad2bcd76 Reviewed-by: Jake Petroules <jake.petroules@qt.io>bb10
parent
0eb2e1f38f
commit
7c7595e1b2
|
|
@ -579,7 +579,7 @@ public:
|
|||
, bottomRuler(0)
|
||||
#if QT_CONFIG(style_windowsvista)
|
||||
, vistaHelper(0)
|
||||
, vistaInitPending(false)
|
||||
, vistaInitPending(true)
|
||||
, vistaState(QVistaHelper::Dirty)
|
||||
, vistaStateChanged(false)
|
||||
, inHandleAeroStyleChange(false)
|
||||
|
|
@ -590,12 +590,6 @@ public:
|
|||
, maximumHeight(QWIDGETSIZE_MAX)
|
||||
{
|
||||
std::fill(btns, btns + QWizard::NButtons, static_cast<QAbstractButton *>(0));
|
||||
|
||||
#if QT_CONFIG(style_windowsvista)
|
||||
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA
|
||||
&& (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based))
|
||||
vistaInitPending = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void init();
|
||||
|
|
|
|||
|
|
@ -154,10 +154,7 @@ QVistaHelper::QVistaHelper(QWizard *wizard)
|
|||
backButton_ = new QVistaBackButton(wizard);
|
||||
backButton_->hide();
|
||||
|
||||
// Handle diff between Windows 7 and Vista
|
||||
iconSpacing = QStyleHelper::dpiScaled(7);
|
||||
textSpacing = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ?
|
||||
iconSpacing : QStyleHelper::dpiScaled(20);
|
||||
}
|
||||
|
||||
QVistaHelper::~QVistaHelper()
|
||||
|
|
@ -695,7 +692,7 @@ int QVistaHelper::captionSizeDp()
|
|||
|
||||
int QVistaHelper::titleOffset()
|
||||
{
|
||||
int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + textSpacing;
|
||||
int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + iconSpacing;
|
||||
return leftMargin() + iconOffset;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,8 +104,7 @@ public:
|
|||
static int titleBarSize() { return QVistaHelper::titleBarSizeDp() / QVistaHelper::m_devicePixelRatio; }
|
||||
static int titleBarSizeDp() { return QVistaHelper::frameSizeDp() + QVistaHelper::captionSizeDp(); }
|
||||
static int topPadding() { // padding under text
|
||||
return int(QStyleHelper::dpiScaled(
|
||||
QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? 4 : 6));
|
||||
return int(QStyleHelper::dpiScaled(4));
|
||||
}
|
||||
static int topOffset();
|
||||
|
||||
|
|
@ -150,7 +149,6 @@ private:
|
|||
|
||||
int titleBarOffset; // Extra spacing above the text
|
||||
int iconSpacing; // Space between button and icon
|
||||
int textSpacing; // Space between icon and text
|
||||
static int m_devicePixelRatio;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue