|
35 | 35 | from PyQt5.QtGui import QFont, QFontMetrics, QColor, QIcon |
36 | 36 | from PyQt5.QtWidgets import QWidget, QAction,\ |
37 | 37 | QVBoxLayout, QToolBar, QLineEdit, QHBoxLayout, QMessageBox, \ |
38 | | - QFrame, QLabel |
| 38 | + QFrame, QLabel, QStyle |
39 | 39 |
|
40 | 40 | from qtvcp.widgets.widget_baseclass import _HalWidgetBase |
41 | 41 | from qtvcp.core import Status, Info, Action |
@@ -828,19 +828,22 @@ def __init__(self, parent=None): |
828 | 828 | ################################ |
829 | 829 |
|
830 | 830 | # Create new action |
831 | | - self.newAction = QAction(QIcon.fromTheme('document-new'), 'New', self) |
| 831 | + icon = self.style().standardIcon( QStyle.SP_FileIcon) |
| 832 | + self.newAction = QAction(icon, 'New', self) |
832 | 833 | self.newAction.setShortcut('Ctrl+N') |
833 | 834 | self.newAction.setStatusTip('New document') |
834 | 835 | self.newAction.triggered.connect(self.newCall) |
835 | 836 |
|
836 | 837 | # Create open action |
837 | | - self.openAction = QAction(QIcon.fromTheme('document-open'), '&Open', self) |
| 838 | + icon = self.style().standardIcon( QStyle.SP_DirOpenIcon) |
| 839 | + self.openAction = QAction(icon, '&Open', self) |
838 | 840 | self.openAction.setShortcut('Ctrl+O') |
839 | 841 | self.openAction.setStatusTip('Open document') |
840 | 842 | self.openAction.triggered.connect(self.openCall) |
841 | 843 |
|
842 | 844 | # Create save action |
843 | | - self.saveAction = QAction(QIcon.fromTheme('document-save'), '&Save', self) |
| 845 | + icon = self.style().standardIcon( QStyle.SP_DialogSaveButton) |
| 846 | + self.saveAction = QAction(icon, '&Save', self) |
844 | 847 | self.saveAction.setShortcut('Ctrl+S') |
845 | 848 | self.saveAction.setStatusTip('Save document') |
846 | 849 | self.saveAction.triggered.connect(self.saveCall) |
|
0 commit comments