mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:25:20 +00:00
UI: Tweak selected items highlighting.
This commit is contained in:
parent
de1c60d267
commit
d766d0084a
@ -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>
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
14
src/ui/qml/controls/TabBarControl.qml
Normal file
14
src/ui/qml/controls/TabBarControl.qml
Normal 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
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ BasePage {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
TabBar {
|
||||
TabBarControl {
|
||||
id: barGroups
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
@ -109,7 +109,7 @@ BasePage {
|
||||
}
|
||||
}
|
||||
|
||||
TabBar {
|
||||
TabBarControl {
|
||||
id: barGroups
|
||||
Layout.fillWidth: true
|
||||
clip: true
|
||||
|
@ -71,7 +71,7 @@ Page {
|
||||
tabBar.currentItem.forceActiveFocus();
|
||||
}
|
||||
|
||||
header: TabBar {
|
||||
header: TabBarControl {
|
||||
id: tabBar
|
||||
currentIndex: swipeView.currentIndex
|
||||
|
||||
|
@ -188,7 +188,7 @@ BasePage {
|
||||
Layout.fillHeight: true
|
||||
spacing: 10
|
||||
|
||||
TabBar {
|
||||
TabBarControl {
|
||||
id: tabBar
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user