mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 11:10:44 +00:00
Reverted that last change, original code just needed a little help to refresh on mac
This commit is contained in:
parent
188d53b3ed
commit
2c430c705f
@ -1,6 +1,5 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>docs/sheep.png</file>
|
|
||||||
<file>docs/index.html</file>
|
<file>docs/index.html</file>
|
||||||
<file>icons/sdcard.png</file>
|
<file>icons/sdcard.png</file>
|
||||||
<file>icons/preferences.png</file>
|
<file>icons/preferences.png</file>
|
||||||
@ -43,5 +42,7 @@
|
|||||||
<file>icons/nographs.png</file>
|
<file>icons/nographs.png</file>
|
||||||
<file>icons/sheep.png</file>
|
<file>icons/sheep.png</file>
|
||||||
<file>docs/update_notes.html</file>
|
<file>docs/update_notes.html</file>
|
||||||
|
<file>docs/sheep.png</file>
|
||||||
|
<file>docs/sheep.jpg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<h1><image src='qrc:/docs/sheep.png' width=64 height=64>SleepyHead v0.9.3 <b>BETA</b></h1>
|
<h1><image src="qrc:/docs/sheep.png" width=64 height=64>SleepyHead v0.9.3 <b>BETA</b></h1>
|
||||||
|
|
||||||
<p><h2><b>Release Notes</b></h2></p>
|
<p><h2><b>Release Notes</b></h2></p>
|
||||||
<p>Hi There!</p>
|
<p>Hi There!</p>
|
||||||
|
27
main.cpp
27
main.cpp
@ -72,23 +72,16 @@ void release_notes()
|
|||||||
|
|
||||||
// Language???
|
// Language???
|
||||||
|
|
||||||
QFile f(":/docs/release_notes.html");
|
web.load(QUrl("qrc:/docs/release_notes.html"));
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
|
||||||
qWarning() << "Could not access release notes";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QTextStream ts(&f);
|
|
||||||
|
|
||||||
QString html=ts.readAll();
|
|
||||||
web.setHtml(html);
|
|
||||||
|
|
||||||
//web.load(QUrl("qrc:/docs/release_notes.html"));
|
|
||||||
//web.page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOn);
|
//web.page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOn);
|
||||||
relnotes.setLayout(&layout);
|
relnotes.setLayout(&layout);
|
||||||
layout.insertWidget(0,&web,1);
|
layout.insertWidget(0,&web,1);
|
||||||
QPushButton okbtn(QObject::tr("&Ok, get on with it.."),&relnotes);
|
QPushButton okbtn(QObject::tr("&Ok, get on with it.."),&relnotes);
|
||||||
relnotes.connect(&okbtn,SIGNAL(clicked()),SLOT(accept()));
|
relnotes.connect(&okbtn,SIGNAL(clicked()),SLOT(accept()));
|
||||||
layout.insertWidget(1,&okbtn,1);
|
layout.insertWidget(1,&okbtn,1);
|
||||||
|
QApplication::processEvents(); // MW: Needed on Mac, as the html has to finish loading
|
||||||
|
|
||||||
relnotes.exec();
|
relnotes.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,17 +94,7 @@ void build_notes()
|
|||||||
relnotes.setWindowTitle("SleepyHead v"+FullVersionString+" Update");
|
relnotes.setWindowTitle("SleepyHead v"+FullVersionString+" Update");
|
||||||
// Language???
|
// Language???
|
||||||
|
|
||||||
QFile f(":/docs/update_notes.html");
|
web.load(QUrl("qrc:/docs/update_notes.html"));
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
|
||||||
qWarning() << "Could not access update notes";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QTextStream ts(&f);
|
|
||||||
|
|
||||||
QString html=ts.readAll();
|
|
||||||
web.setHtml(html);
|
|
||||||
|
|
||||||
//web.load(QUrl("qrc:/docs/update_notes.html"));
|
|
||||||
//web.page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOn);
|
//web.page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOn);
|
||||||
|
|
||||||
relnotes.setLayout(&layout);
|
relnotes.setLayout(&layout);
|
||||||
@ -120,6 +103,8 @@ void build_notes()
|
|||||||
relnotes.connect(&okbtn,SIGNAL(clicked()),SLOT(accept()));
|
relnotes.connect(&okbtn,SIGNAL(clicked()),SLOT(accept()));
|
||||||
layout.insertWidget(1,&okbtn,1);
|
layout.insertWidget(1,&okbtn,1);
|
||||||
layout.setMargin(0);
|
layout.setMargin(0);
|
||||||
|
QApplication::processEvents(); // MW: Needed on Mac, as the html has to finish loading
|
||||||
|
|
||||||
relnotes.setFixedSize(500,400);
|
relnotes.setFixedSize(500,400);
|
||||||
relnotes.exec();
|
relnotes.exec();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user