forked from openlp/openlp
Add custom font file and handling
This commit is contained in:
parent
55f34aee03
commit
0023359915
BIN
openlp/core/ui/fonts/OpenLP.ttf
Normal file
BIN
openlp/core/ui/fonts/OpenLP.ttf
Normal file
Binary file not shown.
4
openlp/core/ui/fonts/openlp-charmap.json
Normal file
4
openlp/core/ui/fonts/openlp-charmap.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"users": "0041",
|
||||||
|
"file-text": "0042"
|
||||||
|
}
|
@ -26,6 +26,7 @@ import qtawesome as qta
|
|||||||
|
|
||||||
from PyQt5 import QtGui, QtWidgets
|
from PyQt5 import QtGui, QtWidgets
|
||||||
|
|
||||||
|
from openlp.core.common.applocation import AppLocation
|
||||||
from openlp.core.lib import build_icon
|
from openlp.core.lib import build_icon
|
||||||
|
|
||||||
|
|
||||||
@ -48,6 +49,9 @@ class UiIcons(object):
|
|||||||
"""
|
"""
|
||||||
These are the font icons used in the code.
|
These are the font icons used in the code.
|
||||||
"""
|
"""
|
||||||
|
font_path = AppLocation.get_directory(AppLocation.AppDir) / 'core' / 'ui' / 'fonts' / 'OpenLP.ttf'
|
||||||
|
charmap_path = AppLocation.get_directory(AppLocation.AppDir) / 'core' / 'ui' / 'fonts' / 'openlp-charmap.json'
|
||||||
|
qta.load_font('op', font_path, charmap_path)
|
||||||
palette = QtWidgets.QApplication.palette()
|
palette = QtWidgets.QApplication.palette()
|
||||||
qta.set_defaults(color=palette.color(QtGui.QPalette.Active,
|
qta.set_defaults(color=palette.color(QtGui.QPalette.Active,
|
||||||
QtGui.QPalette.ButtonText),
|
QtGui.QPalette.ButtonText),
|
||||||
@ -112,13 +116,13 @@ class UiIcons(object):
|
|||||||
'sort': {'icon': 'fa.sort'},
|
'sort': {'icon': 'fa.sort'},
|
||||||
'stop': {'icon': 'fa.stop'},
|
'stop': {'icon': 'fa.stop'},
|
||||||
'square': {'icon': 'fa.square'},
|
'square': {'icon': 'fa.square'},
|
||||||
'text': {'icon': 'fa.file-text'},
|
'text': {'icon': 'op.file-text'},
|
||||||
'theme': {'icon': 'fa.file-image-o'},
|
'theme': {'icon': 'fa.file-image-o'},
|
||||||
'top': {'icon': 'fa.angle-double-up'},
|
'top': {'icon': 'fa.angle-double-up'},
|
||||||
'undo': {'icon': 'fa.undo'},
|
'undo': {'icon': 'fa.undo'},
|
||||||
'upload': {'icon': 'fa.cloud-upload'},
|
'upload': {'icon': 'fa.cloud-upload'},
|
||||||
'user': {'icon': 'fa.user'},
|
'user': {'icon': 'fa.user'},
|
||||||
'usermo': {'icon': 'fa.user-md'},
|
'usermo': {'icon': 'op.users'},
|
||||||
'users': {'icon': 'fa.users'},
|
'users': {'icon': 'fa.users'},
|
||||||
'video': {'icon': 'fa.file-video-o'}
|
'video': {'icon': 'fa.file-video-o'}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user