Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/LockOsd.qml
Show All 40 Lines | 24 | PlasmaCore.FrameSvgItem { | |||
---|---|---|---|---|---|
41 | height: osdItem.height + margins.top + margins.bottom | 41 | height: osdItem.height + margins.top + margins.bottom | ||
42 | imagePath: "widgets/background" | 42 | imagePath: "widgets/background" | ||
43 | 43 | | |||
44 | function show() { | 44 | function show() { | ||
45 | osd.visible = true; | 45 | osd.visible = true; | ||
46 | hideTimer.restart(); | 46 | hideTimer.restart(); | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | // avoid leaking ColorScope of lock screen theme into the OSD "popup" | ||||
50 | PlasmaCore.ColorScope { | ||||
51 | width: osdItem.width | ||||
52 | height: osdItem.height | ||||
53 | anchors.centerIn: parent | ||||
54 | colorGroup: PlasmaCore.Theme.NormalColorGroup | ||||
55 | | ||||
49 | OsdItem { | 56 | OsdItem { | ||
50 | id: osdItem | 57 | id: osdItem | ||
51 | rootItem: osd | 58 | rootItem: osd | ||
52 | 59 | } | |||
53 | anchors.centerIn: parent | | |||
54 | } | 60 | } | ||
55 | 61 | | |||
56 | Timer { | 62 | Timer { | ||
57 | id: hideTimer | 63 | id: hideTimer | ||
58 | interval: osd.timeout | 64 | interval: osd.timeout | ||
59 | onTriggered: { | 65 | onTriggered: { | ||
60 | osd.visible = false; | 66 | osd.visible = false; | ||
61 | osd.icon = ""; | 67 | osd.icon = ""; | ||
62 | osd.osdValue = 0; | 68 | osd.osdValue = 0; | ||
63 | } | 69 | } | ||
64 | } | 70 | } | ||
65 | } | 71 | } |