Skip to content

Commit cfc83d1

Browse files
committed
qtvcp -gcode editor: use better file icons
The new/open/save iconf looked all the same to me. these should be better.
1 parent dcc731b commit cfc83d1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

lib/python/qtvcp/widgets/gcode_editor.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from PyQt5.QtGui import QFont, QFontMetrics, QColor, QIcon
3636
from PyQt5.QtWidgets import QWidget, QAction,\
3737
QVBoxLayout, QToolBar, QLineEdit, QHBoxLayout, QMessageBox, \
38-
QFrame, QLabel
38+
QFrame, QLabel, QStyle
3939

4040
from qtvcp.widgets.widget_baseclass import _HalWidgetBase
4141
from qtvcp.core import Status, Info, Action
@@ -828,19 +828,22 @@ def __init__(self, parent=None):
828828
################################
829829

830830
# 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)
832833
self.newAction.setShortcut('Ctrl+N')
833834
self.newAction.setStatusTip('New document')
834835
self.newAction.triggered.connect(self.newCall)
835836

836837
# 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)
838840
self.openAction.setShortcut('Ctrl+O')
839841
self.openAction.setStatusTip('Open document')
840842
self.openAction.triggered.connect(self.openCall)
841843

842844
# 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)
844847
self.saveAction.setShortcut('Ctrl+S')
845848
self.saveAction.setStatusTip('Save document')
846849
self.saveAction.triggered.connect(self.saveCall)

0 commit comments

Comments
 (0)