Commit 22f0ed03 authored by Ingemar Ceicer's avatar Ingemar Ceicer

monospace


Former-commit-id: 60aa6741
Former-commit-id: 6d8d2c06
parent be493ee6
......@@ -29,28 +29,26 @@ ExtQLineEdit::~ExtQLineEdit()
void ExtQLineEdit::mouseDoubleClickEvent ( QMouseEvent * event )
void ExtQLineEdit::mouseDoubleClickEvent(QMouseEvent * event)
{
this->setToolTip(tr(""));
if (event->button() == Qt::LeftButton)
{
if (this->text() != "" && this->text().mid(0,7) != tr("Mission"))
{
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(this->text());
this->setToolTip(tr("Hash sum has been copied to the clipboard"));
}
if(event->button() == Qt::LeftButton) {
if(this->text() != "" && this->text().mid(0, 7) != tr("Mission")) {
QClipboard *clipboard = QApplication::clipboard();
clipboard->setText(this->text());
this->setToolTip(tr("Hash sum has been copied to the clipboard"));
}
}
}
void ExtQLineEdit::mouseMoveEvent(QMouseEvent * event)
{
event->accept();
if (this->text() != "" && this->text().mid(0,7) != tr("Mission"))
{
if (this->toolTip() != tr("Hash sum has been copied to the clipboard"))
this->setToolTip(tr("Double-click to copy to clipboard"));
}
else
if(this->text() != "" && this->text().mid(0, 7) != tr("Mission")) {
if(this->toolTip() != tr("Hash sum has been copied to the clipboard"))
this->setToolTip(tr("Double-click to copy to clipboard"));
} else
this->setToolTip(tr(""));
}
<RCC>
<qresource prefix="/fonts">
<file>fonts/Ubuntu-M.ttf</file>
</qresource>
</RCC>
......@@ -876,6 +876,14 @@ void Hash::license()
// ipac Ui::Lic *ui2 = new Ui::Lic;
ui2 = new Ui::Lic;
ui2->setupUi(d);
// Font
QString fontPath = ":/fonts/fonts/UbuntuMono-R.ttf";
int id = QFontDatabase::addApplicationFont(fontPath);
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
QFont default_font(family);
default_font.setPointSize(22);
ui2->textBrowser->setFont(default_font);
// End Font
ui2->textBrowser->setPlainText(content);
d->setWindowFlags(Qt::WindowSystemMenuHint);
ui2->pbOpenFile->hide();
......
......@@ -70,7 +70,7 @@ class Hash : public QMainWindow
Q_OBJECT
public:
explicit Hash(QWidget *parent = 0);
explicit Hash(QWidget *parent = nullptr);
~Hash();
......
......@@ -41,7 +41,8 @@ RC_FILE = myapp.rc
#CODECFORSRC = UTF-8
TRANSLATIONS += hashSum_sv_SE.ts hashSum_el_GR.ts hashSum_de_DE.ts hashSum_xx_XX.ts
RESOURCES += myres.qrc
RESOURCES += myres.qrc \
fonts.qrc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment