Skip to content

Commit 9f7e0ee

Browse files
authored
Merge pull request #5671 from OpenShot/improved-theme-combobox
Improvements to Cosmic Dusk Theme
2 parents f1b4a1e + 57a9c1b commit 9f7e0ee

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

src/themes/cosmic/theme.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def __init__(self, app):
122122
color: #91C3FF;
123123
padding-top: 10px;
124124
padding-bottom: 10px;
125+
border: none;
125126
}
126127
127128
QToolBar#toolBar QToolButton:hover {
@@ -274,6 +275,11 @@ def __init__(self, app):
274275
color: rgba(145, 195, 255, 0.4);
275276
}
276277
278+
QTabWidget#exportTabs QTabBar::tab,
279+
QTabWidget#tabCategories QTabBar::tab {
280+
margin-bottom: 10px;
281+
}
282+
277283
QTabBar::tab:selected {
278284
color: rgba(145, 195, 255, 1.0);
279285
}
@@ -343,6 +349,7 @@ def __init__(self, app):
343349
padding: 6px;
344350
padding-left: 8px;
345351
padding-right: 8px;
352+
combobox-popup: 0;
346353
}
347354
348355
QComboBox::drop-down {
@@ -416,6 +423,7 @@ def __init__(self, app):
416423
417424
QToolBox::tab {
418425
color: #91C3FF;
426+
border-top: 1px solid rgba(145, 195, 255, .2);
419427
}
420428
421429
QTabWidget QWidget#pageAdvancedOptions, QWidget#pageProfile, QWidget#pageImageSequenceSettings, QWidget#pageVideoSettings, QWidget#pageAudioSettings {
@@ -473,6 +481,10 @@ def __init__(self, app):
473481
background-color: #0078FF;
474482
color: #FFFFFF;
475483
}}
484+
485+
QMessageBox QPushButton[text="&{_('Cancel')}"] {{
486+
qproperty-icon: none;
487+
}}
476488
""" + self.style_sheet.replace("{PATH}", f"{path_unix_slashes}/")
477489

478490
def apply_theme(self):
@@ -519,7 +531,8 @@ def apply_theme(self):
519531
{"action": self.app.window.actionProfile, "icon": "themes/cosmic/images/tool-profile.svg", "style": Qt.ToolButtonTextBesideIcon},
520532
{"expand": True},
521533
{"action": self.app.window.actionSave, "icon": "themes/cosmic/images/tool-save-project.svg", "style": Qt.ToolButtonTextBesideIcon},
522-
{"action": self.app.window.actionExportVideo, "icon": "themes/cosmic/images/tool-export.svg", "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #0078FF; color: #FFFFFF; }"},
534+
{"action": self.app.window.actionExportVideo, "icon": "themes/cosmic/images/tool-export.svg",
535+
"style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #0078FF; color: #FFFFFF; border: none; } QToolButton:hover, QToolButton:pressed { background-color: #006EE6; }"},
523536
{"action": self.app.window.actionUpdate, "icon": "themes/cosmic/images/warning.svg", "visible": False, "style": Qt.ToolButtonTextBesideIcon, "stylesheet": "QToolButton { background-color: #141923; color: #FABE0A; }"}
524537
]
525538
self.set_toolbar_buttons(self.app.window.toolBar, icon_size=20, settings=toolbar_buttons)

src/themes/humanity/theme.py

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def __init__(self, app):
4242
height: 24px;
4343
}
4444
45+
QComboBox {
46+
combobox-popup: 0;
47+
}
48+
4549
.property_value {
4650
foreground-color: #217dd4;
4751
background-color: #565656;
@@ -99,6 +103,10 @@ def __init__(self, app):
99103
QWidget#videoPreview {
100104
background-color: #dedede;
101105
}
106+
107+
QComboBox {
108+
combobox-popup: 0;
109+
}
102110
"""
103111

104112
def apply_theme(self):

src/windows/export.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,6 @@ def __init__(self, *args, **kwargs):
238238
# This exception occurs when there's a problem parsing the Profile file - display a message and continue
239239
log.error("Failed to parse file '%s' as a profile: %s" % (profile_path, e))
240240

241-
# Loop through sorted profiles
242-
for profile_name in sorted(self.profile_names):
243-
# Add to dropdown
244-
self.cboProfile.addItem(self.getProfileName(self.getProfilePath(profile_name)),
245-
self.getProfilePath(profile_name))
246-
247241
# ********* Simple Project Type **********
248242
# load the simple project type dropdown
249243
presets = []
@@ -790,7 +784,7 @@ def disableControls(self):
790784
self.txtFileName.setEnabled(False)
791785
self.lblFolderPath.setEnabled(False)
792786
self.txtExportFolder.setEnabled(False)
793-
self.tabWidget.setEnabled(False)
787+
self.exportTabs.setEnabled(False)
794788
self.export_button.setEnabled(False)
795789
self.btnBrowse.setEnabled(False)
796790

@@ -800,7 +794,7 @@ def enableControls(self):
800794
self.txtFileName.setEnabled(True)
801795
self.lblFolderPath.setEnabled(True)
802796
self.txtExportFolder.setEnabled(True)
803-
self.tabWidget.setEnabled(True)
797+
self.exportTabs.setEnabled(True)
804798
self.export_button.setEnabled(True)
805799
self.btnBrowse.setEnabled(True)
806800

src/windows/ui/export.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</layout>
7373
</item>
7474
<item row="1" column="0">
75-
<widget class="QTabWidget" name="tabWidget">
75+
<widget class="QTabWidget" name="exportTabs">
7676
<property name="sizePolicy">
7777
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
7878
<horstretch>0</horstretch>
@@ -1064,7 +1064,7 @@
10641064
<tabstop>txtFileName</tabstop>
10651065
<tabstop>txtExportFolder</tabstop>
10661066
<tabstop>btnBrowse</tabstop>
1067-
<tabstop>tabWidget</tabstop>
1067+
<tabstop>exportTabs</tabstop>
10681068
<tabstop>cboSimpleProjectType</tabstop>
10691069
<tabstop>cboSimpleTarget</tabstop>
10701070
<tabstop>cboSimpleVideoProfile</tabstop>

0 commit comments

Comments
 (0)