diff options
| author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-03-20 18:00:32 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-20 19:11:08 +0100 |
| commit | 7474e973679c30db7a738d78eaac00cabd365b8c (patch) | |
| tree | cc883437a9a9a5aa6459429ae9c6c1a44e5aa21f | |
| parent | 0119e8d86e3ee23c7eb0ed21d54ff11036c06d64 (diff) | |
Fix tab rendering on Windows and Fusion
Its not perfect but looks way better...
Change-Id: I0daa21471589138b3cec805e4f7c8e0375d07e3e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| -rw-r--r-- | src/private/qstyleitem.cpp | 2 | ||||
| -rw-r--r-- | src/styles/Desktop/TabViewStyle.qml | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/private/qstyleitem.cpp b/src/private/qstyleitem.cpp index 1e50d3726..5c858c91f 100644 --- a/src/private/qstyleitem.cpp +++ b/src/private/qstyleitem.cpp @@ -541,7 +541,7 @@ void QStyleItem::initStyleOption() m_styleoption = new QStyleOption(); m_styleoption->styleObject = this; - m_styleoption->rect = QRect(m_paintMargins, m_paintMargins, width() - 2* m_paintMargins, height() - 2 * m_paintMargins); + m_styleoption->rect = QRect(m_paintMargins, 0, width() - 2* m_paintMargins, height()); if (isEnabled()) { m_styleoption->state |= QStyle::State_Enabled; diff --git a/src/styles/Desktop/TabViewStyle.qml b/src/styles/Desktop/TabViewStyle.qml index aff9cc10f..04b742417 100644 --- a/src/styles/Desktop/TabViewStyle.qml +++ b/src/styles/Desktop/TabViewStyle.qml @@ -83,9 +83,12 @@ Style { id: styleitem elementType: "tab" + paintMargins: 2 anchors.fill: parent - anchors.leftMargin: (selected && style == "mac") ? -1 : 0 + anchors.rightMargin: -paintMargins + (style == "mac" ? -1 : 0) + anchors.bottomMargin: -1 + anchors.leftMargin: -paintMargins hints: [tabPosition, tabpos, selectedpos] @@ -93,7 +96,6 @@ Style { text: elidedText(title, tabbarItem.elide, width - item.tabHSpace) hover: tab.hover hasFocus: tabbarItem.activeFocus && selected - anchors.margins: paintMargins Text { id: textitem |
