Skip to content

Commit 3f78655

Browse files
committed
New design and layout for the About dialog to match Cosmic Dusk design.
1 parent 57a9c1b commit 3f78655

File tree

7 files changed

+49413
-20096
lines changed

7 files changed

+49413
-20096
lines changed

images/AboutLogo.png

102 KB
Loading

images/[email protected]

274 KB
Loading

images/openshot-logo.svg

+5,289-27
Loading

src/classes/openshot_rc.py

+44,014-19,971
Large diffs are not rendered by default.

src/themes/cosmic/theme.py

-7
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,6 @@ def __init__(self, app):
453453
color: #666666;
454454
}
455455
456-
QWidget#aboutDialog QWidget#txtversion {
457-
background-color: #141923;
458-
padding-top: 10px;
459-
padding-bottom: 10px;
460-
border-radius: 4px;
461-
}
462-
463456
.property_value {
464457
foreground-color: #0078FF;
465458
background-color: #283241;

src/windows/about.py

+46-37
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,21 @@ def __init__(self):
9696
self.app = get_app()
9797
_ = self.app._tr
9898

99-
# Load logo banner (using display DPI)
100-
icon = QIcon(":/about/AboutLogo.png")
101-
self.lblAboutLogo.setPixmap(icon.pixmap(icon.availableSizes()[0]))
99+
self.setStyleSheet("""
100+
QDialog {
101+
background-image: url(:/about/AboutLogo.png);
102+
background-repeat: no-repeat;
103+
background-position: center;
104+
background-size: stretch;
105+
margin: 0px;
106+
padding: 0px;
107+
border: none;
108+
}
109+
QLabel#txtversion, QLabel#lblAboutCompany {
110+
background: transparent;
111+
margin-bottom: 10px;
112+
}
113+
""")
102114

103115
# Hide chnagelog button by default
104116
self.btnchangelog.setVisible(False)
@@ -113,45 +125,34 @@ def __init__(self):
113125
else:
114126
log.warn("No changelog files found, disabling button")
115127

116-
create_text = _('Create & Edit Amazing Videos and Movies')
117128
description_text = _("OpenShot Video Editor is an Award-Winning, Free, and<br> Open-Source Video Editor for Linux, Mac, Chrome OS, and Windows.")
118-
learnmore_text = _('Learn more')
119129
copyright_text = _('Copyright &copy; %(begin_year)s-%(current_year)s') % {
120130
'begin_year': '2008',
121131
'current_year': str(datetime.datetime.today().year)
122132
}
123133
about_html = '''
124-
<html><head/><body style="padding:24px 0;"><hr/>
125-
<div align="center" style="margin:12px 0;">
126-
<p style="font-size:10pt;font-weight:600;margin-bottom:18px;">
127-
%s
128-
</p>
129-
<p style="font-size:10pt;margin-bottom:12px;">%s
134+
<div align="center" style="">
135+
<p style="font-size:11pt; font-weight: 300;">
130136
<a href="https://www.openshot.org/%s?r=about-us"
131-
style="text-decoration:none;">%s</a>
137+
style="text-decoration:none; color: #ffffff;">%s</a>
132138
</p>
133139
</div>
134-
</body></html>
135140
''' % (
136-
create_text,
137-
description_text,
138141
info.website_language(),
139-
learnmore_text)
142+
description_text,)
140143
company_html = '''
141-
<html><head/>
142-
<body style="font-size:10pt;font-weight:400;font-style:normal;padding:24px 0;">
143-
<hr />
144-
<div style="margin:12px 0;font-weight:600;" align="center">
145-
%s
144+
<div style="font-weight:400;" align="right">
145+
%s<br>
146146
<a href="http://www.openshotstudios.com?r=about-us"
147-
style="text-decoration:none;">OpenShot Studios, LLC</a><br/>
147+
style="text-decoration:none; color: #91C3FF;">OpenShot Studios, LLC</a>
148148
</div>
149-
</body></html>
150149
''' % (copyright_text)
151150

152151
# Set description and company labels
153152
self.lblAboutDescription.setText(about_html)
154153
self.lblAboutCompany.setText(company_html)
154+
self.lblAboutCompany.setAlignment(Qt.AlignRight | Qt.AlignBottom)
155+
self.txtversion.setAlignment(Qt.AlignLeft | Qt.AlignBottom)
155156

156157
# set events handlers
157158
self.btncredit.clicked.connect(self.load_credit)
@@ -169,8 +170,13 @@ def __init__(self):
169170

170171
def display_release(self, version_text):
171172

