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
8252da0b
Commit
8252da0b
authored
Dec 08, 2013
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] Label default font size as 24. Fixes NEMO#705.
parent
a8f19eb4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
1 deletion
+56
-1
Label.qml
src/controls/Label.qml
+1
-0
TextFieldStyle.qml
src/styles/TextFieldStyle.qml
+1
-1
nemotheme.cpp
src/styles/autogenerated/nemotheme.cpp
+6
-0
nemothemelabel.cpp
src/styles/autogenerated/nemothemelabel.cpp
+14
-0
nemothemelabel.h
src/styles/autogenerated/nemothemelabel.h
+5
-0
nemothemetextfield.cpp
src/styles/autogenerated/nemothemetextfield.cpp
+14
-0
nemothemetextfield.h
src/styles/autogenerated/nemothemetextfield.h
+5
-0
components.json
tools/themehelper/components.json
+10
-0
No files found.
src/controls/Label.qml
View file @
8252da0b
...
...
@@ -35,4 +35,5 @@ Text {
renderType
:
Text
.
NativeRendering
font.family
:
Theme
.
fontFamily
color
:
Theme
.
label
.
color
font.pointSize
:
Theme
.
label
.
pointSize
}
src/styles/TextFieldStyle.qml
View file @
8252da0b
...
...
@@ -25,7 +25,7 @@ TextFieldStyle {
selectedTextColor
:
Theme
.
textField
.
selectedTextColor
selectionColor
:
Theme
.
textField
.
selectionColor
textColor
:
Theme
.
textField
.
selectedTextColor
font.pixelSize
:
24
font.pixelSize
:
Theme
.
textField
.
pointSize
background
:
Item
{
implicitHeight
:
40
implicitWidth
:
320
...
...
src/styles/autogenerated/nemotheme.cpp
View file @
8252da0b
...
...
@@ -339,6 +339,9 @@ void NemoTheme::loadFromFile(const QString &fileName)
QJsonObject
stylesTextField
=
styles
.
value
(
"textField"
).
toObject
();
m_textField
->
setSelectedTextColor
(
jsonToColor
(
jsonValue
(
stylesTextField
,
"selectedTextColor"
,
"textField"
),
defines
));
m_textField
->
setSelectionColor
(
jsonToColor
(
jsonValue
(
stylesTextField
,
"selectionColor"
,
"textField"
),
defines
));
if
(
stylesTextField
.
contains
(
"pointSize"
))
{
m_textField
->
setPointSize
(
jsonToInt
(
styles
.
value
(
"textField"
),
defines
));
}
// Setting properties for toolBar
QJsonObject
stylesToolBar
=
styles
.
value
(
"toolBar"
).
toObject
();
m_toolBar
->
setBackground
(
jsonToColor
(
jsonValue
(
stylesToolBar
,
"background"
,
"toolBar"
),
defines
));
...
...
@@ -383,6 +386,9 @@ void NemoTheme::loadFromFile(const QString &fileName)
// Setting properties for label
QJsonObject
stylesLabel
=
styles
.
value
(
"label"
).
toObject
();
m_label
->
setColor
(
jsonToColor
(
jsonValue
(
stylesLabel
,
"color"
,
"label"
),
defines
));
if
(
stylesLabel
.
contains
(
"pointSize"
))
{
m_label
->
setPointSize
(
jsonToInt
(
styles
.
value
(
"label"
),
defines
));
}
// Setting properties for checkbox
QJsonObject
stylesCheckbox
=
styles
.
value
(
"checkbox"
).
toObject
();
m_checkbox
->
setBack1
(
jsonToColor
(
jsonValue
(
stylesCheckbox
,
"back1"
,
"checkbox"
),
defines
));
...
...
src/styles/autogenerated/nemothemelabel.cpp
View file @
8252da0b
...
...
@@ -24,6 +24,7 @@
NemoThemeLabel
::
NemoThemeLabel
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_pointSize
(
24
)
{
}
...
...
@@ -39,3 +40,16 @@ void NemoThemeLabel::setColor(const QColor &color)
emit
colorChanged
();
}
}
int
NemoThemeLabel
::
pointSize
()
const
{
return
m_pointSize
;
}
void
NemoThemeLabel
::
setPointSize
(
int
pointSize
)
{
if
(
m_pointSize
!=
pointSize
)
{
m_pointSize
=
pointSize
;
emit
pointSizeChanged
();
}
}
src/styles/autogenerated/nemothemelabel.h
View file @
8252da0b
...
...
@@ -30,14 +30,19 @@ class NemoThemeLabel: public QObject
{
Q_OBJECT
Q_PROPERTY
(
QColor
color
READ
color
NOTIFY
colorChanged
)
Q_PROPERTY
(
int
pointSize
READ
pointSize
NOTIFY
pointSizeChanged
)
public:
explicit
NemoThemeLabel
(
QObject
*
parent
=
0
);
QColor
color
()
const
;
void
setColor
(
const
QColor
&
color
);
int
pointSize
()
const
;
void
setPointSize
(
int
pointSize
);
Q_SIGNALS:
void
colorChanged
();
void
pointSizeChanged
();
private:
QColor
m_color
;
int
m_pointSize
;
};
#endif //NEMOTHEMELABEL_H
src/styles/autogenerated/nemothemetextfield.cpp
View file @
8252da0b
...
...
@@ -24,6 +24,7 @@
NemoThemeTextField
::
NemoThemeTextField
(
QObject
*
parent
)
:
QObject
(
parent
)
,
m_pointSize
(
24
)
{
}
...
...
@@ -52,3 +53,16 @@ void NemoThemeTextField::setSelectionColor(const QColor &selectionColor)
emit
selectionColorChanged
();
}
}
int
NemoThemeTextField
::
pointSize
()
const
{
return
m_pointSize
;
}
void
NemoThemeTextField
::
setPointSize
(
int
pointSize
)
{
if
(
m_pointSize
!=
pointSize
)
{
m_pointSize
=
pointSize
;
emit
pointSizeChanged
();
}
}
src/styles/autogenerated/nemothemetextfield.h
View file @
8252da0b
...
...
@@ -31,18 +31,23 @@ class NemoThemeTextField: public QObject
Q_OBJECT
Q_PROPERTY
(
QColor
selectedTextColor
READ
selectedTextColor
NOTIFY
selectedTextColorChanged
)
Q_PROPERTY
(
QColor
selectionColor
READ
selectionColor
NOTIFY
selectionColorChanged
)
Q_PROPERTY
(
int
pointSize
READ
pointSize
NOTIFY
pointSizeChanged
)
public:
explicit
NemoThemeTextField
(
QObject
*
parent
=
0
);
QColor
selectedTextColor
()
const
;
void
setSelectedTextColor
(
const
QColor
&
selectedTextColor
);
QColor
selectionColor
()
const
;
void
setSelectionColor
(
const
QColor
&
selectionColor
);
int
pointSize
()
const
;
void
setPointSize
(
int
pointSize
);
Q_SIGNALS:
void
selectedTextColorChanged
();
void
selectionColorChanged
();
void
pointSizeChanged
();
private:
QColor
m_selectedTextColor
;
QColor
m_selectionColor
;
int
m_pointSize
;
};
#endif //NEMOTHEMETEXTFIELD_H
tools/themehelper/components.json
View file @
8252da0b
...
...
@@ -41,6 +41,11 @@
{
"name"
:
"selectionColor"
,
"type"
:
"QColor"
},
{
"name"
:
"pointSize"
,
"type"
:
"int"
,
"default"
:
24
}
]
},
...
...
@@ -208,6 +213,11 @@
{
"name"
:
"color"
,
"type"
:
"QColor"
},
{
"name"
:
"pointSize"
,
"type"
:
"int"
,
"default"
:
24
}
]
},
...
...
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