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
ff56426e
Commit
ff56426e
authored
Apr 01, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dpi adjusted font sizes
parent
514a4d95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
QGCPalette.cc
src/QGCPalette.cc
+8
-0
QGCPalette.h
src/QGCPalette.h
+9
-1
No files found.
src/QGCPalette.cc
View file @
ff56426e
...
...
@@ -25,10 +25,13 @@
/// @author Don Gagne <don@thegagnes.com>
#include "QGCPalette.h"
#include "ScreenTools.h"
#include <QApplication>
#include <QPalette>
const
qreal
QGCPalette
::
_defaultFontPointSize
=
12
;
QList
<
QGCPalette
*>
QGCPalette
::
_paletteObjects
;
QGCPalette
::
Theme
QGCPalette
::
_theme
=
QGCPalette
::
Dark
;
...
...
@@ -130,3 +133,8 @@ void QGCPalette::_themeChanged(void)
{
emit
paletteChanged
();
}
qreal
QGCPalette
::
dpiAdjustedDefaultFontPointSize
(
void
)
{
return
ScreenTools
::
dpiAdjustedPointSize_s
(
_defaultFontPointSize
);
}
src/QGCPalette.h
View file @
ff56426e
...
...
@@ -82,7 +82,11 @@ class QGCPalette : public QObject
// Text color for TextFields
Q_PROPERTY
(
QColor
textFieldText
READ
textFieldText
NOTIFY
paletteChanged
)
Q_PROPERTY
(
qreal
defaultFontPointSize
MEMBER
_defaultFontPointSize
CONSTANT
)
Q_PROPERTY
(
qreal
dpiAdjustedDefaultFontPointSize
READ
dpiAdjustedDefaultFontPointSize
CONSTANT
)
public:
enum
ColorGroup
{
Disabled
=
0
,
...
...
@@ -120,6 +124,8 @@ public:
static
Theme
globalTheme
(
void
)
{
return
_theme
;
}
static
void
setGlobalTheme
(
Theme
newTheme
);
qreal
dpiAdjustedDefaultFontPointSize
(
void
);
signals:
void
paletteChanged
(
void
);
...
...
@@ -149,6 +155,8 @@ private:
static
QColor
_textField
[
_cThemes
][
_cColorGroups
];
static
QColor
_textFieldText
[
_cThemes
][
_cColorGroups
];
static
const
qreal
_defaultFontPointSize
;
void
_themeChanged
(
void
);
static
QList
<
QGCPalette
*>
_paletteObjects
;
///< List of all active QGCPalette objects
...
...
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