172-
self.txtversion.setText(version_text)
173-
self.txtversion.setAlignment(Qt.AlignCenter)
173+
version_html = '''
174+
<div style="font-weight:400;" align="left">
175+
%s
176+
</div>
177+
''' % (version_text)
178+
179+
self.txtversion.setText(version_html)
174180

175181
def get_current_release(self):
176182
"""Get the current version """
@@ -211,26 +217,33 @@ def get_release_from_http(self):
211217
string_release_notes = _("Release Notes")
212218
string_official = _("Official")
213219
version_date = version_info.get("date")
220+
221+
# Parse the date string into a datetime object
222+
date_obj = datetime.datetime.strptime(version_date, "%Y-%m-%d %H:%M")
223+
formatted_date = date_obj.strftime("%Y-%m-%d")
224+
214225
if frozen_git_SHA == release_git_SHA:
215226
# Remove -release-candidate... from build name
216-
log.warning("Official release detected with SHA (%s) for v%s" %
217-
(release_git_SHA, info.VERSION))
227+
log.warning("Official release detected with SHA (%s) for v%s" % (release_git_SHA, info.VERSION))
218228
build_name = build_name.replace("-candidate", "")
219-
frozen_version_label = f'<br/><br/><b>{build_name} ({string_official})</b><br/>{string_release_date}: {version_date}<br><a href="{release_notes}" style="text-decoration:none;">{string_release_notes}</a>'
229+
frozen_version_label = f'{build_name} | {string_official}<br/>{string_release_date}: {formatted_date}'
230+
if string_release_notes:
231+
frozen_version_label += f' | <a href="{release_notes}" style="text-decoration:none;color: #91C3FF;">{string_release_notes}</a>'
220232
else:
221233
# Display current build name - unedited
222234
log.warning("Build SHA (%s) does not match an official release SHA (%s) for v%s" %
223235
(frozen_git_SHA, release_git_SHA, info.VERSION))
224-
frozen_version_label = f"<br/><br/><b>{build_name}</b><br/>{string_release_date}: {version_date}"
236+
frozen_version_label = f"{build_name}<br/>{string_release_date}: {formatted_date}"
225237

226238
# Init some variables
227239
openshot_qt_version = _("Version: %s") % info.VERSION
228-
libopenshot_version = "libopenshot: %s" % openshot.OPENSHOT_VERSION_FULL
240+
libopenshot_version = "%s" % openshot.OPENSHOT_VERSION_FULL
241+
version_text = f"{openshot_qt_version} | {libopenshot_version}"
242+
if frozen_version_label:
243+
version_text += f"<br/>{frozen_version_label}"
229244

230245
# emit release found
231-
self.releaseFound.emit("<b>%s</b><br/>%s%s" % (openshot_qt_version,
232-
libopenshot_version,
233-
frozen_version_label))
246+
self.releaseFound.emit(version_text)
234247

235248
except Exception as Ex:
236249
log.error("Failed to get version from: %s" % RELEASE_URL % info.VERSION)
@@ -313,11 +326,9 @@ def __init__(self):
313326
# Update supporter button
314327
supporter_text = _("Become a Supporter")
315328
supporter_html = '''
316-
<html><head/><body>
317329
<p align="center">
318330
<a href="https://www.openshot.org/%sdonate/?app-about-us">%s</a>
319331
</p>
320-
</body></html>
321332
''' % (info.website_language(), supporter_text)
322333
self.lblBecomeSupporter.setText(supporter_html)
323334

@@ -434,11 +445,9 @@ def __init__(self):
434445
# Update github link button
435446
github_text = _("OpenShot on GitHub")
436447
github_html = '''
437-
<html><head/><body>
438448
<p align="center">
439449
<a href="https://github.com/OpenShot/">%s</a>
440450
</p>
441-
</body></html>
442451
''' % (github_text)
443452
self.lblGitHubLink.setText(github_html)
444453

src/windows/ui/about.ui

