summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp31
-rw-r--r--src/widgets/widgets/qcheckbox.cpp4
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp12
-rw-r--r--src/widgets/widgets/qdial.cpp4
-rw-r--r--src/widgets/widgets/qfontcombobox.cpp2
-rw-r--r--src/widgets/widgets/qgroupbox.cpp4
-rw-r--r--src/widgets/widgets/qlabel.cpp4
-rw-r--r--src/widgets/widgets/qlcdnumber.cpp4
-rw-r--r--src/widgets/widgets/qlineedit.cpp4
-rw-r--r--src/widgets/widgets/qmenu.cpp2
-rw-r--r--src/widgets/widgets/qmenu_wince.rc4
-rw-r--r--src/widgets/widgets/qprogressbar.cpp4
-rw-r--r--src/widgets/widgets/qpushbutton.cpp4
-rw-r--r--src/widgets/widgets/qradiobutton.cpp4
-rw-r--r--src/widgets/widgets/qscrollbar.cpp20
-rw-r--r--src/widgets/widgets/qslider.cpp4
-rw-r--r--src/widgets/widgets/qspinbox.cpp4
-rw-r--r--src/widgets/widgets/qsplitter.cpp35
-rw-r--r--src/widgets/widgets/qtabwidget.cpp4
-rw-r--r--src/widgets/widgets/qtextedit.cpp15
-rw-r--r--src/widgets/widgets/qtextedit.h1
-rw-r--r--src/widgets/widgets/qtextedit_p.h1
-rw-r--r--src/widgets/widgets/qtoolbar.cpp30
23 files changed, 113 insertions, 88 deletions
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 3c21d767be..c277f7bd45 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -328,11 +328,14 @@ void QAbstractScrollAreaPrivate::setSingleFingerPanEnabled(bool on)
void QAbstractScrollAreaPrivate::layoutChildren()
{
Q_Q(QAbstractScrollArea);
- bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn
- || (hbarpolicy == Qt::ScrollBarAsNeeded && hbar->minimum() < hbar->maximum() && !hbar->sizeHint().isEmpty()));
+ bool transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar ? vbar : hbar);
+ bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn && !transient)
+ || ((hbarpolicy == Qt::ScrollBarAsNeeded || transient)
+ && hbar->minimum() < hbar->maximum() && !hbar->sizeHint().isEmpty());
- bool needv = (vbarpolicy == Qt::ScrollBarAlwaysOn
- || (vbarpolicy == Qt::ScrollBarAsNeeded && vbar->minimum() < vbar->maximum() && !vbar->sizeHint().isEmpty()));
+ bool needv = (vbarpolicy == Qt::ScrollBarAlwaysOn && !transient)
+ || ((vbarpolicy == Qt::ScrollBarAsNeeded || transient)
+ && vbar->minimum() < vbar->maximum() && !vbar->sizeHint().isEmpty());
QStyleOption opt(0);
opt.init(q);
@@ -489,12 +492,20 @@ void QAbstractScrollAreaPrivate::layoutChildren()
if (hasMacReverseSizeGrip)
horizontalScrollBarRect.adjust(vsbExt, 0, 0, 0);
#endif
+#ifdef Q_OS_MAC
+ if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && transient)
+ horizontalScrollBarRect.adjust(0, 0, cornerOffset.x(), 0);
+#endif
scrollBarContainers[Qt::Horizontal]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, horizontalScrollBarRect));
scrollBarContainers[Qt::Horizontal]->raise();
}
if (needv) {
- const QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
+ QRect verticalScrollBarRect (QPoint(cornerPoint.x(), controlsRect.top() + hHeaderBottom), QPoint(controlsRect.right(), cornerPoint.y() - 1));
+#ifdef Q_OS_MAC
+ if (!hasCornerWidget && QSysInfo::macVersion() >= QSysInfo::MV_10_8 && transient)
+ verticalScrollBarRect.adjust(0, 0, 0, cornerOffset.y());
+#endif
scrollBarContainers[Qt::Vertical]->setGeometry(QStyle::visualRect(opt.direction, opt.rect, verticalScrollBarRect));
scrollBarContainers[Qt::Vertical]->raise();
}
@@ -654,7 +665,6 @@ void QAbstractScrollArea::setVerticalScrollBarPolicy(Qt::ScrollBarPolicy policy)
d->layoutChildren();
if (oldPolicy != d->vbarpolicy)
d->scrollBarPolicyChanged(Qt::Vertical, d->vbarpolicy);
- d->setScrollBarTransient(d->vbar, policy == Qt::ScrollBarAsNeeded);
}
@@ -716,7 +726,6 @@ void QAbstractScrollArea::setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy polic
d->layoutChildren();
if (oldPolicy != d->hbarpolicy)
d->scrollBarPolicyChanged(Qt::Horizontal, d->hbarpolicy);
- d->setScrollBarTransient(d->hbar, policy == Qt::ScrollBarAsNeeded);
}
/*!
@@ -935,7 +944,7 @@ bool QAbstractScrollArea::eventFilter(QObject *o, QEvent *e)
Q_D(QAbstractScrollArea);
if ((o == d->hbar || o == d->vbar) && (e->type() == QEvent::HoverEnter || e->type() == QEvent::HoverLeave)) {
Qt::ScrollBarPolicy policy = o == d->hbar ? d->vbarpolicy : d->hbarpolicy;
- if (policy == Qt::ScrollBarAsNeeded) {
+ if (policy == Qt::ScrollBarAsNeeded || style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, d->vbar ? d->vbar : d->hbar)) {
QScrollBar *sibling = o == d->hbar ? d->vbar : d->hbar;
d->setScrollBarTransient(sibling, e->type() == QEvent::HoverLeave);
}
@@ -1445,9 +1454,11 @@ bool QAbstractScrollAreaPrivate::canStartScrollingAt( const QPoint &startPos )
void QAbstractScrollAreaPrivate::flashScrollBars()
{
- if (hbarpolicy == Qt::ScrollBarAsNeeded)
+ Q_Q(QAbstractScrollArea);
+ bool transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, vbar ? vbar : hbar);
+ if (hbarpolicy == Qt::ScrollBarAsNeeded || transient)
hbar->d_func()->flash();
- if (vbarpolicy == Qt::ScrollBarAsNeeded)
+ if (vbarpolicy == Qt::ScrollBarAsNeeded || transient)
vbar->d_func()->flash();
}
diff --git a/src/widgets/widgets/qcheckbox.cpp b/src/widgets/widgets/qcheckbox.cpp
index 1567e30d83..0e2e802006 100644
--- a/src/widgets/widgets/qcheckbox.cpp
+++ b/src/widgets/widgets/qcheckbox.cpp
@@ -124,8 +124,8 @@ public:
\li \inlineimage macintosh-checkbox.png Screenshot of a Macintosh style checkbox
\li A checkbox shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row
- \li \inlineimage windows-checkbox.png Screenshot of a Windows XP style checkbox
- \li A checkbox shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \li \inlineimage windowsvista-checkbox.png Screenshot of a Windows Vista style checkbox
+ \li A checkbox shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row
\li \inlineimage fusion-checkbox.png Screenshot of a Fusion style checkbox
\li A checkbox shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index 394e2b537f..a962762bb1 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -105,8 +105,8 @@ QT_BEGIN_NAMESPACE
calendar widget can be retrieved with calendarWidget().
\table 100%
- \row \li \inlineimage windowsxp-datetimeedit.png Screenshot of a Windows XP style date time editing widget
- \li A date time editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-datetimeedit.png Screenshot of a Windows Vista style date time editing widget
+ \li A date time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-datetimeedit.png Screenshot of a Macintosh style date time editing widget
\li A date time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-datetimeedit.png Screenshot of a Fusion style date time editing widget
@@ -1536,8 +1536,8 @@ void QDateTimeEdit::mousePressEvent(QMouseEvent *event)
\endlist
\table 100%
- \row \li \inlineimage windowsxp-timeedit.png Screenshot of a Windows XP style time editing widget
- \li A time editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-timeedit.png Screenshot of a Windows Vista style time editing widget
+ \li A time editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-timeedit.png Screenshot of a Macintosh style time editing widget
\li A time editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-timeedit.png Screenshot of a Fusion style time editing widget
@@ -1613,8 +1613,8 @@ QTimeEdit::~QTimeEdit()
\endlist
\table 100%
- \row \li \inlineimage windowsxp-dateedit.png Screenshot of a Windows XP style date editing widget
- \li A date editing widget shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-dateedit.png Screenshot of a Windows Vista style date editing widget
+ \li A date editing widget shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-dateedit.png Screenshot of a Macintosh style date editing widget
\li A date editing widget shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\row \li \inlineimage fusion-dateedit.png Screenshot of a Fusion style date editing widget
diff --git a/src/widgets/widgets/qdial.cpp b/src/widgets/widgets/qdial.cpp
index 1f06fed0f6..4bdd5538b9 100644
--- a/src/widgets/widgets/qdial.cpp
+++ b/src/widgets/widgets/qdial.cpp
@@ -231,11 +231,11 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const
\table
\row \li \inlineimage fusion-dial.png Screenshot of a dial in the Fusion widget style
- \li \inlineimage windowsxp-dial.png Screenshot of a dial in the Windows XP widget style
+ \li \inlineimage windowsvista-dial.png Screenshot of a dial in the Windows Vista widget style
\li \inlineimage macintosh-dial.png Screenshot of a dial in the Macintosh widget style
\row \li {3,1} Dials shown in various widget styles (from left to right):
\l{Fusion Style Widget Gallery}{Fusion},
- \l{Windows XP Style Widget Gallery}{Windows XP},
+ \l{Windows Vista Style Widget Gallery}{Windows Vista},
\l{Macintosh Style Widget Gallery}{Macintosh}.
\endtable
diff --git a/src/widgets/widgets/qfontcombobox.cpp b/src/widgets/widgets/qfontcombobox.cpp
index ab878cc98f..f602a47051 100644
--- a/src/widgets/widgets/qfontcombobox.cpp
+++ b/src/widgets/widgets/qfontcombobox.cpp
@@ -314,7 +314,7 @@ void QFontComboBoxPrivate::_q_currentChanged(const QString &text)
filter out certain types of fonts as e.g. non scalable fonts or
monospaced fonts.
- \image windowsxp-fontcombobox.png Screenshot of QFontComboBox on Windows XP
+ \image windowsvista-fontcombobox.png Screenshot of QFontComboBox on Windows Vista
\sa QComboBox, QFont, QFontInfo, QFontMetrics, QFontDatabase, {Character Map Example}
*/
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index e52b8f1a94..e303fe5d6f 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -171,10 +171,10 @@ void QGroupBoxPrivate::click()
\snippet widgets/groupbox/window.cpp 2
\table 100%
- \row \li \inlineimage windowsxp-groupbox.png Screenshot of a Windows XP style group box
+ \row \li \inlineimage windowsvista-groupbox.png Screenshot of a Windows Vista style group box
\li \inlineimage macintosh-groupbox.png Screenshot of a Macintosh style group box
\li \inlineimage fusion-groupbox.png Screenshot of a Fusion style group box
- \row \li A \l{Windows XP Style Widget Gallery}{Windows XP style} group box.
+ \row \li A \l{Windows Vista Style Widget Gallery}{Windows Vista style} group box.
\li A \l{Macintosh Style Widget Gallery}{Macintosh style} group box.
\li A \l{Fusion Style Widget Gallery}{Fusion style} group box.
\endtable
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index 9465acfdad..63596a64af 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -141,8 +141,8 @@ QT_BEGIN_NAMESPACE
\li \inlineimage fusion-label.png Screenshot of a Fusion style label
\li A label shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\row
- \li \inlineimage windowsxp-label.png Screenshot of a Windows XP style label
- \li A label shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \li \inlineimage windowsvista-label.png Screenshot of a Windows Vista style label
+ \li A label shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\endtable
\sa QLineEdit, QTextEdit, QPixmap, QMovie,
diff --git a/src/widgets/widgets/qlcdnumber.cpp b/src/widgets/widgets/qlcdnumber.cpp
index 69d838bb00..c7a835b629 100644
--- a/src/widgets/widgets/qlcdnumber.cpp
+++ b/src/widgets/widgets/qlcdnumber.cpp
@@ -108,11 +108,11 @@ public:
\table
\row \li
\inlineimage windows-lcdnumber.png Screenshot of a Windows style LCD number widget
- \inlineimage windowsxp-lcdnumber.png Screenshot of a Windows XP style LCD number widget
+ \inlineimage windowsvista-lcdnumber.png Screenshot of a Windows Vista style LCD number widget
\inlineimage macintosh-lcdnumber.png Screenshot of a Macintosh style LCD number widget
\inlineimage fusion-lcdnumber.png Screenshot of a Fusion style LCD number widget
\row \li LCD number widgets shown in various widget styles (from left to right):
- \l{Windows Style Widget Gallery}{Windows}, \l{Windows XP Style Widget Gallery}{Windows XP},
+ \l{Windows Style Widget Gallery}{Windows}, \l{Windows Vista Style Widget Gallery}{Windows Vista},
\l{Macintosh Style Widget Gallery}{Macintosh}, \l{Fusion Style Widget Gallery}{Fusion}.
\endtable
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index 23dee90406..c250c286bc 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -206,8 +206,8 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const
\table 100%
\row \li \inlineimage macintosh-lineedit.png Screenshot of a Macintosh style line edit
\li A line edit shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windows-lineedit.png Screenshot of a Windows XP style line edit
- \li A line edit shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-lineedit.png Screenshot of a Windows Vista style line edit
+ \li A line edit shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-lineedit.png Screenshot of a Fusion style line edit
\li A line edit shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp
index 4d431868ac..17f9ca7911 100644
--- a/src/widgets/widgets/qmenu.cpp
+++ b/src/widgets/widgets/qmenu.cpp
@@ -1856,7 +1856,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
QPoint mouse = QCursor::pos();
d->mousePopupPos = mouse;
- const bool snapToMouse = (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
+ const bool snapToMouse = !d->causedPopup.widget && (QRect(p.x() - 3, p.y() - 3, 6, 6).contains(mouse));
const QSize menuSize(sizeHint());
if (adjustToDesktop) {
diff --git a/src/widgets/widgets/qmenu_wince.rc b/src/widgets/widgets/qmenu_wince.rc
index 50624eef57..631cd9d47a 100644
--- a/src/widgets/widgets/qmenu_wince.rc
+++ b/src/widgets/widgets/qmenu_wince.rc
@@ -3,9 +3,9 @@
#include <commctrl.h>
#include "winuser.h"
-#if defined (_DEBUG) && defined(QT_DLL)
+#if defined (_DEBUG) && defined(QT_SHARED)
#include "Qt5Widgetsd_resource.rc"
-#elif defined(QT_DLL)
+#elif defined(QT_SHARED)
#include "Qt5Widgets_resource.rc"
#endif
diff --git a/src/widgets/widgets/qprogressbar.cpp b/src/widgets/widgets/qprogressbar.cpp
index 3292116dac..7cf564c8e7 100644
--- a/src/widgets/widgets/qprogressbar.cpp
+++ b/src/widgets/widgets/qprogressbar.cpp
@@ -198,8 +198,8 @@ bool QProgressBarPrivate::repaintRequired() const
\table
\row \li \inlineimage macintosh-progressbar.png Screenshot of a Macintosh style progress bar
\li A progress bar shown in the Macintosh widget style.
- \row \li \inlineimage windowsxp-progressbar.png Screenshot of a Windows XP style progress bar
- \li A progress bar shown in the Windows XP widget style.
+ \row \li \inlineimage windowsvista-progressbar.png Screenshot of a Windows Vista style progress bar
+ \li A progress bar shown in the Windows Vista widget style.
\row \li \inlineimage fusion-progressbar.png Screenshot of a Fusion style progress bar
\li A progress bar shown in the Fusion widget style.
\endtable
diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp
index 0f9243a6c8..dd7c5f9d4f 100644
--- a/src/widgets/widgets/qpushbutton.cpp
+++ b/src/widgets/widgets/qpushbutton.cpp
@@ -168,8 +168,8 @@ QT_BEGIN_NAMESPACE
changed from round to square. Use the setMinimumSize()
function to prevent this behavior.
- \row \li \inlineimage windowsxp-pushbutton.png Screenshot of a Windows XP style push button
- \li A push button shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-pushbutton.png Screenshot of a Windows Vista style push button
+ \li A push button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-pushbutton.png Screenshot of a Fusion style push button
\li A push button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qradiobutton.cpp b/src/widgets/widgets/qradiobutton.cpp
index 68681a9dea..bb081ec905 100644
--- a/src/widgets/widgets/qradiobutton.cpp
+++ b/src/widgets/widgets/qradiobutton.cpp
@@ -118,8 +118,8 @@ void QRadioButtonPrivate::init()
\table 100%
\row \li \inlineimage fusion-radiobutton.png Screenshot of a Fusion radio button
\li A radio button shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
- \row \li \inlineimage windows-radiobutton.png Screenshot of a Windows XP radio button
- \li A radio button shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-radiobutton.png Screenshot of a Windows Vista radio button
+ \li A radio button shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage macintosh-radiobutton.png Screenshot of a Macintosh radio button
\li A radio button shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
\endtable
diff --git a/src/widgets/widgets/qscrollbar.cpp b/src/widgets/widgets/qscrollbar.cpp
index 32cf9f4467..6ace736391 100644
--- a/src/widgets/widgets/qscrollbar.cpp
+++ b/src/widgets/widgets/qscrollbar.cpp
@@ -192,8 +192,8 @@ QT_BEGIN_NAMESPACE
\table 100%
\row \li \inlineimage macintosh-horizontalscrollbar.png Screenshot of a Macintosh style scroll bar
\li A scroll bar shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windowsxp-horizontalscrollbar.png Screenshot of a Windows XP style scroll bar
- \li A scroll bar shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-horizontalscrollbar.png Screenshot of a Windows Vista style scroll bar
+ \li A scroll bar shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-horizontalscrollbar.png Screenshot of a Fusion style scroll bar
\li A scroll bar shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
@@ -234,10 +234,10 @@ void QScrollBarPrivate::setTransient(bool value)
Q_Q(QScrollBar);
if (transient != value) {
transient = value;
- if (transient) {
- if (q->isVisible() && q->style()->styleHint(QStyle::SH_ScrollBar_Transient))
+ if (q->isVisible()) {
+ if (q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q))
q->update();
- } else if (!q->isVisible()) {
+ } else if (!transient) {
q->show();
}
}
@@ -246,7 +246,7 @@ void QScrollBarPrivate::setTransient(bool value)
void QScrollBarPrivate::flash()
{
Q_Q(QScrollBar);
- if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient)) {
+ if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q)) {
flashed = true;
q->show();
}
@@ -325,7 +325,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
option->upsideDown = d->invertedAppearance;
if (d->orientation == Qt::Horizontal)
option->state |= QStyle::State_Horizontal;
- if (d->flashed || !d->transient)
+ if ((d->flashed || !d->transient) && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this))
option->state |= QStyle::State_On;
}
@@ -384,7 +384,7 @@ void QScrollBarPrivate::init()
invertedControls = true;
pressedControl = hoverControl = QStyle::SC_None;
pointerOutsidePressedControl = false;
- transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient);
+ transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, q);
flashed = false;
q->setFocusPolicy(Qt::NoFocus);
QSizePolicy sp(QSizePolicy::Minimum, QSizePolicy::Fixed, QSizePolicy::Slider);
@@ -484,7 +484,7 @@ bool QScrollBar::event(QEvent *event)
d_func()->updateHoverControl(he->pos());
break;
case QEvent::StyleChange:
- d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient));
+ d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this));
break;
default:
break;
@@ -531,7 +531,7 @@ void QScrollBar::paintEvent(QPaintEvent *)
opt.activeSubControls = (QStyle::SubControl)d->hoverControl;
}
style()->drawComplexControl(QStyle::CC_ScrollBar, &opt, &p, this);
- if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient)) {
+ if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient, 0, this)) {
d->flashed = false;
update();
}
diff --git a/src/widgets/widgets/qslider.cpp b/src/widgets/widgets/qslider.cpp
index f96a44c29f..eb16faae2f 100644
--- a/src/widgets/widgets/qslider.cpp
+++ b/src/widgets/widgets/qslider.cpp
@@ -257,8 +257,8 @@ QStyle::SubControl QSliderPrivate::newHoverControl(const QPoint &pos)
\table 100%
\row \li \inlineimage macintosh-slider.png Screenshot of a Macintosh slider
\li A slider shown in the \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \row \li \inlineimage windows-slider.png Screenshot of a Windows XP slider
- \li A slider shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-slider.png Screenshot of a Windows Vista slider
+ \li A slider shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-slider.png Screenshot of a Fusion slider
\li A slider shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\endtable
diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp
index 4754f5c1a6..13fbf3a781 100644
--- a/src/widgets/widgets/qspinbox.cpp
+++ b/src/widgets/widgets/qspinbox.cpp
@@ -153,8 +153,8 @@ public:
setSpecialValueText() for how to do this with QSpinBox.
\table 100%
- \row \li \inlineimage windowsxp-spinbox.png Screenshot of a Windows XP spin box
- \li A spin box shown in the \l{Windows XP Style Widget Gallery}{Windows XP widget style}.
+ \row \li \inlineimage windowsvista-spinbox.png Screenshot of a Windows Vista spin box
+ \li A spin box shown in the \l{Windows Vista Style Widget Gallery}{Windows Vista widget style}.
\row \li \inlineimage fusion-spinbox.png Screenshot of a Fusion spin box
\li A spin box shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}.
\row \li \inlineimage macintosh-spinbox.png Screenshot of a Macintosh spin box
diff --git a/src/widgets/widgets/qsplitter.cpp b/src/widgets/widgets/qsplitter.cpp
index 70c493cedd..9b605e4368 100644
--- a/src/widgets/widgets/qsplitter.cpp
+++ b/src/widgets/widgets/qsplitter.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
/*!
\class QSplitterHandle
- \brief The QSplitterHandle class provides handle functionality of the splitter.
+ \brief The QSplitterHandle class provides handle functionality for the splitter.
\ingroup organizers
\inmodule QtWidgets
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
QSplitterHandle. It is provided for developers who want splitter handles
that provide extra features, such as popup menus.
- The typical way one would create splitter handles is to subclass QSplitter then
+ The typical way one would create splitter handles is to subclass QSplitter and then
reimplement QSplitter::createHandle() to instantiate the custom splitter
handle. For example, a minimum QSplitter subclass might look like this:
@@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE
/*!
Creates a QSplitter handle with the given \a orientation and
- QSplitter \a parent.
+ \a parent.
*/
QSplitterHandle::QSplitterHandle(Qt::Orientation orientation, QSplitter *parent)
: QWidget(*new QSplitterHandlePrivate, parent, 0)
@@ -888,7 +888,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
A splitter lets the user control the size of child widgets by dragging the
- boundary between the children. Any number of widgets may be controlled by a
+ boundary between them. Any number of widgets may be controlled by a
single splitter. The typical use of a QSplitter is to create several
widgets and add them using insertWidget() or addWidget().
@@ -921,7 +921,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
Alternatively, you can save and restore the sizes of the widgets from a
QByteArray using saveState() and restoreState() respectively.
- When you hide() a child its space will be distributed among the
+ When you hide() a child, its space will be distributed among the
other children. It will be reinstated when you show() it again.
\note Adding a QLayout to a QSplitter is not supported (either through
@@ -987,7 +987,7 @@ void QSplitter::refresh()
\property QSplitter::orientation
\brief the orientation of the splitter
- By default the orientation is horizontal (i.e., the widgets are
+ By default, the orientation is horizontal (i.e., the widgets are
laid out side by side). The possible orientations are
Qt::Horizontal and Qt::Vertical.
@@ -1046,7 +1046,7 @@ bool QSplitter::childrenCollapsible() const
}
/*!
- Sets whether the child widget at index \a index is collapsible to \a collapse.
+ Sets whether the child widget at \a index is collapsible to \a collapse.
By default, children are collapsible, meaning that the user can
resize them down to size 0, even if they have a non-zero
@@ -1070,7 +1070,7 @@ void QSplitter::setCollapsible(int index, bool collapse)
}
/*!
- Returns true if the widget at \a index is collapsible, otherwise returns false
+ Returns true if the widget at \a index is collapsible, otherwise returns false.
*/
bool QSplitter::isCollapsible(int index) const
{
@@ -1372,7 +1372,7 @@ void QSplitter::moveSplitter(int pos, int index)
/*!
- Returns the valid range of the splitter with index \a index in
+ Returns the valid range of the splitter at \a index in
*\a{min} and *\a{max} if \a min and \a max are not 0.
*/
@@ -1384,8 +1384,7 @@ void QSplitter::getRange(int index, int *min, int *max) const
/*!
- Returns the closest legal position to \a pos of the widget with index
- \a index.
+ Returns the closest legal position to \a pos of the widget at \a index.
For right-to-left languages such as Arabic and Hebrew, the layout
of horizontal splitters is reversed. Positions are then measured
@@ -1484,7 +1483,7 @@ QSize QSplitter::minimumSizeHint() const
If the splitter's orientation is horizontal, the list contains the
widgets width in pixels, from left to right; if the orientation is
- vertical, the list contains the widgets height in pixels,
+ vertical, the list contains the widgets' heights in pixels,
from top to bottom.
Giving the values to another splitter's setSizes() function will
@@ -1509,21 +1508,21 @@ QList<int> QSplitter::sizes() const
}
/*!
- Sets the child widgets respective sizes to the values given in the \a list.
+ Sets the child widgets' respective sizes to the values given in the \a list.
- If the splitter is horizontal, the values set the widths of each
+ If the splitter is horizontal, the values set the width of each
widget in pixels, from left to right. If the splitter is vertical, the
- heights of each widget is set, from top to bottom.
+ height of each widget is set, from top to bottom.
Extra values in the \a list are ignored. If \a list contains too few
- values, the result is undefined but the program will still be well-behaved.
+ values, the result is undefined, but the program will still be well-behaved.
The overall size of the splitter widget is not affected.
Instead, any additional/missing space is distributed amongst the
widgets according to the relative weight of the sizes.
If you specify a size of 0, the widget will be invisible. The size policies
- of the widgets are preserved. That is, a value smaller then the minimal size
+ of the widgets are preserved. That is, a value smaller than the minimal size
hint of the respective widget will be replaced by the value of the hint.
\sa sizes()
@@ -1616,7 +1615,7 @@ QByteArray QSplitter::saveState() const
Typically this is used in conjunction with QSettings to restore the size
from a past session. Here is an example:
- Restore the splitters's state:
+ Restore the splitter's state:
\snippet splitter/splitter.cpp 2
diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp
index df9ca56e88..abb781960e 100644
--- a/src/widgets/widgets/qtabwidget.cpp
+++ b/src/widgets/widgets/qtabwidget.cpp
@@ -120,10 +120,10 @@ QT_BEGIN_NAMESPACE
area, organizing the individual pages).
\table 100%
- \row \li \inlineimage windowsxp-tabwidget.png Screenshot of a Windows XP style tab widget
+ \row \li \inlineimage windowsvista-tabwidget.png Screenshot of a Windows Vista style tab widget
\li \inlineimage macintosh-tabwidget.png Screenshot of a Macintosh style tab widget
\li \inlineimage fusion-tabwidget.png Screenshot of a Fusion style tab widget
- \row \li A Windows XP style tab widget.
+ \row \li A Windows Vista style tab widget.
\li A Macintosh style tab widget.
\li A Fusion style tab widget.
\endtable
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 9f7d66b344..70dcc5b506 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -53,6 +53,9 @@
#include <qmenu.h>
#include <qstyle.h>
#include <qtimer.h>
+#ifndef QT_NO_ACCESSIBILITY
+#include <qaccessible.h>
+#endif
#include "private/qtextdocumentlayout_p.h"
#include "qtextdocument.h"
#include "private/qtextdocument_p.h"
@@ -154,7 +157,7 @@ void QTextEditPrivate::init(const QString &html)
QObject::connect(control, SIGNAL(redoAvailable(bool)), q, SIGNAL(redoAvailable(bool)));
QObject::connect(control, SIGNAL(copyAvailable(bool)), q, SIGNAL(copyAvailable(bool)));
QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged()));
- QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged()));
+ QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(_q_cursorPositionChanged()));
QObject::connect(control, SIGNAL(textChanged()), q, SLOT(updateMicroFocus()));
@@ -206,6 +209,16 @@ void QTextEditPrivate::_q_repaintContents(const QRectF &contentsRect)
viewport->update(r);
}
+void QTextEditPrivate::_q_cursorPositionChanged()
+{
+ Q_Q(QTextEdit);
+ emit q->cursorPositionChanged();
+#ifndef QT_NO_ACCESSIBILITY
+ QAccessibleTextCursorEvent event(q, q->textCursor().position());
+ QAccessible::updateAccessibility(&event);
+#endif
+}
+
void QTextEditPrivate::pageUpDown(QTextCursor::MoveOperation op, QTextCursor::MoveMode moveMode)
{
QTextCursor cursor = control->textCursor();
diff --git a/src/widgets/widgets/qtextedit.h b/src/widgets/widgets/qtextedit.h
index 178aa7b907..5df44da4cf 100644
--- a/src/widgets/widgets/qtextedit.h
+++ b/src/widgets/widgets/qtextedit.h
@@ -304,6 +304,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_currentCharFormatChanged(const QTextCharFormat &))
Q_PRIVATE_SLOT(d_func(), void _q_adjustScrollbars())
Q_PRIVATE_SLOT(d_func(), void _q_ensureVisible(const QRectF &))
+ Q_PRIVATE_SLOT(d_func(), void _q_cursorPositionChanged())
friend class QTextEditControl;
friend class QTextDocument;
friend class QWidgetTextControl;
diff --git a/src/widgets/widgets/qtextedit_p.h b/src/widgets/widgets/qtextedit_p.h
index d2dd81c13b..7038f16205 100644
--- a/src/widgets/widgets/qtextedit_p.h
+++ b/src/widgets/widgets/qtextedit_p.h
@@ -99,6 +99,7 @@ public:
{ control->processEvent(e, QPointF(horizontalOffset(), verticalOffset()), viewport); }
void _q_currentCharFormatChanged(const QTextCharFormat &format);
+ void _q_cursorPositionChanged();
void updateDefaultTextOption();
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp
index 2681b0ab4e..80d42e4c95 100644
--- a/src/widgets/widgets/qtoolbar.cpp
+++ b/src/widgets/widgets/qtoolbar.cpp
@@ -273,7 +273,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event)
q->initStyleOption(&opt);
if (q->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, q).contains(event->pos()) == false) {
#ifdef Q_WS_MAC
- // When using the unified toolbar on Mac OS X the user can can click and
+ // When using the unified toolbar on Mac OS X, the user can click and
// drag between toolbar contents to move the window. Make this work by
// implementing the standard mouse-dragging code and then call
// window->move() in mouseMoveEvent below.
@@ -421,13 +421,13 @@ void QToolBarPrivate::plug(const QRect &r)
or insertAction(). Groups of buttons can be separated using
addSeparator() or insertSeparator(). If a toolbar button is not
appropriate, a widget can be inserted instead using addWidget() or
- insertWidget(); examples of suitable widgets are QSpinBox,
- QDoubleSpinBox, and QComboBox. When a toolbar button is pressed it
+ insertWidget(). Examples of suitable widgets are QSpinBox,
+ QDoubleSpinBox, and QComboBox. When a toolbar button is pressed, it
emits the actionTriggered() signal.
- A toolbar can be fixed in place in a particular area (e.g. at the
- top of the window), or it can be movable (isMovable()) between
- toolbar areas; see allowedAreas() and isAreaAllowed().
+ A toolbar can be fixed in place in a particular area (e.g., at the
+ top of the window), or it can be movable between toolbar areas;
+ see setMovable(), isMovable(), allowedAreas() and isAreaAllowed().
When a toolbar is resized in such a way that it is too small to
show all the items it contains, an extension button will appear as
@@ -454,7 +454,7 @@ void QToolBarPrivate::plug(const QRect &r)
\fn void QToolBar::addAction(QAction *action)
\overload
- Appends the action \a action to the toolbar's list of actions.
+ Appends the \a action to the toolbar's list of actions.
\sa QMenu::addAction(), QWidget::addAction()
*/
@@ -464,7 +464,7 @@ void QToolBarPrivate::plug(const QRect &r)
This signal is emitted when an action in this toolbar is triggered.
This happens when the action's tool button is pressed, or when the
- action is triggered in some other way outside the tool bar. The parameter
+ action is triggered in some other way outside the toolbar. The parameter
holds the triggered \a action.
*/
@@ -481,7 +481,7 @@ void QToolBarPrivate::plug(const QRect &r)
/*!
\fn void QToolBar::iconSizeChanged(const QSize &iconSize)
- This signal is emitted when the icon size is changed. The \a
+ This signal is emitted when the icon size is changed. The \a
iconSize parameter holds the toolbar's new icon size.
\sa iconSize, QMainWindow::iconSize
@@ -501,7 +501,7 @@ void QToolBarPrivate::plug(const QRect &r)
\fn void QToolBar::orientationChanged(Qt::Orientation orientation)
This signal is emitted when the orientation of the toolbar changes.
- The new orientation is specified by the \a orientation given.
+ The \a orientation parameter holds the toolbar's new orientation.
\sa orientation
*/
@@ -583,7 +583,7 @@ QToolBar::~QToolBar()
/*! \property QToolBar::movable
\brief whether the user can move the toolbar within the toolbar area,
- or between toolbar areas
+ or between toolbar areas.
By default, this property is true.
@@ -681,8 +681,8 @@ Qt::ToolBarAreas QToolBar::allowedAreas() const
This function should not be used when the toolbar is managed
by QMainWindow. You can use QMainWindow::addToolBar() or
- QMainWindow::insertToolBar() if you wish to move a toolbar (that
- is already added to a main window) to another Qt::ToolBarArea.
+ QMainWindow::insertToolBar() if you wish to move a toolbar that
+ is already added to a main window to another Qt::ToolBarArea.
*/
void QToolBar::setOrientation(Qt::Orientation orientation)
@@ -833,7 +833,7 @@ QAction *QToolBar::addAction(const QString &text,
/*!
\overload
- Creates a new action with the icon \a icon and text \a text. This
+ Creates a new action with the given \a icon and \a text. This
action is added to the end of the toolbar. The action's
\l{QAction::triggered()}{triggered()} signal is connected to \a
member in \a receiver.
@@ -880,7 +880,7 @@ QAction *QToolBar::insertSeparator(QAction *before)
The toolbar takes ownership of \a widget.
- If you add a QToolButton with this method, the tools bar's
+ If you add a QToolButton with this method, the toolbar's
Qt::ToolButtonStyle will not be respected.
\note You should use QAction::setVisible() to change the