Reworked the bar display colors/capsule, etc...
This commit is contained in:
parent
7d3dc9c815
commit
81eff0d234
22 changed files with 156 additions and 108 deletions
|
|
@ -12,12 +12,17 @@ Rectangle {
|
|||
property real size: Style.baseWidgetSize * sizeMultiplier * scaling
|
||||
property string icon
|
||||
property string tooltipText
|
||||
property bool showBorder: true
|
||||
property bool showFilled: false
|
||||
property bool enabled: true
|
||||
property bool hovering: false
|
||||
property real fontPointSize: Style.fontSizeM
|
||||
|
||||
property color colorBg: Color.mSurfaceVariant
|
||||
property color colorFg: Color.mPrimary
|
||||
property color colorBgHover: Color.mPrimary
|
||||
property color colorFgHover: Color.mOnPrimary
|
||||
property color colorBorder: Color.mOutline
|
||||
property color colorBorderHover: Color.mOutline
|
||||
|
||||
signal entered
|
||||
signal exited
|
||||
signal clicked
|
||||
|
|
@ -25,9 +30,9 @@ Rectangle {
|
|||
implicitWidth: size
|
||||
implicitHeight: size
|
||||
|
||||
color: (root.hovering || showFilled) ? Color.mPrimary : Color.transparent
|
||||
color: root.hovering ? colorBgHover : colorBg
|
||||
radius: width * 0.5
|
||||
border.color: showBorder ? Color.mPrimary : Color.transparent
|
||||
border.color: root.hovering ? colorBorderHover : colorBorder
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
|
||||
NIcon {
|
||||
|
|
@ -37,7 +42,7 @@ Rectangle {
|
|||
anchors.verticalCenterOffset: 0
|
||||
text: root.icon
|
||||
font.pointSize: root.fontPointSize * scaling
|
||||
color: (root.hovering || showFilled) ? Color.mOnPrimary : showBorder ? Color.mPrimary : Color.mOnSurface
|
||||
color: root.hovering ? colorFgHover : colorFg
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
opacity: root.enabled ? Style.opacityFull : Style.opacityMedium
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Item {
|
|||
width: iconSize
|
||||
height: iconSize
|
||||
radius: width * 0.5
|
||||
color: showPill ? iconCircleColor : Color.transparent
|
||||
color: showPill ? iconCircleColor : Color.mSurfaceVariant
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ Item {
|
|||
NIcon {
|
||||
text: root.icon
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: showPill ? iconTextColor : collapsedIconColor
|
||||
color: showPill ? iconTextColor : Color.mOnSurface
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue