From b2d8e1e5be8508a9a312c070ceb8c77b9497a705 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 23 May 2017 11:44:45 +0200 Subject: Doc: Replace "Macintosh" with something suitable or omit it Change-Id: I3067bd7e6ae2d6d68d5232a56eaf368a0415876c Reviewed-by: Jake Petroules --- src/widgets/doc/src/guibooks.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/doc/src/guibooks.qdoc b/src/widgets/doc/src/guibooks.qdoc index 5f68344758..30ffd0b5ec 100644 --- a/src/widgets/doc/src/guibooks.qdoc +++ b/src/widgets/doc/src/guibooks.qdoc @@ -58,7 +58,7 @@ alphabetical dictionary of widgets and other user interface elements, with comprehensive coverage of each. Each chapter covers one widget or other element, contains the most important recommendation from the - Macintosh, Windows and Motif style guides, notes about common + \macos, Windows and Motif style guides, notes about common problems, comparison with other widgets that can serve some of the same roles as this one, etc. @@ -72,7 +72,7 @@ \b{\l{http://www.amazon.com/exec/obidos/ASIN/0201622165/trolltech/t}{Macintosh Human Interface Guidelines}}, Second Edition, ISBN 0-201-62216-5, is worth buying for the \e {don't}s alone. Even - if you're not writing Macintosh software, avoiding most of what it + if you are not writing software for \macos, avoiding most of what it advises against will produce more easily comprehensible software. Doing what it tells you to do may also help. -- cgit v1.2.3 From c1b81190e2c705595a4df8a2a2d63da6f6aa95f3 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 24 Apr 2017 21:52:51 +0200 Subject: Use hasFocus() to check if the QTreeView is considered active or not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When drawing the branches in a QTreeView, it should use hasFocus() to determine if it is the active widget or not. This is how it checks when styling the other aspects of the treeview, so the branches should be done in line with this. Change-Id: Id721401424ad95e9fc7ffbdc991e53b5f7feac01 Reviewed-by: Thorbjørn Lund Martsum --- src/widgets/itemviews/qtreeview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 9583dd9657..f139fb2d5b 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -1818,7 +1818,7 @@ void QTreeView::drawBranches(QPainter *painter, const QRect &rect, QStyle::State extraFlags = QStyle::State_None; if (isEnabled()) extraFlags |= QStyle::State_Enabled; - if (window()->isActiveWindow()) + if (hasFocus()) extraFlags |= QStyle::State_Active; QPoint oldBO = painter->brushOrigin(); if (verticalScrollMode() == QAbstractItemView::ScrollPerPixel) -- cgit v1.2.3