UI: Tweak selected items highlighting.

This commit is contained in:
Nodir Temirkhodjaev 2019-04-22 13:36:52 +05:00
parent de1c60d267
commit d766d0084a
8 changed files with 31 additions and 13 deletions

View File

@ -16,6 +16,7 @@
<file>qml/controls/SpinDouble.qml</file>
<file>qml/controls/SpinDoubleRow.qml</file>
<file>qml/controls/SwipeViewControl.qml</file>
<file>qml/controls/TabBarControl.qml</file>
<file>qml/controls/TextAreaFrame.qml</file>
<file>qml/controls/TextContextMenu.qml</file>
<file>qml/controls/TextFieldFrame.qml</file>

View File

@ -19,12 +19,12 @@ ListView {
highlight: Item {
Rectangle {
anchors.fill: parent
anchors.margins: 1 - listView.spacing / 2 - border.width
radius: 2
border.width: 3
border.color: palette.highlight
color: "transparent"
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.margins: -8
width: 3
color: palette.highlight
}
}

View File

@ -0,0 +1,14 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
TabBar {
id: tabBar
Rectangle {
parent: tabBar.currentItem
anchors.left: parent.left
anchors.right: parent.right
height: 3
color: palette.highlight
}
}

View File

@ -10,7 +10,7 @@ BasePage {
ColumnLayout {
anchors.fill: parent
TabBar {
TabBarControl {
id: barGroups
Layout.fillWidth: true

View File

@ -109,7 +109,7 @@ BasePage {
}
}
TabBar {
TabBarControl {
id: barGroups
Layout.fillWidth: true
clip: true

View File

@ -71,7 +71,7 @@ Page {
tabBar.currentItem.forceActiveFocus();
}
header: TabBar {
header: TabBarControl {
id: tabBar
currentIndex: swipeView.currentIndex

View File

@ -188,7 +188,7 @@ BasePage {
Layout.fillHeight: true
spacing: 10
TabBar {
TabBarControl {
id: tabBar
Layout.fillWidth: true

View File

@ -19,21 +19,24 @@ ListViewControl {
width: appListView.width
spacing: 6
readonly property string appPath: display
readonly property bool isCurrent: ListView.isCurrentItem
readonly property int iconWidth: isCurrent ? 32 : 22
readonly property string appPath: display
readonly property var appInfo:
appInfoCache.infoTrigger && appInfoCache.appInfo(appPath)
Image {
Layout.topMargin: 1
Layout.preferredWidth: 22
Layout.preferredHeight: 22
Layout.preferredWidth: appItem.iconWidth
Layout.preferredHeight: appItem.iconWidth
source: (!appItem.appPath && emptyIcon)
|| appInfo.iconPath
|| "qrc:/images/application.png"
}
Label {
Layout.fillWidth: true
color: appItem.isCurrent ? palette.highlight : palette.windowText
font.pixelSize: 18
elide: Text.ElideRight
text: (!appItem.appPath && emptyText)