diff --git a/AppGUI/MainGUI.py b/AppGUI/MainGUI.py index 6950fac5..0dc75b84 100644 --- a/AppGUI/MainGUI.py +++ b/AppGUI/MainGUI.py @@ -543,6 +543,12 @@ class MainGUI(QtWidgets.QMainWindow): QtGui.QIcon(self.app.resource_location + '/shortcuts24.png'), _('Shortcuts List\tF3')) self.menuhelp_videohelp = self.menuhelp.addAction( QtGui.QIcon(self.app.resource_location + '/youtube32.png'), _('YouTube Channel\tF4')) + + self.menuhelp.addSeparator() + + self.menuhelp_readme = self.menuhelp.addAction( + QtGui.QIcon(self.app.resource_location + '/warning.png'), _('ReadMe?')) + self.menuhelp_about = self.menuhelp.addAction( QtGui.QIcon(self.app.resource_location + '/about32.png'), _('About FlatCAM')) diff --git a/App_Main.py b/App_Main.py index 50459367..4d7ea3da 100644 --- a/App_Main.py +++ b/App_Main.py @@ -879,6 +879,7 @@ class App(QtCore.QObject): self.ui.menutoolshell.triggered.connect(self.ui.toggle_shell_ui) self.ui.menuhelp_about.triggered.connect(self.on_about) + self.ui.menuhelp_readme.triggered.connect(self.on_readme) self.ui.menuhelp_manual.triggered.connect(lambda: webbrowser.open(self.manual_url)) self.ui.menuhelp_report_bug.triggered.connect(lambda: webbrowser.open(self.bug_report_url)) self.ui.menuhelp_exc_spec.triggered.connect(lambda: webbrowser.open(self.excellon_spec_url)) @@ -2917,6 +2918,83 @@ class App(QtCore.QObject): AboutDialog(app=self, parent=self.ui).exec_() + def on_readme(self): + class AboutDialog(QtWidgets.QDialog): + def __init__(self, app, parent=None): + QtWidgets.QDialog.__init__(self, parent) + + self.app = app + + open_source_link = "Open Source" + new_features_link = "new features" + + bugs_link = "report bugs" + donation_link = "donation" + + # Icon and title + self.setWindowIcon(parent.app_icon) + self.setWindowTitle(_("Important Information's")) + self.resize(720, 330) + + logo = QtWidgets.QLabel() + logo.setPixmap(QtGui.QPixmap(self.app.resource_location + '/flatcam_icon256.png')) + + content = QtWidgets.QLabel( + "This program is %s and free in a very wide meaning of the word.
" + "Yet it cannot evolve without contributions.

" + "If you want to see this application evolve and grow, or if you make money with it,
" + "you can contribute to the development yourself by:
" + "" + "There are no strings attached.
" + "You don't have to make a %s, and it is totally optional but:" + "" % + (open_source_link, new_features_link, bugs_link, donation_link, donation_link) + ) + content.setOpenExternalLinks(True) + closebtn = QtWidgets.QPushButton(_("Close")) + + # layouts + layout1 = QtWidgets.QVBoxLayout() + self.setLayout(layout1) + + pal = QtGui.QPalette() + pal.setColor(QtGui.QPalette.Background, Qt.white) + + self.grid_lay = QtWidgets.QGridLayout() + self.grid_lay.setHorizontalSpacing(20) + self.grid_lay.setColumnStretch(0, 0) + self.grid_lay.setColumnStretch(1, 1) + + content_widget = QtWidgets.QWidget() + content_widget.setLayout(self.grid_lay) + scroll_area = QtWidgets.QScrollArea() + scroll_area.setWidget(content_widget) + scroll_area.setWidgetResizable(True) + scroll_area.setFrameShape(QtWidgets.QFrame.NoFrame) + scroll_area.setPalette(pal) + + self.grid_lay.addWidget(logo, 0, 0) + self.grid_lay.addWidget(content, 0, 1) + layout1.addWidget(scroll_area) + + layout2 = QtWidgets.QHBoxLayout() + layout1.addLayout(layout2) + layout2.addStretch() + layout2.addWidget(closebtn) + + closebtn.clicked.connect(self.accept) + + AboutDialog(app=self, parent=self.ui).exec_() + def install_bookmarks(self, book_dict=None): """ Install the bookmarks actions in the Help menu -> Bookmarks diff --git a/CHANGELOG.md b/CHANGELOG.md index 468599c7..b296e4c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta - started to work on moving the Isolation Routing from the Gerber Object UI to it's own tool - created a new tool: Isolation Routing Tool: work in progress - some fixes in NCC Tool +- added a dialog in Menu -> Help -> ReadMe? 24.05.2020