diff --git a/desktopswitchers/previews/contents/ui/main.qml b/desktopswitchers/previews/contents/ui/main.qml --- a/desktopswitchers/previews/contents/ui/main.qml +++ b/desktopswitchers/previews/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -116,7 +117,7 @@ bottom: parent.bottom topMargin: hoverItem.margins.bottom } - Text { + PlasmaComponents.Label { function constrainWidth() { if (textItem.width > textItem.maxWidth && textItem.width > 0 && textItem.maxWidth > 0) { textItem.width = textItem.maxWidth; @@ -132,11 +133,8 @@ text: listView.currentItem ? listView.currentItem.caption : "" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - color: theme.textColor elide: Text.ElideMiddle - font { - bold: true - } + font.weight: Font.Bold anchors { verticalCenter: parent.verticalCenter horizontalCenter: parent.horizontalCenter diff --git a/windowswitchers/big_icons/contents/ui/main.qml b/windowswitchers/big_icons/contents/ui/main.qml --- a/windowswitchers/big_icons/contents/ui/main.qml +++ b/windowswitchers/big_icons/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -66,7 +67,7 @@ right: parent.right bottom: parent.bottom } - Text { + PlasmaComponents.Label { function constrainWidth() { if (textItem.width > textItem.maxWidth && textItem.width > 0 && textItem.maxWidth > 0) { textItem.width = textItem.maxWidth; @@ -82,11 +83,8 @@ text: icons.currentItem ? icons.currentItem.caption : "" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - color: theme.textColor elide: Text.ElideMiddle - font { - bold: true - } + font.weight: Font.Bold anchors { verticalCenter: parent.verticalCenter horizontalCenter: parent.horizontalCenter diff --git a/windowswitchers/compact/contents/ui/main.qml b/windowswitchers/compact/contents/ui/main.qml --- a/windowswitchers/compact/contents/ui/main.qml +++ b/windowswitchers/compact/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -87,13 +88,12 @@ leftMargin: hoverItem.margins.left } } - Text { + PlasmaComponents.Label { id: captionItem horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignBottom text: dialogMainItem.itemCaption(caption, minimized) - font.bold: index == compactListView.currentIndex - color: theme.textColor + font.weight: index === compactListView.currentIndex ? Font.Bold : Font.Normal elide: Text.ElideMiddle anchors { left: iconItem.right diff --git a/windowswitchers/informative/contents/ui/main.qml b/windowswitchers/informative/contents/ui/main.qml --- a/windowswitchers/informative/contents/ui/main.qml +++ b/windowswitchers/informative/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -74,13 +75,12 @@ leftMargin: hoverItem.margins.left } } - Text { + PlasmaComponents.Label { id: captionItem horizontalAlignment: Text.AlignHCenter text: listView.itemCaption(caption, minimized) - font.bold: true + font.weight: Font.Bold font.italic: minimized - color: theme.textColor elide: Text.ElideMiddle anchors { left: iconItem.right @@ -90,13 +90,11 @@ rightMargin: hoverItem.margins.right } } - Text { + PlasmaComponents.Label { id: desktopNameItem horizontalAlignment: Text.AlignHCenter text: desktopName - font.bold: false font.italic: true - color: theme.textColor elide: Text.ElideMiddle visible: tabBox.allDesktops anchors { diff --git a/windowswitchers/present_windows/contents/ui/main.qml b/windowswitchers/present_windows/contents/ui/main.qml --- a/windowswitchers/present_windows/contents/ui/main.qml +++ b/windowswitchers/present_windows/contents/ui/main.qml @@ -20,6 +20,7 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -105,11 +106,10 @@ Layout.preferredWidth: iconSize Layout.preferredHeight: iconSize } - Text { + PlasmaComponents.Label { text: caption font.italic: minimized - font.bold: index == thumbnailListView.currentIndex - color: theme.textColor + font.weight: index === thumbnailListView.currentIndex ? Font.Bold : Font.Normal elide: Text.ElideMiddle Layout.fillWidth: true Layout.maximumWidth: captionItem.maximumWidth - iconItem.iconSize - captionItem.spacing * 2 diff --git a/windowswitchers/small_icons/contents/ui/main.qml b/windowswitchers/small_icons/contents/ui/main.qml --- a/windowswitchers/small_icons/contents/ui/main.qml +++ b/windowswitchers/small_icons/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -65,17 +66,14 @@ right: parent.right bottom: parent.bottom } - Text { + PlasmaComponents.Label { id: textItem text: icons.currentItem ? icons.currentItem.caption : "" height: paintedHeight horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - color: theme.textColor elide: Text.ElideMiddle - font { - bold: true - } + font.weight: Font.Bold anchors { right: parent.right left: parent.left diff --git a/windowswitchers/text/contents/ui/main.qml b/windowswitchers/text/contents/ui/main.qml --- a/windowswitchers/text/contents/ui/main.qml +++ b/windowswitchers/text/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -61,11 +62,10 @@ id: delegateItem width: textListView.width height: textListView.rowHeight - Text { + PlasmaComponents.Label { id: captionItem horizontalAlignment: Text.AlignHCenter text: caption - color: theme.textColor elide: Text.ElideMiddle anchors { left: parent.left diff --git a/windowswitchers/thumbnails/contents/ui/main.qml b/windowswitchers/thumbnails/contents/ui/main.qml --- a/windowswitchers/thumbnails/contents/ui/main.qml +++ b/windowswitchers/thumbnails/contents/ui/main.qml @@ -19,6 +19,7 @@ *********************************************************************/ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 import org.kde.kwin 2.0 as KWin @@ -133,7 +134,7 @@ rightMargin: 4 } } - Text { + PlasmaComponents.Label { function constrainWidth() { if (textItem.width > textItem.maxWidth && textItem.width > 0 && textItem.maxWidth > 0) { textItem.width = textItem.maxWidth; @@ -149,11 +150,8 @@ text: thumbnailListView.currentItem ? thumbnailListView.currentItem.caption : "" horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - color: theme.textColor elide: Text.ElideMiddle - font { - bold: true - } + font.weight: Font.Bold anchors { verticalCenter: parent.verticalCenter horizontalCenter: parent.horizontalCenter