Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
glacier-home
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
glacier-home
Commits
fb80d554
Unverified
Commit
fb80d554
authored
Mar 11, 2018
by
Aleksi Suomalainen
Committed by
GitHub
Mar 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70 from neochapay/wallpapper_setup
[Home] set wallpaper is configurable
parents
4622bc51
848ca3ef
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
243 additions
and
8 deletions
+243
-8
lipstick-glacier-home-qt5.spec
rpm/lipstick-glacier-home-qt5.spec
+3
-0
main.cpp
src/main.cpp
+0
-1
Lockscreen.qml
src/qml/Lockscreen.qml
+8
-2
MainScreen.qml
src/qml/MainScreen.qml
+3
-3
selectImage.qml
src/settings-plugins/wallpaper/selectImage.qml
+66
-0
wallpaper.json
src/settings-plugins/wallpaper/wallpaper.json
+5
-0
wallpaper.qml
src/settings-plugins/wallpaper/wallpaper.qml
+142
-0
wallpaper.svg
src/settings-plugins/wallpaper/wallpaper.svg
+2
-0
src.pro
src/src.pro
+14
-2
No files found.
rpm/lipstick-glacier-home-qt5.spec
View file @
fb80d554
...
@@ -22,6 +22,8 @@ Requires: libqofono-qt5-declarative
...
@@ -22,6 +22,8 @@ Requires: libqofono-qt5-declarative
Requires: nemo-theme-glacier
Requires: nemo-theme-glacier
Requires: google-opensans-fonts
Requires: google-opensans-fonts
Requires: mpris-qt5-qml-plugin
Requires: mpris-qt5-qml-plugin
Requires: glacier-settings
Requires: glacier-gallery-qmlplugin
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Quick)
...
@@ -63,6 +65,7 @@ ln -s ../lipstick.service %{buildroot}%{_libdir}/systemd/user/user-session.targe
...
@@ -63,6 +65,7 @@ ln -s ../lipstick.service %{buildroot}%{_libdir}/systemd/user/user-session.targe
%{_libdir}/systemd/user/user-session.target.wants/lipstick.service
%{_libdir}/systemd/user/user-session.target.wants/lipstick.service
%{_datadir}/lipstick-glacier-home-qt5/nemovars.conf
%{_datadir}/lipstick-glacier-home-qt5/nemovars.conf
%{_datadir}/lipstick-glacier-home-qt5/qml
%{_datadir}/lipstick-glacier-home-qt5/qml
%{_datadir}/glacier-settings/
%post
%post
systemctl-user --no-block restart lipstick.service
systemctl-user --no-block restart lipstick.service
src/main.cpp
View file @
fb80d554
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#include "glacierwindowmodel.h"
#include "glacierwindowmodel.h"
#include <QScreen>
#include <QScreen>
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
HomeApplication
app
(
argc
,
argv
,
QString
());
HomeApplication
app
(
argc
,
argv
,
QString
());
...
...
src/qml/Lockscreen.qml
View file @
fb80d554
...
@@ -5,7 +5,6 @@ import org.nemomobile.devicelock 1.0
...
@@ -5,7 +5,6 @@ import org.nemomobile.devicelock 1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
configuration
1.0
import
"
notifications
"
import
"
notifications
"
Image
{
Image
{
id
:
lockScreen
id
:
lockScreen
source
:
lockScreenWallpaper
.
value
source
:
lockScreenWallpaper
.
value
...
@@ -13,11 +12,18 @@ Image {
...
@@ -13,11 +12,18 @@ Image {
property
bool
displayOn
property
bool
displayOn
ConfigurationValue
{
id
:
differentWallpaper
key
:
"
/home/glacier/differentWallpaper
"
defaultValue
:
true
}
ConfigurationValue
{
ConfigurationValue
{
id
:
lockScreenWallpaper
id
:
lockScreenWallpaper
key
:
"
/home/glacier/lock
Screen/wallpaperImage
"
key
:
(
differentWallpaper
.
value
==
true
)
?
"
/home/glacier/lockScreen/wallpaperImage
"
:
"
/home/glacier/home
Screen/wallpaperImage
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
}
}
LockscreenClock
{
LockscreenClock
{
id
:
clock
id
:
clock
anchors
{
anchors
{
...
...
src/qml/MainScreen.qml
View file @
fb80d554
...
@@ -60,8 +60,8 @@ Page {
...
@@ -60,8 +60,8 @@ Page {
// This is used in the lock screen
// This is used in the lock screen
ConfigurationValue
{
ConfigurationValue
{
id
:
wallpaperSource
id
:
wallpaperSource
key
:
desktop
.
isPortrait
?
"
/desktop/meego/background/portrait/picture_filename
"
:
"
/desktop/meego/background/landscape/picture_filenam
e
"
key
:
"
/home/glacier/homeScreen/wallpaperImag
e
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/
graphics-wallpaper-home.jp
g
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/
wallpaper-portrait-bubbles.pn
g
"
}
}
id
:
desktop
id
:
desktop
property
alias
lockscreen
:
lockScreen
property
alias
lockscreen
:
lockScreen
...
@@ -157,7 +157,7 @@ Page {
...
@@ -157,7 +157,7 @@ Page {
}
}
Image
{
Image
{
id
:
wallpaper
id
:
wallpaper
source
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/wallpaper-portrait-bubbles.png
"
source
:
wallpaperSource
.
value
anchors.fill
:
parent
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectCrop
fillMode
:
Image
.
PreserveAspectCrop
z
:
-
100
z
:
-
100
...
...
src/settings-plugins/wallpaper/selectImage.qml
0 → 100644
View file @
fb80d554
/*
* Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.6
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
org
.
nemomobile
.
configuration
1.0
import
org
.
nemomobile
.
gallery
1.0
import
"
../../components
"
Page
{
id
:
wallpaperSelectPage
headerTools
:
HeaderToolsLayout
{
showBackButton
:
true
;
title
:
qsTr
(
"
Select wallpaper
"
)}
property
string
valueKey
:
""
ConfigurationValue
{
id
:
wallpaper
key
:
wallpaperSelectPage
.
valueKey
}
GalleryView
{
anchors
{
fill
:
parent
topMargin
:
Theme
.
itemSpacingLarge
}
baseThumbnailSize
:
(
parent
.
height
>
parent
.
width
)
?
parent
.
width
/
4
:
parent
.
height
/
4
model
:
GalleryModel
{
id
:
gallery
}
delegate
:
GalleryDelegate
{
MouseArea
{
anchors.fill
:
parent
onPressAndHold
:
{
wallpaper
.
value
=
url
pageStack
.
pop
();
}
}
}
}
Component
.
onCompleted
:
{
gallery
.
createFilter
(
gallery
,
"
imagesfilter
"
,
"
GalleryStartsWithFilter
"
,
"
mimeType
"
,
"
image/
"
)
}
}
src/settings-plugins/wallpaper/wallpaper.json
0 → 100644
View file @
fb80d554
{
"path"
:
"wallpaper"
,
"category"
:
"Personalization"
,
"title"
:
"Wallpaper"
}
src/settings-plugins/wallpaper/wallpaper.qml
0 → 100644
View file @
fb80d554
/*
* Copyright (C) 2018 Chupligin Sergey <neochapay@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import
QtQuick
2.6
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
org
.
nemomobile
.
configuration
1.0
import
"
../../components
"
Page
{
id
:
wallpaperSettingsPage
headerTools
:
HeaderToolsLayout
{
showBackButton
:
true
;
title
:
qsTr
(
"
Wallpapers
"
)}
ConfigurationValue
{
id
:
differentWallpaper
key
:
"
/home/glacier/differentWallpaper
"
defaultValue
:
true
}
ConfigurationValue
{
id
:
homeWallpaperImage
key
:
"
/home/glacier/homeScreen/wallpaperImage
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/wallpaper-portrait-bubbles.png
"
}
ConfigurationValue
{
id
:
lockScreenWallpaperImage
key
:
"
/home/glacier/lockScreen/wallpaperImage
"
defaultValue
:
"
/usr/share/lipstick-glacier-home-qt5/qml/images/graphics-wallpaper-home.jpg
"
}
SettingsColumn
{
id
:
differentImagesSettings
Rectangle
{
id
:
differentImages
width
:
parent
.
width
height
:
childrenRect
.
height
color
:
"
transparent
"
Label
{
id
:
differentImagesLabel
text
:
qsTr
(
"
Use different images for lockscreen and home screen
"
);
anchors
{
left
:
parent
.
left
top
:
parent
.
top
}
width
:
parent
.
width
-
differentImagesCheck
.
width
wrapMode
:
Text
.
WordWrap
}
CheckBox
{
id
:
differentImagesCheck
checked
:
differentWallpaper
.
value
anchors
{
right
:
parent
.
right
verticalCenter
:
differentImagesLabel
.
verticalCenter
}
onClicked
:
differentWallpaper
.
value
=
checked
}
}
Rectangle
{
id
:
homeWallpaper
width
:
parent
.
width
height
:
width
/
4
color
:
"
transparent
"
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectCrop
source
:
homeWallpaperImage
.
value
Text
{
text
:
(
differentWallpaper
.
value
==
true
)
?
qsTr
(
"
Homescreen wallpaper
"
)
:
qsTr
(
"
Wallpaper
"
)
color
:
Theme
.
textColor
styleColor
:
Theme
.
backgroundColor
style
:
Text
.
Outline
;
anchors.centerIn
:
parent
font.pixelSize
:
Theme
.
fontSizeLarge
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
pageStack
.
push
(
"
/usr/share/glacier-settings/qml/plugins/wallpaper/selectImage.qml
"
,{
valueKey
:
"
/home/glacier/homeScreen/wallpaperImage
"
})
}
}
}
Rectangle
{
id
:
lockScreenWallpaper
width
:
parent
.
width
height
:
width
/
4
color
:
"
transparent
"
visible
:
differentWallpaper
.
value
==
true
Image
{
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectCrop
source
:
lockScreenWallpaperImage
.
value
Text
{
text
:
qsTr
(
"
Lockscreen wallpaper
"
)
color
:
Theme
.
textColor
styleColor
:
Theme
.
backgroundColor
style
:
Text
.
Outline
;
anchors.centerIn
:
parent
font.pixelSize
:
Theme
.
fontSizeLarge
}
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
pageStack
.
push
(
"
/usr/share/glacier-settings/qml/plugins/wallpaper/selectImage.qml
"
,{
valueKey
:
"
/home/glacier/lockScreen/wallpaperImage
"
})
}
}
}
}
src/settings-plugins/wallpaper/wallpaper.svg
0 → 100644
View file @
fb80d554
<?xml version="1.0" encoding="utf-8"?>
<svg
width=
"2048"
height=
"1792"
viewBox=
"0 0 2048 1792"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M704 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z"
fill=
"#fff"
/></svg>
\ No newline at end of file
src/src.pro
View file @
fb80d554
...
@@ -83,6 +83,15 @@ statusbar.files = qml/statusbar/BatteryPanel.qml\
...
@@ -83,6 +83,15 @@ statusbar.files = qml/statusbar/BatteryPanel.qml\
qml/statusbar/NumButton.qml \
qml/statusbar/NumButton.qml \
qml/statusbar/MediaController.qml
qml/statusbar/MediaController.qml
settingsplugin.files = settings-plugins/wallpaper/wallpaper.qml \
settings-plugins/wallpaper/selectImage.qml \
settings-plugins/wallpaper/wallpaper.svg
settingsplugin.path = /usr/share/glacier-settings/qml/plugins/wallpaper
settingspluginconfig.files = settings-plugins/wallpaper/wallpaper.json
settingspluginconfig.path = /usr/share/glacier-settings/plugins
INSTALLS += styles \
INSTALLS += styles \
images \
images \
theme \
theme \
...
@@ -93,7 +102,9 @@ INSTALLS += styles \
...
@@ -93,7 +102,9 @@ INSTALLS += styles \
volumecontrol\
volumecontrol\
connectivity\
connectivity\
notifications\
notifications\
statusbar
statusbar\
settingsplugin\
settingspluginconfig
CONFIG += qt link_pkgconfig
CONFIG += qt link_pkgconfig
QT += quick compositor
QT += quick compositor
...
@@ -146,4 +157,5 @@ TRANSLATIONS += i18n/glacer-home.ts
...
@@ -146,4 +157,5 @@ TRANSLATIONS += i18n/glacer-home.ts
DISTFILES += \
DISTFILES += \
i18n/glacer-home.ts \
i18n/glacer-home.ts \
qml/connectivity/ConnectionSelector.qml \
qml/connectivity/ConnectionSelector.qml \
qml/statusbar/BatteryIndicator.qml
qml/statusbar/BatteryIndicator.qml \
settings-plugins/wallpaper/selectImage.qml
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment