mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-06-06 14:29:18 -04:00
feat: Improve chat, status and message sending keys (#361)
This commit is contained in:
@@ -7,6 +7,8 @@ import QtQuick.Controls.Basic
|
||||
Button {
|
||||
id: control
|
||||
|
||||
property color accentColor: "transparent"
|
||||
|
||||
focusPolicy: Qt.NoFocus
|
||||
padding: 4
|
||||
|
||||
@@ -18,11 +20,15 @@ Button {
|
||||
background: Rectangle {
|
||||
id: bg
|
||||
|
||||
readonly property bool hasAccent: control.accentColor.a > 0
|
||||
|
||||
implicitHeight: 20
|
||||
|
||||
color: !control.enabled || !control.down ? control.palette.button : control.palette.dark
|
||||
border.color: !control.enabled || (!control.hovered && !control.visualFocus) ? control.palette.mid : control.palette.highlight
|
||||
border.width: 1
|
||||
border.color: bg.hasAccent
|
||||
? control.accentColor
|
||||
: (!control.enabled || (!control.hovered && !control.visualFocus) ? control.palette.mid : control.palette.highlight)
|
||||
border.width: bg.hasAccent ? 2 : 1
|
||||
radius: 4
|
||||
|
||||
Rectangle {
|
||||
@@ -35,5 +41,13 @@ Button {
|
||||
opacity: control.hovered ? 0.3 : 0.01
|
||||
Behavior on opacity {NumberAnimation{duration: 250}}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: bg
|
||||
radius: bg.radius
|
||||
color: control.accentColor
|
||||
visible: bg.hasAccent
|
||||
opacity: 0.15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user