forked from openlp/openlp
Removed icons from menu items on Mac OS X
This commit is contained in:
parent
cf8f15964c
commit
ceeb1b0118
@ -33,7 +33,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common import Registry, UiStrings, translate
|
||||
from openlp.core.common import Registry, UiStrings, translate, is_macosx
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.utils.actions import ActionList
|
||||
|
||||
@ -247,6 +247,8 @@ def create_action(parent, name, **kwargs):
|
||||
"""
|
||||
action = QtGui.QAction(parent)
|
||||
action.setObjectName(name)
|
||||
if is_macosx():
|
||||
action.setIconVisibleInMenu(False)
|
||||
if kwargs.get('text'):
|
||||
action.setText(kwargs.pop('text'))
|
||||
if kwargs.get('icon'):
|
||||
|
@ -118,9 +118,11 @@ class Ui_MainWindow(object):
|
||||
self.recent_files_menu = QtGui.QMenu(self.file_menu)
|
||||
self.recent_files_menu.setObjectName('recentFilesMenu')
|
||||
self.file_import_menu = QtGui.QMenu(self.file_menu)
|
||||
if not is_macosx():
|
||||
self.file_import_menu.setIcon(build_icon(u':/general/general_import.png'))
|
||||
self.file_import_menu.setObjectName('file_import_menu')
|
||||
self.file_export_menu = QtGui.QMenu(self.file_menu)
|
||||
if not is_macosx():
|
||||
self.file_export_menu.setIcon(build_icon(u':/general/general_export.png'))
|
||||
self.file_export_menu.setObjectName('file_export_menu')
|
||||
# View Menu
|
||||
|
Loading…
Reference in New Issue
Block a user