Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
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
qtquickcontrols-nemo
Commits
4d857b53
Commit
4d857b53
authored
Aug 13, 2017
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Scaling] Request to change fontSize to font.pixelSize and recalculate Theme.fontSizes
parent
051e2f9c
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
19 deletions
+31
-19
SliderPage.qml
examples/touch/content/SliderPage.qml
+4
-0
Checkbox.qml
src/controls/Checkbox.qml
+1
-0
HeaderToolsLayout.qml
src/controls/HeaderToolsLayout.qml
+1
-1
Label.qml
src/controls/Label.qml
+1
-1
ListView.qml
src/controls/ListView.qml
+7
-4
Slider.qml
src/controls/Slider.qml
+1
-0
theme.cpp
src/controls/theme.cpp
+5
-5
theme.h
src/controls/theme.h
+5
-5
ButtonStyle.qml
src/styles/ButtonStyle.qml
+1
-1
CheckBoxStyle.qml
src/styles/CheckBoxStyle.qml
+1
-0
SliderStyle.qml
src/styles/SliderStyle.qml
+2
-1
TextFieldStyle.qml
src/styles/TextFieldStyle.qml
+2
-1
No files found.
examples/touch/content/SliderPage.qml
View file @
4d857b53
...
@@ -60,6 +60,10 @@ Page {
...
@@ -60,6 +60,10 @@ Page {
anchors.margins
:
20
anchors.margins
:
20
showValue
:
true
showValue
:
true
value
:
0.5
value
:
0.5
minimumValue
:
1
maximumValue
:
100
stepSize
:
1
}
}
Slider
{
Slider
{
anchors.margins
:
20
anchors.margins
:
20
...
...
src/controls/Checkbox.qml
View file @
4d857b53
...
@@ -3,5 +3,6 @@ import QtQuick.Controls 1.0
...
@@ -3,5 +3,6 @@ import QtQuick.Controls 1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
import
QtQuick
.
Controls
.
Styles
.
Nemo
1.0
CheckBox
{
CheckBox
{
property
int
fontSize
:
Theme
.
fontSizeSmall
style
:
CheckBoxStyle
{}
style
:
CheckBoxStyle
{}
}
}
src/controls/HeaderToolsLayout.qml
View file @
4d857b53
...
@@ -64,7 +64,7 @@ Item {
...
@@ -64,7 +64,7 @@ Item {
clip
:
true
clip
:
true
font.family
:
Theme
.
fontFamily
font.family
:
Theme
.
fontFamily
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.p
ointSize
:
Theme
.
fontSizeLarge
font.p
ixelSize
:
Theme
.
fontSizeMedium
font.weight
:
Font
.
Bold
font.weight
:
Font
.
Bold
LinearGradient
{
LinearGradient
{
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
...
...
src/controls/Label.qml
View file @
4d857b53
...
@@ -35,5 +35,5 @@ Text {
...
@@ -35,5 +35,5 @@ Text {
renderType
:
Text
.
NativeRendering
renderType
:
Text
.
NativeRendering
font.family
:
Theme
.
fontFamily
font.family
:
Theme
.
fontFamily
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.p
ointSize
:
Theme
.
fontSizeLarge
font.p
ixelSize
:
Theme
.
fontSizeMedium
}
}
src/controls/ListView.qml
View file @
4d857b53
...
@@ -9,6 +9,9 @@ ListView {
...
@@ -9,6 +9,9 @@ ListView {
signal
hideAllActions
(
int
hideIndex
)
signal
hideAllActions
(
int
hideIndex
)
property
bool
showDecorator
:
false
property
bool
showDecorator
:
false
property
color
delegateColor
:
Theme
.
backgroundColor
property
color
bottomGradientColor
:
Theme
.
backgroundColor
property
color
scrollerDecoratorColor
:
Theme
.
accentColor
section.criteria
:
ViewSection
.
FullString
section.criteria
:
ViewSection
.
FullString
section.delegate
:
Component
{
section.delegate
:
Component
{
...
@@ -16,13 +19,13 @@ ListView {
...
@@ -16,13 +19,13 @@ ListView {
Rectangle
{
Rectangle
{
width
:
listView
.
width
width
:
listView
.
width
height
:
size
.
dp
(
44
)
height
:
size
.
dp
(
44
)
color
:
Theme
.
background
Color
color
:
delegate
Color
Text
{
Text
{
id
:
sectionText
id
:
sectionText
text
:
section
text
:
section
font.capitalization
:
Font
.
AllUppercase
font.capitalization
:
Font
.
AllUppercase
font.pixelSize
:
Theme
.
fontSize
Medium
font.pixelSize
:
Theme
.
fontSize
Small
color
:
Theme
.
textColor
color
:
Theme
.
textColor
anchors
{
anchors
{
left
:
parent
.
left
left
:
parent
.
left
...
@@ -59,7 +62,7 @@ ListView {
...
@@ -59,7 +62,7 @@ ListView {
end
:
Qt
.
point
(
0
,
size
.
dp
(
30
))
end
:
Qt
.
point
(
0
,
size
.
dp
(
30
))
gradient
:
Gradient
{
gradient
:
Gradient
{
GradientStop
{
position
:
0.0
;
color
:
"
transparent
"
}
GradientStop
{
position
:
0.0
;
color
:
"
transparent
"
}
GradientStop
{
position
:
1.0
;
color
:
Theme
.
background
Color
}
GradientStop
{
position
:
1.0
;
color
:
bottomGradient
Color
}
}
}
}
}
...
@@ -68,7 +71,7 @@ ListView {
...
@@ -68,7 +71,7 @@ ListView {
Rectangle
{
Rectangle
{
id
:
scrollerDecorator
id
:
scrollerDecorator
visible
:
(
listView
.
showDecorator
&&
listView
.
contentHeight
>
listView
.
height
)
visible
:
(
listView
.
showDecorator
&&
listView
.
contentHeight
>
listView
.
height
)
color
:
Theme
.
accent
Color
color
:
scrollerDecorator
Color
width
:
size
.
dp
(
5
)
width
:
size
.
dp
(
5
)
height
:
listView
.
height
*
listView
.
height
/
listView
.
contentHeight
height
:
listView
.
height
*
listView
.
height
/
listView
.
contentHeight
...
...
src/controls/Slider.qml
View file @
4d857b53
...
@@ -7,6 +7,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
...
@@ -7,6 +7,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
Slider
{
Slider
{
id
:
slider
id
:
slider
property
bool
showValue
:
false
property
bool
showValue
:
false
property
int
valueFontSize
:
Theme
.
fontSizeTiny
style
:
SliderStyle
{}
style
:
SliderStyle
{}
}
}
src/controls/theme.cpp
View file @
4d857b53
...
@@ -29,11 +29,11 @@ Theme::Theme(QObject *parent) : QObject(parent)
...
@@ -29,11 +29,11 @@ Theme::Theme(QObject *parent) : QObject(parent)
m_itemSpacingSmall
=
10
*
m_dp
;
m_itemSpacingSmall
=
10
*
m_dp
;
m_itemSpacingExtraSmall
=
8
*
m_dp
;
m_itemSpacingExtraSmall
=
8
*
m_dp
;
m_fontSizeExtraLarge
=
3
0
*
m_dp
;
m_fontSizeExtraLarge
=
5
0
*
m_dp
;
m_fontSizeLarge
=
24
*
m_dp
;
m_fontSizeLarge
=
40
*
m_dp
;
m_fontSizeMedium
=
20
*
m_dp
;
m_fontSizeMedium
=
32
*
m_dp
;
m_fontSizeSmall
=
18
*
m_dp
;
m_fontSizeSmall
=
26
*
m_dp
;
m_fontSizeTiny
=
1
6
*
m_dp
;
m_fontSizeTiny
=
1
8
*
m_dp
;
m_fontWeightLarge
=
63
*
m_dp
;
m_fontWeightLarge
=
63
*
m_dp
;
m_fontWeightMedium
=
25
*
m_dp
;
m_fontWeightMedium
=
25
*
m_dp
;
m_fontFamily
=
"/usr/share/fonts/google-opensans/OpenSans-Regular.ttf"
;
m_fontFamily
=
"/usr/share/fonts/google-opensans/OpenSans-Regular.ttf"
;
...
...
src/controls/theme.h
View file @
4d857b53
...
@@ -139,11 +139,11 @@ private:
...
@@ -139,11 +139,11 @@ private:
qreal
m_itemSpacingSmall
;
//10
qreal
m_itemSpacingSmall
;
//10
qreal
m_itemSpacingExtraSmall
;
//8
qreal
m_itemSpacingExtraSmall
;
//8
int
m_fontSizeExtraLarge
;
//
3
0
int
m_fontSizeExtraLarge
;
//
5
0
int
m_fontSizeLarge
;
//24
int
m_fontSizeLarge
;
//40
int
m_fontSizeMedium
;
//20
int
m_fontSizeMedium
;
//32
int
m_fontSizeSmall
;
//
18
int
m_fontSizeSmall
;
//
26
int
m_fontSizeTiny
;
//1
6
int
m_fontSizeTiny
;
//1
8
int
m_fontWeightLarge
;
//63
int
m_fontWeightLarge
;
//63
int
m_fontWeightMedium
;
//25
int
m_fontWeightMedium
;
//25
QString
m_fontFamily
;
//???
QString
m_fontFamily
;
//???
...
...
src/styles/ButtonStyle.qml
View file @
4d857b53
...
@@ -73,7 +73,7 @@ ButtonStyle {
...
@@ -73,7 +73,7 @@ ButtonStyle {
text
:
control
.
text
text
:
control
.
text
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.family
:
Theme
.
fontFamily
font.family
:
Theme
.
fontFamily
font.p
ointSize
:
Theme
.
fontSizeLarge
font.p
ixelSize
:
Theme
.
fontSizeMedium
font.weight
:
control
.
primary
?
Theme
.
fontWeightLarge
:
Theme
.
fontWeightMedium
font.weight
:
control
.
primary
?
Theme
.
fontWeightLarge
:
Theme
.
fontWeightMedium
opacity
:
control
.
enabled
?
1.0
:
0.3
opacity
:
control
.
enabled
?
1.0
:
0.3
}
}
...
...
src/styles/CheckBoxStyle.qml
View file @
4d857b53
...
@@ -130,6 +130,7 @@ CheckBoxStyle {
...
@@ -130,6 +130,7 @@ CheckBoxStyle {
}
}
label
:
Label
{
label
:
Label
{
text
:
control
.
text
text
:
control
.
text
font.pixelSize
:
control
.
fontSize
}
}
spacing
:
10
spacing
:
10
}
}
src/styles/SliderStyle.qml
View file @
4d857b53
...
@@ -37,9 +37,10 @@ SliderStyle{
...
@@ -37,9 +37,10 @@ SliderStyle{
Text
{
Text
{
id
:
valueLabel
id
:
valueLabel
anchors.centerIn
:
parent
anchors.centerIn
:
parent
text
:
parseInt
(
control
.
value
*
100
)
text
:
parseInt
(
control
.
value
)
visible
:
control
.
showValue
visible
:
control
.
showValue
color
:
Theme
.
textColor
color
:
Theme
.
textColor
font.pixelSize
:
control
.
valueFontSize
}
}
}
}
...
...
src/styles/TextFieldStyle.qml
View file @
4d857b53
...
@@ -25,8 +25,9 @@ TextFieldStyle {
...
@@ -25,8 +25,9 @@ TextFieldStyle {
selectedTextColor
:
Theme
.
textColor
selectedTextColor
:
Theme
.
textColor
selectionColor
:
Theme
.
accentColor
selectionColor
:
Theme
.
accentColor
textColor
:
Theme
.
textColor
textColor
:
Theme
.
textColor
font.p
ointSize
:
Theme
.
fontSizeTiny
font.p
ixelSize
:
Theme
.
fontSizeMedium
font.family
:
Theme
.
fontFamily
font.family
:
Theme
.
fontFamily
placeholderTextColor
:
Theme
.
textColor
background
:
Item
{
background
:
Item
{
anchors
{
anchors
{
...
...
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