diff --git a/BitmapPreview.cpp b/BitmapPreview.cpp index cfb33ff..6080adb 100644 --- a/BitmapPreview.cpp +++ b/BitmapPreview.cpp @@ -121,6 +121,7 @@ void BitmapPreview::paintEvent(QPaintEvent *pe) _converter->paintOverlay(op, _overlayMode, _image); } } else { + p.setPen(Qt::white); p.drawText(QRect(0, 0, width(), height()), Qt::AlignCenter, tr("No Bitmap Loaded")); } } diff --git a/MainWindow.cpp b/MainWindow.cpp index ebc820a..522e40c 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -37,6 +37,7 @@ #include #include #include +#include MainWindow::MainWindow(QWidget *parent) @@ -65,7 +66,7 @@ void MainWindow::initializeConverterList() void MainWindow::initializeUi() { setMinimumSize(800, 600); - setWindowTitle(tr("Micropython Bitmap Tool by Lucky Resistor")); + setWindowTitle(tr("Micropython Bitmap Tool - V%1 - Lucky Resistor").arg(qApp->applicationVersion())); auto centralWidget = new QWidget(); centralWidget->setObjectName("CentralWidget"); @@ -179,12 +180,41 @@ void MainWindow::initializeMenu() qApp->quit(); }); + auto menuEdit = menuBar()->addMenu(tr("Edit")); + menuEdit->addAction(tr("Cut"), [=]{ + QMetaObject::invokeMethod(focusWidget(), "cut"); + }, QKeySequence("Ctrl+X")); + menuEdit->addAction(tr("Copy"), [=]{ + QMetaObject::invokeMethod(focusWidget(), "copy"); + }, QKeySequence("Ctrl+C")); + menuEdit->addAction(tr("Paste"), [=]{ + QMetaObject::invokeMethod(focusWidget(), "paste"); + }, QKeySequence("Ctrl+V")); + auto menuHelp = menuBar()->addMenu(tr("Help")); auto actionAbout = menuHelp->addAction(tr("About...")); + menuHelp->addAction(tr("Lucky Resistor..."), []{ + QDesktopServices::openUrl(QUrl("https://luckyresistor.me/")); + }); + menuHelp->addAction(tr("Project Page..."), []{ + QDesktopServices::openUrl(QUrl("https://luckyresistor.me/applications/micropython-bitmap-tool/")); + }); connect(actionAbout, &QAction::triggered, [=]{ QMessageBox::about(this, tr("Micropython Bitmap Tool by Lucky Resistor"), - tr("

Micropython Bitmap Tool

(c)2021 by Lucky Resistor

" - "

Version %1

").arg(qApp->applicationVersion())); + tr("

Micropython Bitmap Tool

" + "

Copyright (c)2021 by Lucky Resistor

" + "

Version %1

" + "

License

" + "

This program is free software: you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation, either version 3 of the License, or " + "(at your option) any later version.

" + "

This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.

" + "You should have received a copy of the GNU General Public License " + "along with this program. If not, see https://www.gnu.org/licenses/.

").arg(qApp->applicationVersion())); }); auto actionAboutQt = menuHelp->addAction(tr("Information About Qt...")); connect(actionAboutQt, &QAction::triggered, [=]{ diff --git a/MicropythonBitmapTool.pro b/MicropythonBitmapTool.pro index c736f35..29fb710 100644 --- a/MicropythonBitmapTool.pro +++ b/MicropythonBitmapTool.pro @@ -4,7 +4,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 -TARGET = "MicroPython Bitmap Tool" +TARGET = "MicroPythonBitmapTool" # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. diff --git a/data/application.css b/data/application.css index eb2e3bb..53ee096 100644 --- a/data/application.css +++ b/data/application.css @@ -6,9 +6,14 @@ #SettingsPanel { background-color: #616875; + color: #f8f8f8; padding: 16px; } +#SettingsPanel QLabel { + color: #f8f8f8; +} + #BitmapInfo { border: 1px solid rgba(0,0,0,0.25); padding: 8px; diff --git a/main.cpp b/main.cpp index eae2dc7..3cc1424 100644 --- a/main.cpp +++ b/main.cpp @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setApplicationName("MicroPython Bitmap Tool"); - a.setApplicationVersion("1.0"); + a.setApplicationVersion("1.0.1"); a.setApplicationDisplayName("MicroPython Bitmap Tool"); a.setOrganizationDomain("luckyresistor.me"); a.setOrganizationName("Lucky Resistoor");