@@ -96,9 +96,21 @@ def __init__(self):
96
96
self .app = get_app ()
97
97
_ = self .app ._tr
98
98
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
+ """ )
102
114
103
115
# Hide chnagelog button by default
104
116
self .btnchangelog .setVisible (False )
@@ -113,45 +125,34 @@ def __init__(self):
113
125
else :
114
126
log .warn ("No changelog files found, disabling button" )
115
127
116
- create_text = _ ('Create & Edit Amazing Videos and Movies' )
117
128
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' )
119
129
copyright_text = _ ('Copyright © %(begin_year)s-%(current_year)s' ) % {
120
130
'begin_year' : '2008' ,
121
131
'current_year' : str (datetime .datetime .today ().year )
122
132
}
123
133
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;">
130
136
<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>
132
138
</p>
133
139
</div>
134
- </body></html>
135
140
''' % (
136
- create_text ,
137
- description_text ,
138
141
info .website_language (),
139
- learnmore_text )
142
+ description_text , )
140
143
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>
146
146
<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>
148
148
</div>
149
- </body></html>
150
149
''' % (copyright_text )
151
150
152
151
# Set description and company labels
153
152
self .lblAboutDescription .setText (about_html )
154
153
self .lblAboutCompany .setText (company_html )
154
+ self .lblAboutCompany .setAlignment (Qt .AlignRight | Qt .AlignBottom )
155
+ self .txtversion .setAlignment (Qt .AlignLeft | Qt .AlignBottom )
155
156
156
157
# set events handlers
157
158
self .btncredit .clicked .connect (self .load_credit )
@@ -169,8 +170,13 @@ def __init__(self):
169
170
170
171
def display_release (self , version_text ):
171
172
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 )
174
180
175
181
def get_current_release (self ):
176
182
"""Get the current version """
@@ -211,26 +217,33 @@ def get_release_from_http(self):
211
217
string_release_notes = _ ("Release Notes" )
212
218
string_official = _ ("Official" )
213
219
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
+
214
225
if frozen_git_SHA == release_git_SHA :
215
226
# 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 ))
218
228
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>'
220
232
else :
221
233
# Display current build name - unedited
222
234
log .warning ("Build SHA (%s) does not match an official release SHA (%s) for v%s" %
223
235
(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 } "
225
237
226
238
# Init some variables
227
239
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 } "
229
244
230
245
# 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 )
234
247
235
248
except Exception as Ex :
236
249
log .error ("Failed to get version from: %s" % RELEASE_URL % info .VERSION )
@@ -313,11 +326,9 @@ def __init__(self):
313
326
# Update supporter button
314
327
supporter_text = _ ("Become a Supporter" )
315
328
supporter_html = '''
316
- <html><head/><body>
317
329
<p align="center">
318
330
<a href="https://www.openshot.org/%sdonate/?app-about-us">%s</a>
319
331
</p>
320
- </body></html>
321
332
''' % (info .website_language (), supporter_text )
322
333
self .lblBecomeSupporter .setText (supporter_html )
323
334
@@ -434,11 +445,9 @@ def __init__(self):
434
445
# Update github link button
435
446
github_text = _ ("OpenShot on GitHub" )
436
447
github_html = '''
437
- <html><head/><body>
438
448
<p align="center">
439
449
<a href="https://github.com/OpenShot/">%s</a>
440
450
</p>
441
- </body></html>
442
451
''' % (github_text )
443
452
self .lblGitHubLink .setText (github_html )
444
453
0 commit comments