Skip to content

Commit

Permalink
Merge pull request #47 from neochapay/master
Browse files Browse the repository at this point in the history
Update code
  • Loading branch information
locusf authored Dec 6, 2016
2 parents fdad8f2 + 10a82b8 commit 967d93c
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/qml/AppLauncher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GridView {
id: launcherItem
width: gridview.cellWidth
height: gridview.cellHeight
source: model.object.iconId == "" ? ":/images/icons/apps.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId
source: model.object.iconId == "" ? "/usr/share/lipstick-glacier-home-qt5/qml/theme/default_icon.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId
iconCaption: model.object.title
}
}
2 changes: 1 addition & 1 deletion src/qml/CloseButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Image {
id: closeButton
signal clicked()

source: 'qrc:/qml/theme/icon-m-framework-close-thumbnail.png'
source: '/usr/share/lipstick-glacier-home-qt5/qml/theme/icon-m-framework-close-thumbnail.png'

MouseArea {
anchors.fill: parent
Expand Down
2 changes: 1 addition & 1 deletion src/qml/Lockscreen.qml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Image {
ConfigurationValue{
id: lockScreenWallpaper
key: "/home/glacier/lockScreen/wallpaperImage"
defaultValue: "qrc:/qml/images/graphics-wallpaper-home.jpg"
defaultValue: "/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg"
}

LockscreenClock {
Expand Down
4 changes: 2 additions & 2 deletions src/qml/MainScreen.qml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Page {
ConfigurationValue {
id: wallpaperSource
key: desktop.isPortrait ? "/desktop/meego/background/portrait/picture_filename" : "/desktop/meego/background/landscape/picture_filename"
defaultValue: "qrc:/qml/images/graphics-wallpaper-home.jpg"
defaultValue: "/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg"
}
id: desktop
property alias lockscreen: lockScreen
Expand Down Expand Up @@ -145,7 +145,7 @@ Page {
}
Image {
id:wallpaper
source: "qrc:/qml/images/wallpaper-portrait-bubbles.png"
source: "/usr/share/lipstick-glacier-home-qt5/qml/images/wallpaper-portrait-bubbles.png"
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
z: -100
Expand Down
2 changes: 1 addition & 1 deletion src/qml/NotificationPreview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Item {
}
width: notificationArea.notificationIconSize
height: width
source: "qrc:/qml/images/notification-circle.png"
source: "/usr/share/lipstick-glacier-home-qt5/qml/images/notification-circle.png"
}

Text {
Expand Down
28 changes: 20 additions & 8 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 Expand Up @@ -226,21 +238,21 @@ Item {
panel: BatteryPanel {}
source: {
if(batteryChargePercentage.value > 85) {
return "qrc:/qml/images/battery6.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery6.png"
} else if (batteryChargePercentage.value <= 5) {
return "qrc:/qml/images/battery0.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery0.png"
} else if (batteryChargePercentage.value <= 10) {
return "qrc:/qml/images/battery1.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery1.png"
} else if (batteryChargePercentage.value <= 25) {
return "qrc:/qml/images/battery2.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery2.png"
} else if (batteryChargePercentage.value <= 40) {
return "qrc:/qml/images/battery3.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/imagesbattery3.png"
} else if (batteryChargePercentage.value <= 65) {
return "qrc:/qml/images/battery4.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery4.png"
} else if (batteryChargePercentage.value <= 80) {
return "qrc:/qml/images/battery5.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery5.png"
} else {
return "qrc:/qml/images/battery6.png"
return "/usr/share/lipstick-glacier-home-qt5/qml/images/battery6.png"
}
}
}
Expand Down
Binary file added src/qml/theme/default_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 8 additions & 4 deletions src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ target.path = /usr/bin
styles.path = /usr/share/lipstick-glacier-home-qt5
styles.files = nemovars.conf

images.path = /usr/share/lipstick-glacier-home-qt5/qml/images
images.files = qml/images/*.png \
qml/images/*.jpg

theme.path = /usr/share/lipstick-glacier-home-qt5/qml/theme
theme.files = qml/theme/*.png

qml.path = /usr/share/lipstick-glacier-home-qt5/qml
qml.files = qml/MainScreen.qml \
qml/compositor.qml \
Expand Down Expand Up @@ -60,7 +67,7 @@ connectivity.files = qml/USBModeSelector.qml
notifications.path = /usr/share/lipstick-glacier-home-qt5/qml/notifications
notifications.files = qml/NotificationPreview.qml

INSTALLS += styles qml qmlcompositor scripts system volumecontrol connectivity notifications
INSTALLS += styles images theme qml qmlcompositor scripts system volumecontrol connectivity notifications

CONFIG += qt link_pkgconfig
QT += quick compositor
Expand All @@ -74,9 +81,6 @@ SOURCES += \
main.cpp \
glacierwindowmodel.cpp

RESOURCES += \
resources-qml.qrc

PKGCONFIG += lipstick-qt5

OTHER_FILES += qml/*.qml \
Expand Down

0 comments on commit 967d93c

Please sign in to comment.