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
5022b21c
Commit
5022b21c
authored
Feb 27, 2016
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[scaling] Better scaling of statusbar
parent
758b0b40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
Statusbar.qml
src/qml/Statusbar.qml
+15
-6
StatusbarItem.qml
src/qml/StatusbarItem.qml
+3
-2
No files found.
src/qml/Statusbar.qml
View file @
5022b21c
...
@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
...
@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
Item
{
Item
{
id
:
root
id
:
root
z
:
201
z
:
201
height
:
root
.
width
/
12
height
:
width
/
12
width
:
parent
.
width
width
:
parent
.
width
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
...
@@ -132,15 +132,17 @@ Item {
...
@@ -132,15 +132,17 @@ Item {
anchors.fill
:
statusbar
anchors.fill
:
statusbar
spacing
:
root
.
height
/
4
spacing
:
root
.
height
/
4
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
(
cellularSignalBars
.
value
>
0
)
?
"
image://theme/icon_cell
"
+
cellularSignalBars
.
value
:
"
image://theme/icon_cell1
"
source
:
(
cellularSignalBars
.
value
>
0
)
?
"
image://theme/icon_cell
"
+
cellularSignalBars
.
value
:
"
image://theme/icon_cell1
"
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
Label
{
Label
{
id
:
tech
id
:
tech
width
:
root
.
height
/
4
width
:
root
.
height
/
4
height
:
root
.
height
/
4
height
:
root
.
height
/
4
font.p
ointSize
:
root
.
height
/
14
font.p
ixelSize
:
root
.
height
/
4
+
root
.
height
/
5
font.bold
:
true
font.bold
:
true
wrapMode
:
Text
.
ElideRight
wrapMode
:
Text
.
ElideRight
text
:
(
cellularNetworkName
.
value
!==
""
)
?
cellularNetworkName
.
value
.
substring
(
0
,
3
).
toUpperCase
()
:
"
NA
"
text
:
(
cellularNetworkName
.
value
!==
""
)
?
cellularNetworkName
.
value
.
substring
(
0
,
3
).
toUpperCase
()
:
"
NA
"
...
@@ -151,7 +153,7 @@ Item {
...
@@ -151,7 +153,7 @@ Item {
anchors.topMargin
:
root
.
height
/
8
anchors.topMargin
:
root
.
height
/
8
width
:
root
.
height
/
4
width
:
root
.
height
/
4
height
:
root
/
height
/
4
height
:
root
/
height
/
4
font.p
ointSize
:
root
.
height
/
14
font.p
ixelSize
:
root
.
height
/
4
+
root
.
height
/
5
text
:
{
text
:
{
var
techToG
=
{
gprs
:
"
2
"
,
egprs
:
"
2.5
"
,
umts
:
"
3
"
,
hspa
:
"
3.5
"
,
lte
:
"
4
"
,
unknown
:
"
0
"
}
var
techToG
=
{
gprs
:
"
2
"
,
egprs
:
"
2.5
"
,
umts
:
"
3
"
,
hspa
:
"
3.5
"
,
lte
:
"
4
"
,
unknown
:
"
0
"
}
return
techToG
[
cellularDataTechnology
.
value
?
cellularDataTechnology
.
value
:
"
unknown
"
]
+
"
G
"
return
techToG
[
cellularDataTechnology
.
value
?
cellularDataTechnology
.
value
:
"
unknown
"
]
+
"
G
"
...
@@ -161,6 +163,7 @@ Item {
...
@@ -161,6 +163,7 @@ Item {
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
{
source
:
{
if
(
wlan
.
connected
)
{
if
(
wlan
.
connected
)
{
if
(
networkManager
.
defaultRoute
.
type
!==
"
wifi
"
)
if
(
networkManager
.
defaultRoute
.
type
!==
"
wifi
"
)
...
@@ -183,23 +186,28 @@ Item {
...
@@ -183,23 +186,28 @@ Item {
panel
:
WifiPanel
{}
panel
:
WifiPanel
{}
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
"
image://theme/icon_bt_normal
"
source
:
"
image://theme/icon_bt_normal
"
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
"
image://theme/icon_nfc_normal
"
source
:
"
image://theme/icon_nfc_normal
"
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
"
image://theme/icon_gps_normal
"
source
:
"
image://theme/icon_gps_normal
"
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
source
:
"
image://theme/icon_play_pause
"
source
:
"
image://theme/icon_play_pause
"
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
Label
{
Label
{
id
:
hours
id
:
hours
width
:
root
.
height
/
4
width
:
root
.
height
/
4
height
:
root
.
height
/
4
height
:
root
.
height
/
4
font.p
ointSize
:
root
.
height
/
14
font.p
ixelSize
:
root
.
height
/
4
+
root
.
height
/
5
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
hh
"
)
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
hh
"
)
}
}
Label
{
Label
{
...
@@ -208,12 +216,13 @@ Item {
...
@@ -208,12 +216,13 @@ Item {
anchors.topMargin
:
root
.
height
/
8
anchors.topMargin
:
root
.
height
/
8
width
:
root
.
height
/
4
width
:
root
.
height
/
4
height
:
root
.
height
/
4
height
:
root
.
height
/
4
font.p
ointSize
:
root
.
height
/
14
font.p
ixelSize
:
root
.
height
/
4
+
root
.
height
/
5
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
mm
"
)
text
:
Qt
.
formatDateTime
(
wallClock
.
time
,
"
mm
"
)
}
}
}
}
StatusbarItem
{
StatusbarItem
{
iconSize
:
root
.
height
/
2
panel
:
BatteryPanel
{}
panel
:
BatteryPanel
{}
source
:
{
source
:
{
if
(
batteryChargePercentage
.
value
>
85
)
{
if
(
batteryChargePercentage
.
value
>
85
)
{
...
...
src/qml/StatusbarItem.qml
View file @
5022b21c
...
@@ -5,12 +5,13 @@ Item {
...
@@ -5,12 +5,13 @@ Item {
property
alias
source
:
icon
.
source
property
alias
source
:
icon
.
source
property
string
panel_source
property
string
panel_source
property
Component
panel
property
Component
panel
property
double
iconSize
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.fillHeight
:
true
Image
{
Image
{
width
:
iconSize
height
:
iconSize
id
:
icon
id
:
icon
width
:
root
.
height
/
2
height
:
root
.
height
/
2
anchors.centerIn
:
parent
anchors.centerIn
:
parent
}
}
MouseArea
{
MouseArea
{
...
...
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