+64-54
Original file line numberDiff line numberDiff line change
@@ -6,92 +6,89 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>520</width>
10-
<height>455</height>
9+
<width>523</width>
10+
<height>349</height>
1111
</rect>
1212
</property>
1313
<property name="maximumSize">
1414
<size>
15-
<width>620</width>
16-
<height>811</height>
15+
<width>540</width>
16+
<height>402</height>
1717
</size>
1818
</property>
19-
<property name="cursor">
20-
<cursorShape>ArrowCursor</cursorShape>
21-
</property>
2219
<property name="windowTitle">
2320
<string>About OpenShot</string>
2421
</property>
2522
<property name="windowIcon">
2623
<iconset>
2724
<normaloff>:/openshot.svg</normaloff>:/openshot.svg</iconset>
2825
</property>
29-
<property name="locale">
30-
<locale language="English" country="UnitedStates"/>
31-
</property>
3226
<layout class="QGridLayout" name="gridLayout">
33-
<item row="0" column="0" colspan="3">
27+
<item row="1" column="0" colspan="3">
3428
<layout class="QVBoxLayout" name="verticalLayout">
3529
<item>
36-
<widget class="QLabel" name="lblAboutLogo">
30+
<widget class="QLabel" name="lblAboutDescription">
3731
<property name="sizePolicy">
38-
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
32+
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
3933
<horstretch>0</horstretch>
4034
<verstretch>0</verstretch>
4135
</sizepolicy>
4236
</property>
43-
</widget>
44-
</item>
45-
<item>
46-
<widget class="QLabel" name="txtversion">
47-
<property name="autoFillBackground">
48-
<bool>true</bool>
49-
</property>
5037
<property name="styleSheet">
51-
<string notr="true">font-size: 4em;</string>
52-
</property>
53-
<property name="lineWidth">
54-
<number>1</number>
55-
</property>
56-
<property name="text">
57-
<string/>
38+
<string notr="true">font-size: 16px; font-weight: bold; color: #FFFFFF; margin-bottom: 20px;</string>
5839
</property>
59-
<property name="textFormat">
60-
<enum>Qt::RichText</enum>
61-
</property>
62-
<property name="openExternalLinks">
63-
<bool>true</bool>
64-
</property>
65-
</widget>
66-
</item>
67-
<item>
68-
<widget class="QLabel" name="lblAboutDescription">
6940
<property name="text">
70-
<string/>
41+
<string>Create &amp; Edit Amazing Videos and Movies</string>
7142
</property>
7243
<property name="alignment">
73-
<set>Qt::AlignCenter</set>
74-
</property>
75-
<property name="openExternalLinks">
76-
<bool>true</bool>
44+
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
7745
</property>
7846
</widget>
7947
</item>
8048
<item>
81-
<widget class="QLabel" name="lblAboutCompany">
82-
<property name="text">
83-
<string notr="true"/>
84-
</property>
85-
<property name="textFormat">
86-
<enum>Qt::RichText</enum>
87-
</property>
88-
<property name="openExternalLinks">
89-
<bool>true</bool>
90-
</property>
91-
</widget>
49+
<layout class="QHBoxLayout" name="horizontalLayoutVersionCopyright">
50+
<item>
51+
<widget class="QLabel" name="txtversion">
52+
<property name="sizePolicy">
53+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
54+
<horstretch>0</horstretch>
55+
<verstretch>0</verstretch>
56+
</sizepolicy>
57+
</property>
58+
<property name="styleSheet">
59+
<string notr="true">font-size: 12px; color: #FFFFFF; </string>
60+
</property>
61+
<property name="text">
62+
<string>Version Loading</string>
63+
</property>
64+
<property name="alignment">
65+
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
66+
</property>
67+
</widget>
68+
</item>
69+
<item>
70+
<widget class="QLabel" name="lblAboutCompany">
71+
<property name="sizePolicy">
72+
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
73+
<horstretch>0</horstretch>
74+
<verstretch>0</verstretch>
75+
</sizepolicy>
76+
</property>
77+
<property name="styleSheet">
78+
<string notr="true">font-size: 12px; color: #FFFFFF; </string>
79+
</property>
80+
<property name="text">
81+
<string>© 2024 OpenShot Studios, LLC</string>
82+
</property>
83+
<property name="alignment">
84+
<set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
85+
</property>
86+
</widget>
87+
</item>
88+
</layout>
9289
</item>
9390
<item>
94-
<layout class="QHBoxLayout" name="horizontalLayout">
91+
<layout class="QHBoxLayout" name="horizontalLayoutButtons">
9592
<item>
9693
<widget class="QPushButton" name="btncredit">
9794
<property name="text">
@@ -124,6 +121,19 @@
124121
</item>
125122
</layout>
126123
</item>
124+
<item row="0" column="0">
125+
<spacer name="verticalSpacer">
126+
<property name="orientation">
127+
<enum>Qt::Vertical</enum>
128+
</property>
129+
<property name="sizeHint" stdset="0">
130+
<size>
131+
<width>20</width>
132+
<height>40</height>
133+
</size>
134+
</property>
135+
</spacer>
136+
</item>
127137
</layout>
128138
</widget>
129139
<resources/>

0 commit comments

Comments
 (0)