Skip to content

Commit

Permalink
fix about dialog credits content + mediainfo lib creds
Browse files Browse the repository at this point in the history
  • Loading branch information
ozmartian committed May 11, 2017
1 parent c15ecd8 commit 8f97950
Show file tree
Hide file tree
Showing 8 changed files with 99,972 additions and 99,886 deletions.
2 changes: 1 addition & 1 deletion vidcutter/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def __init__(self, parent=None):
</p>
</td>
</tr>
</table>''' % '#EA95FF' if self.parent.parent.theme == 'dark' else '#441D4E')
</table>''' % ('#EA95FF' if self.parent.parent.theme == 'dark' else '#441D4E'))


class LicenseTab(BaseTab):
Expand Down
Binary file modified vidcutter/images/dark/mediainfo-heading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vidcutter/images/light/mediainfo-heading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions vidcutter/libs/videoservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QMessageBox

# from vidcutter.libs.mediainfo import MediaInfo


class VideoService(QObject):
def __init__(self, parent=None):
Expand Down
199,803 changes: 99,937 additions & 99,866 deletions vidcutter/resources.py

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions vidcutter/styles/dark.qss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*************************************************************************
w/*************************************************************************
* VidCutter - a simple yet fast & accurate video cutter & joiner
*
* copyright © 2017 Pete Alexandrou
Expand Down Expand Up @@ -48,6 +48,11 @@ QDialog#aboutwidget {
background-color: #1B2326;
}

QDialog#videoinfo {
border-image: url(':/images/dialog-backdrop-02.png') 0 0 0 0 stretch stretch;
background-color: #1B2326;
}

QDialog#updaterdialog {
border-image: url(':/images/dialog-backdrop.png') 0 0 0 0 stretch stretch;
background-color: #1B2326;
Expand Down Expand Up @@ -220,16 +225,13 @@ QStatusBar::item {

/* -------------------------------------------------------------------------- */

#aboutwidget QTextBrowser {
QTextBrowser {
background-color: rgba(12, 15, 16, 0.9);
color: #FFF;
border: none;
}

#mediainfo_advanced QTextBrowser {
background: transparent;
color: #FFF;
border: none;
#aboutwidget QTextBrowser {
border: no ne;
}

/* -------------------------------------------------------------------------- */
Expand Down
12 changes: 7 additions & 5 deletions vidcutter/styles/light.qss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ QDialog#aboutwidget {
background-color: #EFF0F1;
}

QDialog#videoinfo {
border-image: url(':/images/dialog-backdrop-02.png') 0 0 0 0 stretch stretch;
background-color: #EFF0F1;
}

QDialog#updaterdialog {
border-image: url(':/images/dialog-backdrop.png') 0 0 0 0 stretch stretch;
background-color: #EFF0F1;
Expand Down Expand Up @@ -219,15 +224,12 @@ QStatusBar::item {

/* -------------------------------------------------------------------------- */

#aboutwidget QTextBrowser {
QTextBrowser {
background-color: rgba(255, 255, 255, 0.8);
color: #000;
border: none;
}

#mediainfo_advanced QTextBrowser {
background: transparent;
color: #000;
#aboutwidget QTextBrowser {
border: none;
}

Expand Down
23 changes: 18 additions & 5 deletions vidcutter/videoinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from PyQt5.QtCore import QSize, Qt
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QSizePolicy, QTextBrowser, QVBoxLayout
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QSizePolicy, QTextBrowser, QHBoxLayout, QVBoxLayout


class VideoInfo(QDialog):
Expand All @@ -36,10 +36,11 @@ class VideoInfo(QDialog):
'HIGH': QSize(1080, 700)
}

def __init__(self, media, parent=None, flags=Qt.WindowCloseButtonHint):
def __init__(self, media, parent=None, flags=Qt.Dialog | Qt.WindowCloseButtonHint):
super(VideoInfo, self).__init__(parent, flags)
self.logger = logging.getLogger(__name__)
self.parent = parent
self.setObjectName('videoinfo')
if hasattr(self.parent, 'videoService'):
self.service = self.parent.videoService
else:
Expand All @@ -48,7 +49,6 @@ def __init__(self, media, parent=None, flags=Qt.WindowCloseButtonHint):
self.setContentsMargins(0, 0, 0, 0)
self.setWindowModality(Qt.NonModal)
self.setWindowIcon(self.parent.parent.windowIcon())
self.setObjectName('mediainfo')
self.setWindowTitle('Media information')
self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
self.setMinimumSize(self.modes.get(self.parent.parent.scale))
Expand All @@ -73,8 +73,8 @@ def __init__(self, media, parent=None, flags=Qt.WindowCloseButtonHint):
<div align="center" style="margin:15px;">%s</div>''' % ('#C681D5' if self.parent.theme == 'dark' else '#642C68',
'#C681D5' if self.parent.theme == 'dark' else '#642C68',
self.service.metadata(media))

content = QTextBrowser(self.parent)
content.setObjectName('genericdialog2')
content.setHtml(metadata)

buttons = QDialogButtonBox(QDialogButtonBox.Close)
Expand All @@ -83,5 +83,18 @@ def __init__(self, media, parent=None, flags=Qt.WindowCloseButtonHint):
layout = QVBoxLayout()
layout.addWidget(QLabel(pixmap=QPixmap(':/images/%s/mediainfo-heading.png' % self.parent.theme)))
layout.addWidget(content)
layout.addWidget(buttons)

mediainfo_version = self.service.cmdExec(self.service.mediainfo, '--version', True)
if len(mediainfo_version) >= 2:
mediainfo_version = mediainfo_version.split('\n')[1]
mediainfo_label = QLabel('<div style="font-size:11px;"><b>Media information by:</b><br/>%s @ '
% mediainfo_version + '<a href="https://mediaarea.net" target="_blank">' +
'https://mediaarea.net</a></div>')
button_layout = QHBoxLayout()
button_layout.addWidget(mediainfo_label)
button_layout.addWidget(buttons)
layout.addLayout(button_layout)
else:
layout.addWidget(buttons)

self.setLayout(layout)

0 comments on commit 8f97950

Please sign in to comment.