add accentColor property to BarIcon and BarLabel for proper color propagation
This commit is contained in:
parent
b3e919514a
commit
7dbbb89455
4 changed files with 8 additions and 6 deletions
|
|
@ -7,12 +7,13 @@ Text {
|
|||
property string label: ""
|
||||
property string tooltip: ""
|
||||
property string minText: ""
|
||||
property color accentColor: parent?.accentColor ?? M.Theme.base05
|
||||
property bool _hovered: false
|
||||
|
||||
text: label
|
||||
width: minText ? Math.max(implicitWidth, _minMetrics.width) : implicitWidth
|
||||
horizontalAlignment: minText ? Text.AlignHCenter : Text.AlignLeft
|
||||
color: parent?.accentColor ?? M.Theme.base05
|
||||
color: root.accentColor
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
@ -31,7 +32,7 @@ Text {
|
|||
M.FlyoutState.text = root.tooltip;
|
||||
M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0);
|
||||
M.FlyoutState.screen = QsWindow.window?.screen ?? null;
|
||||
M.FlyoutState.accentColor = parent?.accentColor ?? root.color;
|
||||
M.FlyoutState.accentColor = root.accentColor;
|
||||
M.FlyoutState.visible = true;
|
||||
} else if (!hovered && root.tooltip !== "") {
|
||||
M.FlyoutState.visible = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue