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
50d5cd22
Commit
50d5cd22
authored
Aug 12, 2017
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AppLauncher] Fix icon scaling with Theme.iconSizeLauncher. Fix moving app icons inside of folder
parent
b2030497
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
39 deletions
+40
-39
AppLauncher.qml
src/qml/AppLauncher.qml
+9
-7
LauncherItemDelegate.qml
src/qml/LauncherItemDelegate.qml
+14
-19
LauncherItemFolder.qml
src/qml/LauncherItemFolder.qml
+11
-9
LauncherItemWrapper.qml
src/qml/LauncherItemWrapper.qml
+5
-3
SearchListView.qml
src/qml/SearchListView.qml
+1
-1
No files found.
src/qml/AppLauncher.qml
View file @
50d5cd22
...
...
@@ -34,17 +34,20 @@ import QtQuick.Controls.Styles.Nemo 1.0
GridView
{
id
:
gridview
cellWidth
:
cellSize
cellHeight
:
cellSize
width
:
parent
.
width
width
:
cellWidth
*
columns
cacheBuffer
:
gridview
.
contentHeight
property
Item
reorderItem
property
bool
onUninstall
property
alias
deleter
:
deleter
property
var
switcher
:
null
property
string
searchString
property
int
minCellSize
:
Theme
.
iconSizeLauncher
+
Theme
.
itemSpacingHuge
property
int
rows
:
Math
.
floor
(
parent
.
height
/
minCellSize
)
property
int
columns
:
Math
.
floor
(
parent
.
width
/
minCellSize
)
cellWidth
:
parent
.
width
/
columns
cellHeight
:
Math
.
round
(
parent
.
height
/
rows
)
property
int
cellSize
:
Math
.
min
(
parent
.
width
,
parent
.
height
)
/
4
property
int
folderIndex
:
-
1
property
bool
isRootFolder
:
true
property
bool
newFolderActive
...
...
@@ -260,12 +263,11 @@ GridView {
//Using loader that in the future we can also have widgets as delegate
delegate
:
Loader
{
id
:
loader
width
:
cell
Size
height
:
cell
Size
width
:
cell
Width
height
:
cell
Height
onXChanged
:
item
.
x
=
x
onYChanged
:
item
.
y
=
y
property
QtObject
modelData
:
model
property
int
cellSize
:
gridview
.
cellHeight
property
int
cellIndex
:
index
sourceComponent
:
object
.
type
==
LauncherModel
.
Folder
?
folder
:
app
}
...
...
src/qml/LauncherItemDelegate.qml
View file @
50d5cd22
...
...
@@ -67,19 +67,18 @@ Item {
Item
{
id
:
iconWrapper
width
:
parent
.
width
-
parent
.
width
/
10
height
:
width
-
iconText
.
height
anchors.centerIn
:
parent
height
:
parent
.
height
-
iconText
.
height
width
:
parent
.
width
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
Math
.
round
((
parent
.
height
-
(
height
+
iconText
.
height
))
/
2
)
Image
{
id
:
iconImage
anchors
{
// centerIn: launcherItem.n.otNemoIcon ? parent : undefined
horizontalCenter
:
/* launcherItemnotNemoIcon ? undefined : */
parent
.
horizontalCenter
top
:
parent
.
top
//topMargin: Theme.itemSpacingExtraSmall
}
width
:
/*launcherItem.notNemoIcon ? parent.width-parent.width/3 : */
parent
.
width
-
parent
.
width
/
4
height
:
width
anchors.centerIn
:
parent
sourceSize.width
:
Theme
.
iconSizeLauncher
sourceSize.height
:
Theme
.
iconSizeLauncher
height
:
Theme
.
iconSizeLauncher
width
:
height
asynchronous
:
true
onStatusChanged
:
{
if
(
iconImage
.
status
==
Image
.
Error
)
{
...
...
@@ -89,11 +88,7 @@ Item {
}
Spinner
{
id
:
spinnerr
anchors
{
centerIn
:
iconImage
top
:
iconImage
.
top
topMargin
:
Theme
.
itemSpacingExtraSmall
}
anchors.centerIn
:
iconImage
width
:
iconWrapper
.
width
height
:
width
enabled
:
(
modelData
.
object
.
type
===
LauncherModel
.
Application
)
?
modelData
.
object
.
isLaunching
?
switcher
.
switchModel
.
getWindowIdForTitle
(
modelData
.
object
.
title
)
==
0
:
false
:
false
...
...
@@ -116,13 +111,13 @@ Item {
width
:
iconWrapper
.
width
elide
:
Text
.
ElideRight
horizontalAlignment
:
Text
.
AlignHCenter
font.pixelSize
:
Theme
.
fontSize
Small
font.pixelSize
:
Theme
.
fontSize
Tiny
color
:
Theme
.
textColor
//https://bugreports.qt.io/browse/QTBUG-56052
y
:
-
contentHeight
+
font
.
pixelSize
+
iconWrapper
.
y
+
iconWrapper
.
height
anchors
{
left
:
parent
.
left
right
:
parent
.
right
bottom
:
parent
.
bottom
topMargin
:
Theme
.
itemSpacingExtraSmall
}
}
}
...
...
src/qml/LauncherItemFolder.qml
View file @
50d5cd22
...
...
@@ -73,10 +73,11 @@ Item {
}
Item
{
id
:
folderIconStack
width
:
size
height
:
size
property
int
size
:
parent
.
width
-
parent
.
width
/
10
property
int
iconSize
:
(
/*launcherItem.notNemoIcon ? size-size/3 : */
(
size
-
size
/
4
))
*
0.9
width
:
parent
.
width
height
:
parent
.
height
-
iconText
.
height
anchors.horizontalCenter
:
parent
.
horizontalCenter
y
:
Math
.
round
((
parent
.
height
-
(
height
+
iconText
.
height
))
/
2
)
property
int
iconSize
:
Theme
.
iconSizeLauncher
*
0.9
property
real
transparency
:
0.6
property
int
iconCount
:
4
property
var
icons
:
addIcons
()
...
...
@@ -146,13 +147,13 @@ Item {
width
:
launcherItem
.
width
elide
:
Text
.
ElideRight
horizontalAlignment
:
Text
.
AlignHCenter
font.pixelSize
:
Theme
.
fontSize
Small
font.pixelSize
:
Theme
.
fontSize
Tiny
color
:
Theme
.
textColor
//https://bugreports.qt.io/browse/QTBUG-56052
y
:
-
contentHeight
+
font
.
pixelSize
+
folderIconStack
.
y
+
folderIconStack
.
height
anchors
{
left
:
parent
.
left
right
:
parent
.
right
bottom
:
parent
.
bottom
topMargin
:
Theme
.
itemSpacingExtraSmall
}
}
...
...
@@ -173,15 +174,16 @@ Item {
id
:
folderLoader
property
Item
reorderItem
property
bool
isRootFolder
:
false
property
int
folderIndex
:
-
1
cacheBuffer
:
folderLoader
.
contentHeight
parent
:
gridview
.
contentItem
y
:
wrapper
.
y
+
wrapper
.
width
x
:
0
z
:
wrapper
.
z
+
100
width
:
gridview
.
width
height
:
count
==
0
?
0
:
(
Math
.
floor
((
count
*
wrapper
.
height
-
1
)
/
width
)
+
1
)
*
wrapper
.
height
height
:
count
==
0
?
0
:
(
Math
.
floor
((
count
*
wrapper
.
width
-
1
)
/
width
)
+
1
)
*
wrapper
.
height
cellWidth
:
wrapper
.
width
cellHeight
:
wrapper
.
width
cellHeight
:
wrapper
.
height
onReorderItemChanged
:
if
(
reorderItem
==
null
)
folderIconStack
.
icons
=
folderIconStack
.
addIcons
()
Rectangle
{
...
...
src/qml/LauncherItemWrapper.qml
View file @
50d5cd22
...
...
@@ -89,9 +89,11 @@ MouseArea {
drag
.
target
=
null
parentItem
.
reorderItem
=
null
pager
.
interactive
=
true
parentItem
.
onUninstall
=
false
deleteState
=
"
basic
"
deleter
.
uninstalling
(
deleteState
)
if
(
parentItem
.
onUninstall
){
parentItem
.
onUninstall
=
false
deleteState
=
"
basic
"
deleter
.
uninstalling
(
deleteState
)
}
parentItem
.
folderIndex
=
-
1
reparent
(
parentItem
.
contentItem
)
z
=
parent
.
z
...
...
src/qml/SearchListView.qml
View file @
50d5cd22
...
...
@@ -247,7 +247,7 @@ Item {
}
Image
{
id
:
iconImage
width
:
parent
.
height
-
Theme
.
itemSpacingMedium
width
:
Math
.
min
(
Theme
.
iconSizeLauncher
,
parent
.
height
-
Theme
.
itemSpacingMedium
)
height
:
width
source
:
iconSource
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
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