- added a new package to be installed in Linux to make available the black theme for FlatCAM beta
- moved all the 'share' resources (icons) to the 'assets/resources' folder - some more fixes to problems generated by latest changes in the open handlers - modified the make_freezed.py script for the new location of the icons - added a fix for the ConnectionRefusedError in Linux that is issued when first running after a FlatCAM crash
This commit is contained in:
@@ -35,7 +35,8 @@ class ObjectUI(QtWidgets.QWidget):
|
||||
put UI elements in ObjectUI.custom_box (QtWidgets.QLayout).
|
||||
"""
|
||||
|
||||
def __init__(self, app, icon_file='share/flatcam_icon32.png', title=_('FlatCAM Object'), parent=None, common=True):
|
||||
def __init__(self, app, icon_file='assets/resources/flatcam_icon32.png', title=_('FlatCAM Object'),
|
||||
parent=None, common=True):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
|
||||
self.app = app
|
||||
@@ -48,9 +49,9 @@ class ObjectUI(QtWidgets.QWidget):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
self.setLayout(layout)
|
||||
@@ -60,7 +61,7 @@ class ObjectUI(QtWidgets.QWidget):
|
||||
layout.addLayout(self.title_box)
|
||||
|
||||
# ## Page Title icon
|
||||
pixmap = QtGui.QPixmap(icon_file.replace('share', self.resource_loc))
|
||||
pixmap = QtGui.QPixmap(icon_file.replace('assets/resources', self.resource_loc))
|
||||
self.icon = QtWidgets.QLabel()
|
||||
self.icon.setPixmap(pixmap)
|
||||
self.title_box.addWidget(self.icon, stretch=0)
|
||||
@@ -713,9 +714,9 @@ class ExcellonObjectUI(ObjectUI):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
ObjectUI.__init__(self, title=_('Excellon Object'),
|
||||
icon_file=self.resource_loc + '/drill32.png',
|
||||
@@ -1412,9 +1413,9 @@ class GeometryObjectUI(ObjectUI):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
super(GeometryObjectUI, self).__init__(
|
||||
title=_('Geometry Object'),
|
||||
@@ -2108,9 +2109,9 @@ class CNCObjectUI(ObjectUI):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
ObjectUI.__init__(
|
||||
self, title=_('CNC Job Object'),
|
||||
@@ -2441,9 +2442,9 @@ class ScriptObjectUI(ObjectUI):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
ObjectUI.__init__(self, title=_('Script Object'),
|
||||
icon_file=self.resource_loc + '/script_new24.png',
|
||||
@@ -2508,9 +2509,9 @@ class DocumentObjectUI(ObjectUI):
|
||||
theme = 'white'
|
||||
|
||||
if theme == 'white':
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
else:
|
||||
self.resource_loc = 'share'
|
||||
self.resource_loc = 'assets/resources'
|
||||
|
||||
ObjectUI.__init__(self, title=_('Document Object'),
|
||||
icon_file=self.resource_loc + '/notes16_1.png',
|
||||
|
||||
Reference in New Issue
Block a user