Skip to content

Commit

Permalink
[Statusbar] Create screenshot when press and hold cellular status icon
Browse files Browse the repository at this point in the history
  • Loading branch information
neochapay committed Dec 6, 2016
1 parent 34a897e commit 10a82b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/qml/Statusbar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import org.freedesktop.contextkit 1.0
import MeeGo.Connman 0.2
import org.nemomobile.lipstick 0.1

Item {
id: root
Expand Down Expand Up @@ -134,6 +135,17 @@ Item {
StatusbarItem {
iconSize: root.height/2
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"

MouseArea{
anchors.fill: parent
onPressAndHold: {
var screenShotPath = "/home/nemo/Pictures/Screenshots/"
var file = "glacier-screenshot-"+Qt.formatDateTime(new Date, "yyMMdd_hhmmss")+".png"

Lipstick.takeScreenshot(screenShotPath + file);
}
}

}

StatusbarItem {
Expand Down

0 comments on commit 10a82b8

Please sign in to comment.