Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
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
Valentin Platzgummer
qgroundcontrol
Commits
5c610f97
Commit
5c610f97
authored
May 22, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added medium and large default font sizes
parent
fb473fe7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
ScreenTools.cc
src/QmlControls/ScreenTools.cc
+13
-1
ScreenTools.h
src/QmlControls/ScreenTools.h
+11
-3
No files found.
src/QmlControls/ScreenTools.cc
View file @
5c610f97
...
...
@@ -31,6 +31,8 @@
#include <QFontMetrics>
const
double
ScreenTools
::
_defaultFontPointSize
=
13
;
const
double
ScreenTools
::
_mediumFontPointSize
=
16
;
const
double
ScreenTools
::
_largeFontPointSize
=
20
;
ScreenTools
::
ScreenTools
()
{
...
...
@@ -92,7 +94,7 @@ void ScreenTools::_updatePixelSize()
void
ScreenTools
::
_updateFontSize
()
{
emit
fontPointFactorChanged
();
emit
defaultFontPointSize
Changed
();
emit
fontSizes
Changed
();
}
double
ScreenTools
::
fontPointFactor
()
...
...
@@ -109,3 +111,13 @@ double ScreenTools::defaultFontPointSize(void)
{
return
_defaultFontPointSize
*
MainWindow
::
fontPointFactor
();
}
double
ScreenTools
::
mediumFontPointSize
(
void
)
{
return
_mediumFontPointSize
*
MainWindow
::
fontPointFactor
();
}
double
ScreenTools
::
largeFontPointSize
(
void
)
{
return
_largeFontPointSize
*
MainWindow
::
fontPointFactor
();
}
src/QmlControls/ScreenTools.h
View file @
5c610f97
...
...
@@ -85,8 +85,13 @@ public:
Q_PROPERTY
(
double
fontPointFactor
READ
fontPointFactor
NOTIFY
fontPointFactorChanged
)
//! Returns the pixel size factor
Q_PROPERTY
(
double
pixelSizeFactor
READ
pixelSizeFactor
NOTIFY
pixelSizeFactorChanged
)
//! Returns the system wide default font point size (properly scaled)
Q_PROPERTY
(
double
defaultFontPointSize
READ
defaultFontPointSize
NOTIFY
defaultFontPointSizeChanged
)
Q_PROPERTY
(
double
defaultFontPointSize
READ
defaultFontPointSize
NOTIFY
fontSizesChanged
)
//! Returns the system wide default font point size (properly scaled)
Q_PROPERTY
(
double
mediumFontPointSize
READ
mediumFontPointSize
NOTIFY
fontSizesChanged
)
//! Returns the system wide default font point size (properly scaled)
Q_PROPERTY
(
double
largeFontPointSize
READ
largeFontPointSize
NOTIFY
fontSizesChanged
)
//! Utility for adjusting font point size. Not dynamic (no signals)
Q_INVOKABLE
qreal
adjustFontPointSize
(
qreal
pointSize
);
...
...
@@ -113,6 +118,8 @@ public:
double
fontPointFactor
();
double
pixelSizeFactor
();
double
defaultFontPointSize
(
void
);
double
mediumFontPointSize
(
void
);
double
largeFontPointSize
(
void
);
#if defined (__android__)
bool
isAndroid
()
{
return
true
;
}
...
...
@@ -128,7 +135,7 @@ signals:
void
repaintRequestedChanged
();
void
pixelSizeFactorChanged
();
void
fontPointFactorChanged
();
void
defaultFontPointSize
Changed
();
void
fontSizes
Changed
();
private
slots
:
void
_updateCanvas
();
...
...
@@ -137,7 +144,8 @@ private slots:
private:
static
const
double
_defaultFontPointSize
;
static
const
double
_mediumFontPointSize
;
static
const
double
_largeFontPointSize
;
};
#endif
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