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
da72638a
Commit
da72638a
authored
Dec 08, 2014
by
Aleksi Suomalainen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29 from locusf/master
[font] Set TextField font to Open Sans, fixes NEMO#711.
parents
c1c8f53b
0548bed8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
2 deletions
+43
-2
TextFieldStyle.qml
src/styles/TextFieldStyle.qml
+1
-0
nemotheme.cpp
src/styles/autogenerated/nemotheme.cpp
+5
-0
nemothemetextfield.cpp
src/styles/autogenerated/nemothemetextfield.cpp
+22
-0
nemothemetextfield.h
src/styles/autogenerated/nemothemetextfield.h
+7
-0
glacier.json
src/styles/themes/glacier.json
+2
-1
components.json
tools/themehelper/components.json
+6
-1
No files found.
src/styles/TextFieldStyle.qml
View file @
da72638a
...
@@ -26,6 +26,7 @@ TextFieldStyle {
...
@@ -26,6 +26,7 @@ TextFieldStyle {
selectionColor
:
Theme
.
textField
.
selectionColor
selectionColor
:
Theme
.
textField
.
selectionColor
textColor
:
Theme
.
textField
.
selectedTextColor
textColor
:
Theme
.
textField
.
selectedTextColor
font.pixelSize
:
Theme
.
textField
.
pointSize
font.pixelSize
:
Theme
.
textField
.
pointSize
font.family
:
Theme
.
textField
.
font
background
:
Item
{
background
:
Item
{
implicitHeight
:
40
implicitHeight
:
40
implicitWidth
:
320
implicitWidth
:
320
...
...
src/styles/autogenerated/nemotheme.cpp
View file @
da72638a
...
@@ -386,6 +386,11 @@ void NemoTheme::loadFromFile(const QString &fileName)
...
@@ -386,6 +386,11 @@ void NemoTheme::loadFromFile(const QString &fileName)
}
else
{
}
else
{
m_textField
->
setPointSizeDefault
();
m_textField
->
setPointSizeDefault
();
}
}
if
(
stylesTextField
.
contains
(
"font"
))
{
m_textField
->
setFont
(
jsonToString
(
stylesTextField
.
value
(
"font"
),
defines
));
}
else
{
m_textField
->
setFontDefault
();
}
// Setting properties for toolBar
// Setting properties for toolBar
QJsonObject
stylesToolBar
=
styles
.
value
(
"toolBar"
).
toObject
();
QJsonObject
stylesToolBar
=
styles
.
value
(
"toolBar"
).
toObject
();
m_toolBar
->
setBackground
(
jsonToColor
(
jsonValue
(
stylesToolBar
,
"background"
,
"toolBar"
),
defines
));
m_toolBar
->
setBackground
(
jsonToColor
(
jsonValue
(
stylesToolBar
,
"background"
,
"toolBar"
),
defines
));
...
...
src/styles/autogenerated/nemothemetextfield.cpp
View file @
da72638a
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
NemoThemeTextField
::
NemoThemeTextField
(
QObject
*
parent
)
NemoThemeTextField
::
NemoThemeTextField
(
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
,
m_pointSize
(
24
)
,
m_pointSize
(
24
)
,
m_font
(
"Open Sans"
)
{
{
}
}
...
@@ -74,3 +75,24 @@ void NemoThemeTextField::setPointSizeDefault()
...
@@ -74,3 +75,24 @@ void NemoThemeTextField::setPointSizeDefault()
emit
pointSizeChanged
();
emit
pointSizeChanged
();
}
}
}
}
QString
NemoThemeTextField
::
font
()
const
{
return
m_font
;
}
void
NemoThemeTextField
::
setFont
(
const
QString
&
font
)
{
if
(
m_font
!=
font
)
{
m_font
=
font
;
emit
fontChanged
();
}
}
void
NemoThemeTextField
::
setFontDefault
()
{
if
(
m_font
!=
"Open Sans"
)
{
m_font
=
"Open Sans"
;
emit
fontChanged
();
}
}
src/styles/autogenerated/nemothemetextfield.h
View file @
da72638a
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <QtCore/QObject>
#include <QtCore/QObject>
#include <QtGui/QColor>
#include <QtGui/QColor>
#include <QtCore/QString>
class
NemoThemeTextField
:
public
QObject
class
NemoThemeTextField
:
public
QObject
{
{
...
@@ -32,6 +33,7 @@ class NemoThemeTextField: public QObject
...
@@ -32,6 +33,7 @@ class NemoThemeTextField: public QObject
Q_PROPERTY
(
QColor
selectedTextColor
READ
selectedTextColor
NOTIFY
selectedTextColorChanged
)
Q_PROPERTY
(
QColor
selectedTextColor
READ
selectedTextColor
NOTIFY
selectedTextColorChanged
)
Q_PROPERTY
(
QColor
selectionColor
READ
selectionColor
NOTIFY
selectionColorChanged
)
Q_PROPERTY
(
QColor
selectionColor
READ
selectionColor
NOTIFY
selectionColorChanged
)
Q_PROPERTY
(
int
pointSize
READ
pointSize
NOTIFY
pointSizeChanged
)
Q_PROPERTY
(
int
pointSize
READ
pointSize
NOTIFY
pointSizeChanged
)
Q_PROPERTY
(
QString
font
READ
font
NOTIFY
fontChanged
)
public:
public:
explicit
NemoThemeTextField
(
QObject
*
parent
=
0
);
explicit
NemoThemeTextField
(
QObject
*
parent
=
0
);
QColor
selectedTextColor
()
const
;
QColor
selectedTextColor
()
const
;
...
@@ -41,14 +43,19 @@ public:
...
@@ -41,14 +43,19 @@ public:
int
pointSize
()
const
;
int
pointSize
()
const
;
void
setPointSize
(
int
pointSize
);
void
setPointSize
(
int
pointSize
);
void
setPointSizeDefault
();
void
setPointSizeDefault
();
QString
font
()
const
;
void
setFont
(
const
QString
&
font
);
void
setFontDefault
();
Q_SIGNALS:
Q_SIGNALS:
void
selectedTextColorChanged
();
void
selectedTextColorChanged
();
void
selectionColorChanged
();
void
selectionColorChanged
();
void
pointSizeChanged
();
void
pointSizeChanged
();
void
fontChanged
();
private:
private:
QColor
m_selectedTextColor
;
QColor
m_selectedTextColor
;
QColor
m_selectionColor
;
QColor
m_selectionColor
;
int
m_pointSize
;
int
m_pointSize
;
QString
m_font
;
};
};
#endif //NEMOTHEMETEXTFIELD_H
#endif //NEMOTHEMETEXTFIELD_H
src/styles/themes/glacier.json
View file @
da72638a
...
@@ -36,7 +36,8 @@
...
@@ -36,7 +36,8 @@
},
},
"textField"
:
{
"textField"
:
{
"selectedTextColor"
:
"#ffffff"
,
"selectedTextColor"
:
"#ffffff"
,
"selectionColor"
:
"#0091e5"
"selectionColor"
:
"#0091e5"
,
"font"
:
"Open Sans"
},
},
"toolBar"
:
{
"toolBar"
:
{
"background"
:
"#000000"
"background"
:
"#000000"
...
...
tools/themehelper/components.json
View file @
da72638a
...
@@ -46,6 +46,11 @@
...
@@ -46,6 +46,11 @@
"name"
:
"pointSize"
,
"name"
:
"pointSize"
,
"type"
:
"int"
,
"type"
:
"int"
,
"default"
:
24
"default"
:
24
},
{
"name"
:
"font"
,
"type"
:
"QString"
,
"default"
:
"Open Sans"
}
}
]
]
},
},
...
...
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