Compare commits
2 commits
c82163304c
...
6b87dc8006
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b87dc8006 | ||
|
|
781ad7a5bc |
2 changed files with 14 additions and 15 deletions
|
|
@ -10,6 +10,8 @@ RoundButton {
|
||||||
source: "../assets/lucide.woff"
|
source: "../assets/lucide.woff"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property alias border: rect.border
|
||||||
|
|
||||||
font.family: loader.font.family
|
font.family: loader.font.family
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
radius: 8
|
radius: 8
|
||||||
|
|
@ -31,6 +33,14 @@ RoundButton {
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
|
id: rect
|
||||||
|
border.color: control.hovered ? Theme.palette.primary : Theme.palette.base100
|
||||||
|
Behavior on border.color {
|
||||||
|
ColorAnimation {
|
||||||
|
duration: 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
border.width: 2
|
||||||
color: control.hovered ? Theme.palette.primary : Theme.palette.base100
|
color: control.hovered ? Theme.palette.primary : Theme.palette.base100
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,15 @@
|
||||||
|
import qs.components
|
||||||
import qs.config
|
import qs.config
|
||||||
import qs.constants
|
import qs.constants
|
||||||
import qs.services
|
import qs.services
|
||||||
import qs.widgets
|
|
||||||
|
|
||||||
StyledButton {
|
StyledIconButton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
border.color: Caffeine.enabled ? Theme.palette.secondary : 'transparent'
|
border.color: Caffeine.enabled ? Theme.palette.secondary : root.hovered ? Theme.palette.primary : Theme.palette.base100
|
||||||
border.width: 2
|
text: Icons.coffee
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Caffeine.toggle();
|
Caffeine.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
content: StyledText {
|
|
||||||
id: text
|
|
||||||
|
|
||||||
font.family: Theme.lucide.font.family
|
|
||||||
font.pixelSize: Dimensions.caffeine.fontSize
|
|
||||||
font.bold: true
|
|
||||||
text: Icons.coffee
|
|
||||||
|
|
||||||
color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue