Add changelog tab
This commit is contained in:
parent
242afc4475
commit
2ee5ea78a8
|
@ -0,0 +1,48 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Droid+Sans+Mono');
|
||||
|
||||
body .gist .gist-file {
|
||||
margin-bottom: 0;
|
||||
border: 1px dashed #adb5bd;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
body .gist .gist-data {
|
||||
border-bottom: none;
|
||||
border-radius: 0;
|
||||
background-color: #f1f3f5;
|
||||
}
|
||||
|
||||
body .gist .blob-wrapper {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
body .gist .highlight {
|
||||
background-color: transparent;
|
||||
font-family: 'Droid Sans Mono', monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
body .gist .highlight td {
|
||||
padding: 5px 15px !important;
|
||||
line-height: 1;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
body .gist tr:first-child td {
|
||||
padding-top: 15px !important;
|
||||
}
|
||||
|
||||
body .gist tr:last-child td {
|
||||
padding-bottom: 15px !important;
|
||||
}
|
||||
|
||||
body .gist .blob-num {
|
||||
color: #ced4da;
|
||||
background-color: #495057;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
body .gist .gist-meta {
|
||||
display: none;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<link rel="stylesheet" type="text/css" href="changelog.css" media="screen" />
|
||||
|
||||
<center><script src="https://gist.github.com/leha-code/3e8fea40346536b451e45fc1728ed250.js?file=Planet_changelog.md"></script></center>
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -28,16 +28,19 @@ import os
|
|||
import random
|
||||
from datetime import date
|
||||
import json
|
||||
import pathlib
|
||||
|
||||
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWebKit import *
|
||||
from PyQt5.QtWebKitWidgets import *
|
||||
|
||||
import qdarkstyle
|
||||
import qdarktheme
|
||||
|
||||
|
||||
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()
|
||||
dark_stylesheet =qdarktheme.load_stylesheet()
|
||||
|
||||
USER = os.getenv("USER")
|
||||
|
||||
|
@ -74,6 +77,8 @@ class Planet(QMainWindow):
|
|||
tabs.setTabIcon(features_tab, QIcon('assets/heart512.png'))
|
||||
mods_tab = tabs.addTab(self.custom_mods_tab(), "Mods")
|
||||
tabs.setTabIcon(mods_tab, QIcon('assets/portal512.png'))
|
||||
changelog_tab = tabs.addTab(self.changelog_tab(), "Changelog")
|
||||
tabs.setTabIcon(changelog_tab, QIcon('assets/pi512.png'))
|
||||
|
||||
self.setCentralWidget(tabs)
|
||||
|
||||
|
@ -232,6 +237,12 @@ class Planet(QMainWindow):
|
|||
widget.setLayout(fakelayout)
|
||||
|
||||
return widget
|
||||
|
||||
def changelog_tab(self):
|
||||
web = QWebView()
|
||||
web.load(QUrl().fromLocalFile(f"{pathlib.Path(__file__).parent.absolute()}/assets/changelog.html"))
|
||||
print(f"{pathlib.Path(__file__).parent.absolute()}/assets/changelog.html")
|
||||
return web
|
||||
|
||||
def set_features(self):
|
||||
for feature in self.features:
|
||||
|
@ -252,7 +263,7 @@ class Planet(QMainWindow):
|
|||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
app.setStyleSheet(dark_stylesheet)
|
||||
app.setPalette(qdarktheme.load_palette("dark"))
|
||||
|
||||
window = Planet()
|
||||
window.show()
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
pyqt5
|
||||
qdarkstyle
|
||||
pyqtdarktheme
|
||||
|
|
Loading…
Reference in New Issue